mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
just use assert and refute rather than building messages
This commit is contained in:
parent
3abacc0a70
commit
d971a1c541
1 changed files with 2 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue