This behaviour seems strange to me:
$ rake db:create
# => creates project_dev AND project_test databases
$ rake db:drop
# => only drops the project_dev database (as expected)
$ RAILS_ENV=test rake db:drop
# => this effectively drops the project_test database (as expected)
Seems in conflict with this description:
$ rake -T db:create
rake db:create # Create the database from config/database.yml for the
(use db:create:all to create all dbs i...
$ rake -T db:drop
rake db:drop # Drops the database for the current Rails.env
(use db:drop:all to drop all databases)
If this is not the intended behaviour, I can submit a bug report in
rails-core and probably work up a patch too. Catting my Gemfile here
(just did bundle update with this):
$ cat Gemfile
gem 'rails', '3.0.4'
gem 'pg', '0.10.1'
group :development, :test do
gem 'rspec-rails', '>= 2.0.0'
gem 'cucumber-rails', '>= 0.3.2'
gem 'webrat', '>= 0.7.2'