Skip to content

Commit

Permalink
Improve assert_equal message output
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldrapper committed Jan 9, 2025
1 parent 1231db7 commit 82c5fda
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/quickdraw/assertions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
module Quickdraw::Assertions
def assert_equal(actual, expected)
assert(actual == expected) do
"expected #{actual.inspect} to == #{expected.inspect}"
<<~MESSAGE
\e[34mExpected:\e[0m
#{actual.inspect}
\e[34mto be == to\e[0m
#{expected.inspect}
MESSAGE
end
end

Expand Down

0 comments on commit 82c5fda

Please sign in to comment.