diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/application/rake/dbs_test.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/railties/test/application/rake/dbs_test.rb b/railties/test/application/rake/dbs_test.rb index 9a36d1ca01..3577aa2e6b 100644 --- a/railties/test/application/rake/dbs_test.rb +++ b/railties/test/application/rake/dbs_test.rb @@ -20,9 +20,12 @@ module ApplicationTests end def set_database_url - ENV['DATABASE_URL'] = File.join("sqlite3://:@localhost", database_url_db_name) + ENV['RAILS_DATABASE_URL'] = File.join("sqlite3://:@localhost", database_url_db_name) # ensure it's using the DATABASE_URL FileUtils.rm_rf("#{app_path}/config/database.yml") + File.open("#{app_path}/config/database.yml", 'w') do |f| + f << {ENV['RAILS_ENV'] => '<%= ENV["RAILS_DATABASE_URL"] %>'}.to_yaml + end end def expected |