Over a million developers have joined DZone.

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')
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}