Never been to DZone Snippets before?

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.0 and Rake 0.6) (See related posts)

This code will remove the prequisitve 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.lookup(:test_units).remove_prerequisite(:prepare_test_database)
Rake::Task.lookup(:test_functional).remove_prerequisite(:prepare_test_database)

You need to create an account or log in to post comments to this site.


Click here to browse all 5147 code snippets

Related Posts