Tests should provide valid error parameters

This commit is contained in:
Shashwat Ganesh
2020-06-04 22:54:18 +05:30
parent 8e8efd8def
commit 0681f5df22

View File

@@ -39,7 +39,7 @@ defmodule FailureTests do
test "only offending lines are displayed for errors" do
[koan] = SingleArity.all_koans()
error = apply(SingleArity, koan, []) |> error()
error = apply(SingleArity, koan, []) |> Tuple.to_list |> List.last |> error
assert Failure.format_failure(error) == """
Assertion failed in some_file.ex:42\nmatch?(:foo, ___)