aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activesupport/lib/active_support/log_subscriber/test_helper.rb4
-rw-r--r--railties/guides/source/action_mailer_basics.textile4
-rw-r--r--railties/guides/source/testing.textile2
-rw-r--r--railties/lib/rails/generators/test_case.rb6
4 files changed, 8 insertions, 8 deletions
diff --git a/activesupport/lib/active_support/log_subscriber/test_helper.rb b/activesupport/lib/active_support/log_subscriber/test_helper.rb
index 3e54134c5c..dcfcf0b63c 100644
--- a/activesupport/lib/active_support/log_subscriber/test_helper.rb
+++ b/activesupport/lib/active_support/log_subscriber/test_helper.rb
@@ -18,8 +18,8 @@ module ActiveSupport
# Developer.all
# wait
# assert_equal 1, @logger.logged(:debug).size
- # assert_match /Developer Load/, @logger.logged(:debug).last
- # assert_match /SELECT \* FROM "developers"/, @logger.logged(:debug).last
+ # assert_match(/Developer Load/, @logger.logged(:debug).last)
+ # assert_match(/SELECT \* FROM "developers"/, @logger.logged(:debug).last)
# end
# end
#
diff --git a/railties/guides/source/action_mailer_basics.textile b/railties/guides/source/action_mailer_basics.textile
index 351a4498b1..67761645fa 100644
--- a/railties/guides/source/action_mailer_basics.textile
+++ b/railties/guides/source/action_mailer_basics.textile
@@ -514,8 +514,8 @@ class UserMailerTest < ActionMailer::TestCase
# Test the body of the sent email contains what we expect it to
assert_equal [user.email], email.to
assert_equal "Welcome to My Awesome Site", email.subject
- assert_match /<h1>Welcome to example.com, #{user.name}<\/h1>/, email.encoded
- assert_match /Welcome to example.com, #{user.name}/, email.encoded
+ assert_match(/<h1>Welcome to example.com, #{user.name}<\/h1>/, email.encoded)
+ assert_match(/Welcome to example.com, #{user.name}/, email.encoded)
end
end
</ruby>
diff --git a/railties/guides/source/testing.textile b/railties/guides/source/testing.textile
index cc55d1f756..caa0d91a83 100644
--- a/railties/guides/source/testing.textile
+++ b/railties/guides/source/testing.textile
@@ -931,7 +931,7 @@ class UserControllerTest < ActionController::TestCase
assert_equal "You have been invited by me@example.com", invite_email.subject
assert_equal 'friend@example.com', invite_email.to[0]
- assert_match /Hi friend@example.com/, invite_email.body
+ assert_match(/Hi friend@example.com/, invite_email.body)
end
end
</ruby>
diff --git a/railties/lib/rails/generators/test_case.rb b/railties/lib/rails/generators/test_case.rb
index ee85b70bb5..7319fb79f6 100644
--- a/railties/lib/rails/generators/test_case.rb
+++ b/railties/lib/rails/generators/test_case.rb
@@ -81,7 +81,7 @@ module Rails
#
# assert_file "app/controller/products_controller.rb" do |controller|
# assert_instance_method :index, content do |index|
- # assert_match /Product\.all/, index
+ # assert_match(/Product\.all/, index)
# end
# end
#
@@ -148,7 +148,7 @@ module Rails
#
# assert_migration "db/migrate/create_products.rb" do |migration|
# assert_class_method :up, migration do |up|
- # assert_match /create_table/, up
+ # assert_match(/create_table/, up)
# end
# end
#
@@ -161,7 +161,7 @@ module Rails
#
# assert_file "app/controller/products_controller.rb" do |controller|
# assert_instance_method :index, content do |index|
- # assert_match /Product\.all/, index
+ # assert_match(/Product\.all/, index)
# end
# end
#