lib/rails/generators/rails/devcontainer/devcontainer_generator.rb in railties-7.2.2 vs lib/rails/generators/rails/devcontainer/devcontainer_generator.rb in railties-8.0.0.beta1

- old
+ new

@@ -36,12 +36,14 @@ template "devcontainer/compose.yaml", ".devcontainer/compose.yaml" end def update_application_system_test_case return unless options[:system_test] - return unless File.exist?("test/application_system_test_case.rb") - gsub_file("test/application_system_test_case.rb", /^\s*driven_by\b.*/, system_test_configuration) + system_test_case_path = File.expand_path "test/application_system_test_case.rb", destination_root + return unless File.exist? system_test_case_path + + gsub_file(system_test_case_path, /^\s*driven_by\b.*/, system_test_configuration) end def update_database_yml # Only postgresql has devcontainer specific configuration, so only update database.yml if we are using postgres return unless options[:database] == "postgresql"