Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed that purge_test_database would use database settings from the d…

…evelopment 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
  • Loading branch information...
commit 154668898aadef2d98093cd3c2b7c895fff8b7a6 1 parent 78d8503
@dhh dhh authored
Showing with 3 additions and 1 deletion.
  1. +2 −0  railties/CHANGELOG
  2. +1 −1  railties/fresh_rakefile
View
2  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
View
2  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"]
Please sign in to comment.
Something went wrong with that request. Please try again.