diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-17 10:00:37 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-17 10:00:37 +0000 |
commit | 154668898aadef2d98093cd3c2b7c895fff8b7a6 (patch) | |
tree | 81a21e08ceb86f9475ef23259e25311ddec435a5 | |
parent | 78d8503a94f043a932fea7321dbae262eb4a5c8b (diff) | |
download | rails-154668898aadef2d98093cd3c2b7c895fff8b7a6.tar.gz rails-154668898aadef2d98093cd3c2b7c895fff8b7a6.tar.bz2 rails-154668898aadef2d98093cd3c2b7c895fff8b7a6.zip |
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
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rwxr-xr-x | railties/fresh_rakefile | 2 |
2 files changed, 3 insertions, 1 deletions
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"] |