aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/resource_generator_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/generators/resource_generator_test.rb')
-rw-r--r--railties/test/generators/resource_generator_test.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/railties/test/generators/resource_generator_test.rb b/railties/test/generators/resource_generator_test.rb
index 71b3619351..73804dae45 100644
--- a/railties/test/generators/resource_generator_test.rb
+++ b/railties/test/generators/resource_generator_test.rb
@@ -9,8 +9,8 @@ class ResourceGeneratorTest < Rails::Generators::TestCase
def test_help_with_inherited_options
content = run_generator ["--help"]
- assert_match /ActiveRecord options:/, content
- assert_match /TestUnit options:/, content
+ assert_match(/ActiveRecord options:/, content)
+ assert_match(/TestUnit options:/, content)
end
def test_files_from_inherited_invocation
@@ -55,7 +55,7 @@ class ResourceGeneratorTest < Rails::Generators::TestCase
run_generator
assert_file "config/routes.rb" do |route|
- assert_match /resources :accounts$/, route
+ assert_match(/resources :accounts$/, route)
end
end
@@ -63,19 +63,19 @@ class ResourceGeneratorTest < Rails::Generators::TestCase
content = run_generator ["accounts".freeze]
assert_file "app/models/account.rb", /class Account < ActiveRecord::Base/
assert_file "test/unit/account_test.rb", /class AccountTest/
- assert_match /Plural version of the model detected, using singularized version. Override with --force-plural./, content
+ assert_match(/Plural version of the model detected, using singularized version. Override with --force-plural./, content)
end
def test_plural_names_can_be_forced
content = run_generator ["accounts", "--force-plural"]
assert_file "app/models/accounts.rb", /class Accounts < ActiveRecord::Base/
assert_file "test/unit/accounts_test.rb", /class AccountsTest/
- assert_no_match /Plural version of the model detected/, content
+ assert_no_match(/Plural version of the model detected/, content)
end
def test_mass_nouns_do_not_throw_warnings
content = run_generator ["sheep".freeze]
- assert_no_match /Plural version of the model detected/, content
+ assert_no_match(/Plural version of the model detected/, content)
end
def test_route_is_removed_on_revoke
@@ -83,7 +83,7 @@ class ResourceGeneratorTest < Rails::Generators::TestCase
run_generator ["account"], :behavior => :revoke
assert_file "config/routes.rb" do |route|
- assert_no_match /resources :accounts$/, route
+ assert_no_match(/resources :accounts$/, route)
end
end
end