diff options
author | Yuji Yaginuma <yuuji.yaginuma@gmail.com> | 2018-02-20 17:13:40 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-20 17:13:40 +0900 |
commit | c42dafd437f6392bf0fb41ac751a8e231940b67e (patch) | |
tree | 11e0671dcf22bbb0fa12396b5afe167242551d8e /railties | |
parent | ffddaead04ebb49ff2062194fc8c1fda58c41430 (diff) | |
parent | c335066b9ddd70c23c42c18731cb7947560702bb (diff) | |
download | rails-c42dafd437f6392bf0fb41ac751a8e231940b67e.tar.gz rails-c42dafd437f6392bf0fb41ac751a8e231940b67e.tar.bz2 rails-c42dafd437f6392bf0fb41ac751a8e231940b67e.zip |
Merge pull request #32062 from bogdanvlviv/test_mini_magick_gem_when_skip_active_storage_is_given
Ensure that `mini_magick` is absent after `rails new` with `--skip-active-storage`
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index cc4a376d31..99790e602d 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -315,6 +315,15 @@ class AppGeneratorTest < Rails::Generators::TestCase assert_file "Gemfile", /^# gem 'mini_magick'/ end + def test_mini_magick_gem_when_skip_active_storage_is_given + app_root = File.join(destination_root, "myapp") + run_generator [app_root, "--skip-active-storage"] + + assert_file "#{app_root}/Gemfile" do |content| + assert_no_match(/gem 'mini_magick'/, content) + end + end + def test_app_update_does_not_generate_active_storage_contents_when_skip_active_storage_is_given app_root = File.join(destination_root, "myapp") run_generator [app_root, "--skip-active-storage"] @@ -336,10 +345,6 @@ class AppGeneratorTest < Rails::Generators::TestCase end assert_no_file "#{app_root}/config/storage.yml" - - assert_file "#{app_root}/Gemfile" do |content| - assert_no_match(/gem 'mini_magick'/, content) - end end def test_app_update_does_not_generate_active_storage_contents_when_skip_active_record_is_given @@ -363,10 +368,6 @@ class AppGeneratorTest < Rails::Generators::TestCase end assert_no_file "#{app_root}/config/storage.yml" - - assert_file "#{app_root}/Gemfile" do |content| - assert_no_match(/gem 'mini_magick'/, content) - end end def test_app_update_does_not_change_config_target_version |