diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-06-17 20:02:46 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-06-17 20:35:09 -0300 |
commit | 10565895805887d4faf004a6f71219da177f78b7 (patch) | |
tree | 1a6f76bbc2dd3e897f45b118bb8212a7e9d14054 /railties/test | |
parent | 43262ea882e7ae6fe2b1baa9eb8de395dc881a8c (diff) | |
download | rails-10565895805887d4faf004a6f71219da177f78b7.tar.gz rails-10565895805887d4faf004a6f71219da177f78b7.tar.bz2 rails-10565895805887d4faf004a6f71219da177f78b7.zip |
Add a generic --skip-gems options to generator
Also remove --skip-turbolinks.
This option is useful if users want to remove some gems like jbuilder,
turbolinks, coffee-rails, etc that don't have specific options on the
generator.
rails new my_app --skip-gems turbolinks coffee-rails
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 74c7c6e298..2ac5410960 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -448,11 +448,12 @@ class AppGeneratorTest < Rails::Generators::TestCase end end - def test_skip_turbolinks - run_generator [destination_root, "--skip-turbolinks"] + def test_generator_if_skip_gems_is_given + run_generator [destination_root, "--skip-gems", "turbolinks", "coffee-rails"] assert_file "Gemfile" do |content| assert_no_match(/turbolinks/, content) + assert_no_match(/coffee-rails/, content) end assert_file "app/views/layouts/application.html.erb" do |content| assert_no_match(/data-turbolinks-track/, content) |