aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/rake
diff options
context:
space:
mode:
authorschneems <richard.schneeman@gmail.com>2014-01-01 14:21:56 -0500
committerschneems <richard.schneeman@gmail.com>2014-01-01 17:48:24 -0500
commit9749e0efbfc22f8b0525357024ec362b01b80209 (patch)
tree166da22bcb406cdf04fde23e5c0643b32d13bc31 /railties/test/application/rake
parent358abe4524ca0ccaa35d255fb090a269b1df35f0 (diff)
downloadrails-9749e0efbfc22f8b0525357024ec362b01b80209.tar.gz
rails-9749e0efbfc22f8b0525357024ec362b01b80209.tar.bz2
rails-9749e0efbfc22f8b0525357024ec362b01b80209.zip
Move default production database to URL sub key
By using the URL sub key in the `database.yml` by default we are exposing the ability to set other attributes such as `pool` or `reap_frequency` without need of modifying the URL to contain non-connection specific information.
Diffstat (limited to 'railties/test/application/rake')
-rw-r--r--railties/test/application/rake/dbs_test.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/railties/test/application/rake/dbs_test.rb b/railties/test/application/rake/dbs_test.rb
index 0f4f01df1b..9868707570 100644
--- a/railties/test/application/rake/dbs_test.rb
+++ b/railties/test/application/rake/dbs_test.rb
@@ -24,7 +24,11 @@ module ApplicationTests
# 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'] => %Q{<%= ENV['RAILS_DATABASE_URL'] %>}}.to_yaml
+ yaml = <<-YAML.strip_heredoc
+ #{ENV['RAILS_ENV']}:
+ url: <%= ENV['RAILS_DATABASE_URL'] %>
+ YAML
+ f << yaml
end
end