Test for single arity failures
This commit is contained in:
@@ -37,6 +37,15 @@ defmodule FailureTests do
|
||||
"""
|
||||
end
|
||||
|
||||
test "single arity failure" do
|
||||
[koan] = SingleArity.all_koans
|
||||
error = apply(SingleArity, koan, []) |> error()
|
||||
|
||||
assert Failure.format_failure(error) == """
|
||||
Assertion failed in some_file.ex:42\nmatch?(:foo, ___)
|
||||
"""
|
||||
end
|
||||
|
||||
defp error(error) do
|
||||
%{
|
||||
error: error,
|
||||
|
||||
Reference in New Issue
Block a user