aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/actions_test.rb
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2014-08-27 12:30:35 +0200
committerYves Senn <yves.senn@gmail.com>2014-08-27 12:30:35 +0200
commitb9b521306c47d65bdbe18ec31a7b784adbfd1849 (patch)
treeef81fbcc10606fbfae875560ae5c0c8f78c7b88b /railties/test/generators/actions_test.rb
parent20e7f08ecc22983183909ec60771b929a4c2af16 (diff)
downloadrails-b9b521306c47d65bdbe18ec31a7b784adbfd1849.tar.gz
rails-b9b521306c47d65bdbe18ec31a7b784adbfd1849.tar.bz2
rails-b9b521306c47d65bdbe18ec31a7b784adbfd1849.zip
fix broken `gem` method with non-String arguments. Closes #16709.
This was caused by #15327.
Diffstat (limited to 'railties/test/generators/actions_test.rb')
-rw-r--r--railties/test/generators/actions_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/test/generators/actions_test.rb b/railties/test/generators/actions_test.rb
index a4337926d1..2206e389b5 100644
--- a/railties/test/generators/actions_test.rb
+++ b/railties/test/generators/actions_test.rb
@@ -79,6 +79,16 @@ class ActionsTest < Rails::Generators::TestCase
assert_file 'Gemfile', /gem 'rspec', github: 'dchelimsky\/rspec', tag: '1\.2\.9\.rc1'/
end
+ def test_gem_with_non_string_options
+ run_generator
+
+ action :gem, 'rspec', require: false
+ action :gem, 'rspec-rails', group: [:development, :test]
+
+ assert_file 'Gemfile', /^gem 'rspec', require: false$/
+ assert_file 'Gemfile', /^gem 'rspec-rails', group: \[:development, :test\]$/
+ end
+
def test_gem_falls_back_to_inspect_if_string_contains_single_quote
run_generator