DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Remove Prereqs In Rake (Rails 1.1 And Rake 0.7)
This code will remove the prequisitive to prepare the test database in Rails. Put it in your Rakefile.
module Rake class Task def remove_prerequisite(task_name) name = task_name.to_s @prerequisites.delete(name) end end end Rake::Task['test:units'].remove_prerequisite('db:test:prepare') Rake::Task['test:functionals'].remove_prerequisite('db:test:prepare')