From 154668898aadef2d98093cd3c2b7c895fff8b7a6 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 17 Apr 2005 10:00:37 +0000 Subject: [PATCH] Fixed that purge_test_database would use database settings from the development environment when recreating the test database #1122 [rails@cogentdude.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1187 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/CHANGELOG | 2 ++ railties/fresh_rakefile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 0ff8f05b95..ce8e68e57c 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fixed that purge_test_database would use database settings from the development environment when recreating the test database #1122 [rails@cogentdude.com] + * Added script/benchmarker to easily benchmark one or more statement a number of times from within the environment. Examples: # runs the one statement 10 times diff --git a/railties/fresh_rakefile b/railties/fresh_rakefile index b563af722b..8c765e57e0 100755 --- a/railties/fresh_rakefile +++ b/railties/fresh_rakefile @@ -164,7 +164,7 @@ task :purge_test_database => :environment do abcs = ActiveRecord::Base.configurations case abcs["test"]["adapter"] when "mysql" - ActiveRecord::Base.establish_connection(abcs[RAILS_ENV]) + ActiveRecord::Base.establish_connection(:test) ActiveRecord::Base.connection.recreate_database(abcs["test"]["database"]) when "postgresql" ENV['PGHOST'] = abcs["test"]["host"] if abcs["test"]["host"]