From 361f296d05fb749d351519867921dab824f89b18 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 2 Jan 2024 13:56:31 +0100 Subject: [PATCH] Fix test --- railties/test/generators/scaffold_generator_test.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/railties/test/generators/scaffold_generator_test.rb b/railties/test/generators/scaffold_generator_test.rb index d9c0bb13e60..fa57e8c14bd 100644 --- a/railties/test/generators/scaffold_generator_test.rb +++ b/railties/test/generators/scaffold_generator_test.rb @@ -363,9 +363,11 @@ class ScaffoldGeneratorTest < Rails::Generators::TestCase route_path = File.expand_path("config/routes.rb", destination_root) content = File.read(route_path) - # Remove all of the comments, blank lines, and default health controller from the routes file + # Remove all of the comments, blank lines, and default actions from the routes file content.gsub!(/^ \#.*\n/, "") content.gsub!(/^ get "up".*\n/, "") + content.gsub!(/^ get "service-worker".*\n/, "") + content.gsub!(/^ get "manifest".*\n/, "") content.gsub!(/^\n/, "") File.write(route_path, content)