title: How do I force RAILS_ENV in a rake task?
body: <p>I have this little rake task: </p>
  
  <pre><code>namespace :db do 
    namespace :test do 
      task :reset do 
        ENV['RAILS_ENV'] = "test" 
        Rake::Task['db:drop'].invoke
        Rake::Task['db:create'].invoke
        Rake::Task['db:migrate'].invoke
      end
    end
  end
  </code></pre>
  
  <p>Now, when I execute, it will ignore the RAILS_ENV I tried to hard-code. How do I make this task work as expected  </p>