diff --git a/exercises/hello-world/src/example.erl b/exercises/hello-world/src/example.erl index c6954f69..a4fa9b01 100644 --- a/exercises/hello-world/src/example.erl +++ b/exercises/hello-world/src/example.erl @@ -1,8 +1,8 @@ -module(example). --export([greet/0, greet/1, test_version/0]). +-export([hello/0, test_version/0]). -greet() -> "Hello, World!". -greet(Name) -> "Hello, " ++ Name ++ "!". +hello() -> + "Hello, World!". test_version() -> - 1. + 2. diff --git a/exercises/hello-world/test/hello_world_tests.erl b/exercises/hello-world/test/hello_world_tests.erl index f97b3136..ca9f5187 100644 --- a/exercises/hello-world/test/hello_world_tests.erl +++ b/exercises/hello-world/test/hello_world_tests.erl @@ -1,18 +1,9 @@ -module(hello_world_tests). -define(TESTED_MODULE, (sut(hello_world))). --define(TEST_VERSION, 1). +-define(TEST_VERSION, 2). -include("exercism.hrl"). -no_name_test() -> - ?assertEqual("Hello, World!", ?TESTED_MODULE:greet()). - -alice_test() -> - ?assertEqual("Hello, Alice!", ?TESTED_MODULE:greet("Alice")). - -bob_test() -> - ?assertEqual("Hello, Bob!", ?TESTED_MODULE:greet("Bob")). - -strange_test() -> - ?assertEqual("Hello, !", ?TESTED_MODULE:greet("")). +say_hi_test() -> + ?assertEqual("Hello, World!", ?TESTED_MODULE:hello()).