This commit is contained in:
David Heinemeier Hansson 2024-01-02 13:56:31 +01:00
parent 8ac2af29ad
commit 361f296d05
1 changed files with 3 additions and 1 deletions

View File

@ -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)