未验证 提交 b6ed9a7f 编写于 作者: B bogdanvlviv

Clean up railties tests

  Remove `AppGeneratorTest#test_active_storage_install`.
  The test is added by 67db41aa,
  since #31534 this test doesn't test anything.

  Remove redundant assertions in `SharedGeneratorTests`.
  These assertions is added by 4a835aa3.
  Follows 67db41aa, #31534.
上级 7ccd070c
......@@ -313,23 +313,6 @@ def test_active_storage_mini_magick_gem
assert_file "Gemfile", /^# gem 'mini_magick'/
end
def test_active_storage_install
command_check = -> command, _ do
@binstub_called ||= 0
case command
when "active_storage:install"
@binstub_called += 1
assert_equal 1, @binstub_called, "active_storage:install expected to be called once, but was called #{@binstub_called} times"
end
end
generator.stub :rails_command, command_check do
generator.stub :bundle_command, nil do
quietly { generator.invoke_all }
end
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"]
......
......@@ -245,7 +245,6 @@ def test_generator_if_skip_active_storage_is_given
end
assert_no_file "#{application_path}/config/storage.yml"
assert_no_directory "#{application_path}/db/migrate"
assert_no_directory "#{application_path}/storage"
assert_no_directory "#{application_path}/tmp/storage"
......@@ -276,7 +275,6 @@ def test_generator_does_not_generate_active_storage_contents_if_skip_active_reco
end
assert_no_file "#{application_path}/config/storage.yml"
assert_no_directory "#{application_path}/db/migrate"
assert_no_directory "#{application_path}/storage"
assert_no_directory "#{application_path}/tmp/storage"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册