Created
April 27, 2012 14:46
-
-
Save steve9001/2509844 to your computer and use it in GitHub Desktop.
db:test:prepare weirdness
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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