Skip to content

Commit d350e04

Browse files
committed
Remove unnecessary --asset-pipeline=sprockets from app generator test
Since we are stubbing bundle commands, we can avoid sprockets side-effects here. This commit also fixes the tests for preservation of sprockets during `app:update`. Due to propshaft being the default, this test was unnecessary.
1 parent 6c7a0e8 commit d350e04

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

railties/test/generators/app_generator_test.rb

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -244,14 +244,6 @@ def test_app_update_does_not_generate_assets_initializer_when_sprockets_and_prop
244244
assert_no_file "app/assets/config/manifest.js"
245245
end
246246

247-
def test_app_update_does_not_generate_manifest_config_when_propshaft_is_used
248-
run_generator [destination_root, "-a", "propshaft"]
249-
run_app_update
250-
251-
assert_file "config/initializers/assets.rb"
252-
assert_no_file "app/assets/config/manifest.js"
253-
end
254-
255247
def test_app_update_does_not_generate_action_cable_contents_when_skip_action_cable_is_given
256248
run_generator [destination_root, "--skip-action-cable"]
257249
run_app_update
@@ -328,8 +320,8 @@ def test_app_update_preserves_skip_system_test
328320
end
329321
end
330322

331-
def test_app_update_preserves_propshaft
332-
run_generator [destination_root, "-a", "propshaft"]
323+
def test_app_update_preserves_sprockets
324+
run_generator [destination_root, "-a", "sprockets"]
333325

334326
FileUtils.cd(destination_root) do
335327
config = "config/environments/production.rb"
@@ -949,7 +941,7 @@ def test_skip_hotwire
949941
end
950942

951943
def test_css_option_with_asset_pipeline_tailwind
952-
generator [destination_root], ["--css=tailwind", "--asset-pipeline=sprockets"]
944+
generator [destination_root], ["--css=tailwind"]
953945
run_generator_instance
954946

955947
assert_includes @rails_commands, "tailwindcss:install", "`tailwindcss:install` expected to be called, but wasn't."
@@ -964,7 +956,7 @@ def test_css_option_with_tailwind_uses_cssbundling_gem_when_using_node
964956
end
965957

966958
def test_css_option_with_asset_pipeline_sass
967-
generator [destination_root], ["--css=sass", "--asset-pipeline=sprockets"]
959+
generator [destination_root], ["--css=sass"]
968960
run_generator_instance
969961

970962
assert_includes @rails_commands, "dartsass:install", "`dartsass:install` expected to be called, but wasn't."
@@ -979,7 +971,7 @@ def test_css_option_with_sass_uses_cssbundling_gem_when_using_node
979971
end
980972

981973
def test_css_option_with_cssbundling_gem
982-
generator [destination_root], ["--css=postcss", "--asset-pipeline=sprockets"]
974+
generator [destination_root], ["--css=postcss"]
983975
run_generator_instance
984976

985977
assert_includes @rails_commands, "css:install:postcss", "`css:install:postcss` expected to be called, but wasn't."

0 commit comments

Comments
 (0)