Skip to content

Commit a0a8d1c

Browse files
fxnrafaelfranca
authored andcommitted
overwrite config.cache_classes in app generator
1 parent 0e231fb commit a0a8d1c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/spring/test/application_generator.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ def generate_files
6969
append_to_file(application.gemfile, "gem 'sqlite3', '< 1.4'")
7070
end
7171

72+
rewrite_file(application.path("config/environments/test.rb")) do |c|
73+
c.sub!(/config\.cache_classes\s*=\s*true/, "config.cache_classes = false")
74+
c
75+
end
76+
7277
if application.path("bin").exist?
7378
FileUtils.cp_r(application.path("bin"), application.path("bin_original"))
7479
end

0 commit comments

Comments
 (0)