Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

just use assert and refute rather than building messages

  • Loading branch information...
commit d971a1c541545d409e04b613d96b3f8ce774caf1 1 parent 3abacc0
Aaron Patterson tenderlove authored
Showing with 2 additions and 6 deletions.
  1. +2 −6 actionpack/lib/action_dispatch/testing/assertions/dom.rb
8 actionpack/lib/action_dispatch/testing/assertions/dom.rb
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.