The classical introductory exercise. Just say "Hello, World!".
"Hello, World!" is the traditional first program for beginning programming in a new language or environment.
The objectives are simple:
Write a function that returns the string "Hello, World!".
Run the test suite and make sure that it succeeds.
Submit your solution and check it at the website.
# Common test data version: 1.1.0 be3ae66
class HelloWorldTest < Minitest::Test
def test_say_hi
assert_equal "Hello, World!", HelloWorld.hello
end
end
My solution is:
class HelloWorld
def self.hello
"Hello, World!"
end
end
I know this time was pretty simple, see you next time!
I'm doing a youtube series about these exercises if you want to follow me, you are welcome, this is the channel juanvqz and this is the exercism playlist
Top comments (0)