Skip to content

Instantly share code, notes, and snippets.

@daveshah
Created May 13, 2016 12:03
Show Gist options
  • Save daveshah/655c458e343ccc02e74d93d36e1a6f78 to your computer and use it in GitHub Desktop.
Save daveshah/655c458e343ccc02e74d93d36e1a6f78 to your computer and use it in GitHub Desktop.
I prefer the latter to the former... :)
Assertion with == failed
code: Words.count("co-operative") == expected
lhs: %{"co" => 1, "operative" => 1}
rhs: %{"co-operative" => 1}
Assertion with == failed
code: Words.count("co-operative") == %{"co-operative" => 1}
lhs: %{"co" => 1, "operative" => 1}
rhs: %{"co-operative" => 1}
test "hyphens" do
expected = %{"co-operative" => 1}
assert Words.count("co-operative") == expected
end
test "hyphens" do
assert Words.count("co-operative") == %{"co-operative" => 1}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment