aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/plugin_generator_test.rb
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2011-05-18 20:37:57 +0900
committerAkira Matsuda <ronnie@dio.jp>2011-05-18 23:20:19 +0900
commitcce461511bde8f86aa6f82775320070ccc688273 (patch)
tree9fdee4f56bee252783bc1631ca9028d00e6d0aef /railties/test/generators/plugin_generator_test.rb
parent32b9cefb637741ac7158085790cda56360a229f2 (diff)
downloadrails-cce461511bde8f86aa6f82775320070ccc688273.tar.gz
rails-cce461511bde8f86aa6f82775320070ccc688273.tar.bz2
rails-cce461511bde8f86aa6f82775320070ccc688273.zip
be sure to parenthesize the arguments when the first one is a RegExp literal
this fixes: "warning: ambiguous first argument; put parentheses or even spaces" because: you need this to tell the parser that you're not calling :/ method (division) details (Japanese!): http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-dev/42445?42370-43277
Diffstat (limited to 'railties/test/generators/plugin_generator_test.rb')
-rw-r--r--railties/test/generators/plugin_generator_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb
index e6686a6af4..5c0774ddbd 100644
--- a/railties/test/generators/plugin_generator_test.rb
+++ b/railties/test/generators/plugin_generator_test.rb
@@ -32,7 +32,7 @@ class PluginGeneratorTest < Rails::Generators::TestCase
def test_check_class_collision
content = capture(:stderr){ run_generator ["object"] }
- assert_match /The name 'Object' is either already used in your application or reserved/, content
+ assert_match(/The name 'Object' is either already used in your application or reserved/, content)
end
def test_invokes_default_test_framework
@@ -44,7 +44,7 @@ class PluginGeneratorTest < Rails::Generators::TestCase
def test_logs_if_the_test_framework_cannot_be_found
content = nil
silence(:stderr) { content = run_generator ["plugin_fu", "--test-framework=rspec"] }
- assert_match /rspec \[not found\]/, content
+ assert_match(/rspec \[not found\]/, content)
end
def test_creates_tasks_if_required
@@ -66,6 +66,6 @@ class PluginGeneratorTest < Rails::Generators::TestCase
def test_deprecation
output = capture(:stderr) { run_generator }
- assert_match /Plugin generator is deprecated, please use 'rails plugin new' command to generate plugin structure./, output
+ assert_match(/Plugin generator is deprecated, please use 'rails plugin new' command to generate plugin structure./, output)
end
end