diff options
author | bogdanvlviv <bogdanvlviv@gmail.com> | 2018-02-20 01:02:10 +0200 |
---|---|---|
committer | bogdanvlviv <bogdanvlviv@gmail.com> | 2018-02-20 01:14:15 +0200 |
commit | c335066b9ddd70c23c42c18731cb7947560702bb (patch) | |
tree | 11e0671dcf22bbb0fa12396b5afe167242551d8e /railties | |
parent | ffddaead04ebb49ff2062194fc8c1fda58c41430 (diff) | |
download | rails-c335066b9ddd70c23c42c18731cb7947560702bb.tar.gz rails-c335066b9ddd70c23c42c18731cb7947560702bb.tar.bz2 rails-c335066b9ddd70c23c42c18731cb7947560702bb.zip |
Ensure that `mini_magick` is absent after `rails new` with `--skip-active-storage`
Remove redundant assertions of an absence of `mini_magick` in `Gemfile`
since `bin/rails app:update` does not update Gemfile.
This assertions was added by 4a835aa3236eedb135ccf8b59ed3c03e040b8b01,
after reviewing of https://github.com/rails/rails/pull/32049 i realized
that assertions are redundant.
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 |