Skip to content

Instantly share code, notes, and snippets.

@steve9001
Created April 27, 2012 14:46
Show Gist options
  • Save steve9001/2509844 to your computer and use it in GitHub Desktop.
Save steve9001/2509844 to your computer and use it in GitHub Desktop.
db:test:prepare weirdness
desc "db:test:prepare makes the connected db different from the one implied by Rails.env"
task :foo => :environment do
puts Rails.env #development
puts User.count #1
Rake::Task["db:test:prepare"].invoke
puts Rails.env #??
puts User.count #??
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment