未验证 提交 c42dafd4 编写于 作者: Y Yuji Yaginuma 提交者: GitHub

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`
......@@ -315,6 +315,15 @@ def test_active_storage_mini_magick_gem
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 @@ def test_app_update_does_not_generate_active_storage_contents_when_skip_active_s
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 @@ def test_app_update_does_not_generate_active_storage_contents_when_skip_active_r
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册