Created
October 11, 2011 21:16
Revisions
-
jesscanady created this gist
Oct 11, 2011 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ # Rails.root/lib/tasks/test.rake Rake.application.remove_task 'db:test:prepare' namespace :db do namespace :test do task :set_env do end task :prepare => [:set_env, :environment] do |t| # this would normally drop the entire DB. # Let's make sure we're connected to the test db and then only truncate the tables we want. ActiveRecord::Base.establish_connection(ActiveRecord::Base.configurations['test']) Form.delete_all Question.delete_all Option.delete_all end end end