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:

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

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

{{ parent.tldr }}

{{ parent.urlSource.name }}