aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib
diff options
context:
space:
mode:
authorTimm <kaspth@gmail.com>2013-08-17 11:40:40 +0200
committerTimm <kaspth@gmail.com>2014-06-16 21:04:10 +0200
commit73c690d4fd8a15b1572e5e88a094064734f541ac (patch)
treedb2b70d137e0d57be0c71f1a83eaa0c072338a35 /actionview/lib
parentbab54e4e529ae4d727fae8209ac60f9b25802680 (diff)
downloadrails-73c690d4fd8a15b1572e5e88a094064734f541ac.tar.gz
rails-73c690d4fd8a15b1572e5e88a094064734f541ac.tar.bz2
rails-73c690d4fd8a15b1572e5e88a094064734f541ac.zip
Removed html_strings variable, no splat operator needed.
Diffstat (limited to 'actionview/lib')
-rw-r--r--actionview/lib/action_view/testing/assertions/dom.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionview/lib/action_view/testing/assertions/dom.rb b/actionview/lib/action_view/testing/assertions/dom.rb
index 85a01f9b87..8df03445a8 100644
--- a/actionview/lib/action_view/testing/assertions/dom.rb
+++ b/actionview/lib/action_view/testing/assertions/dom.rb
@@ -6,7 +6,7 @@ module ActionView
# # assert that the referenced method generates the appropriate HTML string
# assert_dom_equal '<a href="http://www.example.com">Apples</a>', link_to("Apples", "http://www.example.com")
def assert_dom_equal(expected, actual, message = nil)
- assert dom_assertion(message, expected, actual)
+ assert dom_assertion(expected, actual, message)
end
# The negated form of +assert_dom_equal+.
@@ -14,12 +14,12 @@ module ActionView
# # assert that the referenced method does not generate the specified HTML string
# assert_dom_not_equal '<a href="http://www.example.com">Apples</a>', link_to("Oranges", "http://www.example.com")
def assert_dom_not_equal(expected, actual, message = nil)
- assert_not dom_assertion(message, expected, actual)
+ assert_not dom_assertion(expected, actual, message)
end
protected
- def dom_assertion(message = nil, *html_strings)
- expected, actual = html_strings.map { |str| Loofah.fragment(str) }
+ def dom_assertion(expected_string, actual_string, message = nil)
+ expected, actual = Loofah.fragment(expected_string), Loofah.fragment(actual_string)
message ||= "Expected: #{expected}\nActual: #{actual}"
return compare_doms(expected, actual), message
end