Elixir: New functionality
Instructions
Loading...
Your exercise will be checked with these tests:
defmodule Test do
use ExUnit.Case
defmodule Exercise do
require Solution
Solution.prohibit_words(["hello", "world", "foo"])
end
test "prohibit_words work" do
assert Exercise.forbidden?("hello")
assert Exercise.forbidden?("world")
assert Exercise.forbidden?("foo")
refute Exercise.forbidden?("baz")
refute Exercise.forbidden?(2)
refute Exercise.forbidden?(%{hello: :world})
end
end
Teacher's solution will be available in:
20:00
