Permalink
Browse files

just use assert and refute rather than building messages

  • Loading branch information...
1 parent 3abacc0 commit d971a1c541545d409e04b613d96b3f8ce774caf1 @tenderlove tenderlove committed Jan 6, 2012
Showing with 2 additions and 6 deletions.
  1. +2 −6 actionpack/lib/action_dispatch/testing/assertions/dom.rb
@@ -13,9 +13,7 @@ module DomAssertions
def assert_dom_equal(expected, actual, message = "")
expected_dom = HTML::Document.new(expected).root
actual_dom = HTML::Document.new(actual).root
- full_message = build_message(message, "<?> expected to be == to\n<?>.", expected_dom.to_s, actual_dom.to_s)
-
- assert_block(full_message) { expected_dom == actual_dom }
+ assert_equal expected_dom, actual_dom
end
# The negated form of +assert_dom_equivalent+.
@@ -28,9 +26,7 @@ def assert_dom_equal(expected, actual, message = "")
def assert_dom_not_equal(expected, actual, message = "")
expected_dom = HTML::Document.new(expected).root
actual_dom = HTML::Document.new(actual).root
- full_message = build_message(message, "<?> expected to be != to\n<?>.", expected_dom.to_s, actual_dom.to_s)
-
- assert_block(full_message) { expected_dom != actual_dom }
+ refute_equal expected_dom, actual_dom
end
end
end

0 comments on commit d971a1c

Please sign in to comment.