exercism/elixir/hello-world/hello_world_test.exs

28 lines
573 B
Elixir
Raw Normal View History

2016-08-13 23:20:14 +00:00
if System.get_env("EXERCISM_TEST_EXAMPLES") do
Code.load_file("example.exs")
else
Code.load_file("hello_world.exs")
end
ExUnit.start
ExUnit.configure exclude: :pending, trace: true
defmodule HelloWorldTest do
use ExUnit.Case, async: true
test "says hello with no name" do
assert HelloWorld.hello() == "Hello, World!"
end
@tag :pending
test "says hello sample name" do
assert HelloWorld.hello("Alice") == "Hello, Alice!"
end
@tag :pending
test "says hello other sample name" do
assert HelloWorld.hello("Bob") == "Hello, Bob!"
end
end