aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/ajax_test.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-12-01 23:19:41 -0600
committerJoshua Peek <josh@joshpeek.com>2009-12-01 23:19:41 -0600
commit70d0b7c87a492aef141859127d1b9fec6b4b09f3 (patch)
tree72c42ebbd0151062ff7ab3849f649ba591377acb /actionpack/test/template/ajax_test.rb
parent75ae5bb0228ec8d8a144030573db2fd998299042 (diff)
downloadrails-70d0b7c87a492aef141859127d1b9fec6b4b09f3.tar.gz
rails-70d0b7c87a492aef141859127d1b9fec6b4b09f3.tar.bz2
rails-70d0b7c87a492aef141859127d1b9fec6b4b09f3.zip
Fix parens warning in ajax test
Diffstat (limited to 'actionpack/test/template/ajax_test.rb')
-rw-r--r--actionpack/test/template/ajax_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/test/template/ajax_test.rb b/actionpack/test/template/ajax_test.rb
index 670ba92697..aeb7c09b09 100644
--- a/actionpack/test/template/ajax_test.rb
+++ b/actionpack/test/template/ajax_test.rb
@@ -6,7 +6,7 @@ class AjaxTestCase < ActiveSupport::TestCase
def assert_html(html, matches)
matches.each do |match|
- assert_match Regexp.new(Regexp.escape(match)), html
+ assert_match(Regexp.new(Regexp.escape(match)), html)
end
end
@@ -52,18 +52,18 @@ class LinkToRemoteTest < AjaxTestCase
test "with a hash for :update" do
link = link(:update => {:success => "#posts", :failure => "#error"})
- assert_match /data-update-success="#posts"/, link
- assert_match /data-update-failure="#error"/, link
+ assert_match(/data-update-success="#posts"/, link)
+ assert_match(/data-update-failure="#error"/, link)
end
test "with positional parameters" do
link = link(:position => :top, :update => "#posts")
- assert_match /data\-update\-position="top"/, link
+ assert_match(/data\-update\-position="top"/, link)
end
test "with an optional method" do
link = link(:method => "delete")
- assert_match /data-method="delete"/, link
+ assert_match(/data-method="delete"/, link)
end
class LegacyLinkToRemoteTest < AjaxTestCase
@@ -99,7 +99,7 @@ class ButtonToRemoteTest < AjaxTestCase
button = button({:url => {:action => "whatnot"}}, {:class => "fine"})
[/input/, /class="fine"/, /type="button"/, /value="Remote outpost"/,
/data-url="\/whatnot"/].each do |match|
- assert_match match, button
+ assert_match(match, button)
end
end
end