diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-06 11:10:40 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-06 11:10:53 -0800 |
commit | d971a1c541545d409e04b613d96b3f8ce774caf1 (patch) | |
tree | 339a2f8a48125b04d68f1a3ac5b97d2cf9406490 /actionpack/lib/action_dispatch/testing/assertions | |
parent | 3abacc0a700835afbbda53e153bb9105bcc68738 (diff) | |
download | rails-d971a1c541545d409e04b613d96b3f8ce774caf1.tar.gz rails-d971a1c541545d409e04b613d96b3f8ce774caf1.tar.bz2 rails-d971a1c541545d409e04b613d96b3f8ce774caf1.zip |
just use assert and refute rather than building messages
Diffstat (limited to 'actionpack/lib/action_dispatch/testing/assertions')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/assertions/dom.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/dom.rb b/actionpack/lib/action_dispatch/testing/assertions/dom.rb index 47c84742aa..edea6dab39 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/dom.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/dom.rb @@ -13,9 +13,7 @@ module ActionDispatch 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 @@ module ActionDispatch 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 |