Created
August 14, 2009 08:33
-
-
Save ariejan/167721 to your computer and use it in GitHub Desktop.
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 characters
require File.join(Rails.root, 'lib', 'rake_remove_task') | |
# Override 'rake test' to run rspec and cucumber instead of TestUnit | |
remove_task :test | |
desc "Run RSpec and Cucumber tests" | |
task :test => [:spec, :features] |
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 characters
# This little nugget will remove an existing rake task. This allows you to | |
# redefine tasks. | |
# | |
# remove_task :test | |
# task :test => [:spec, :features] | |
# | |
Rake::TaskManager.class_eval do | |
def remove_task(task_name) | |
@tasks.delete(task_name.to_s) | |
end | |
end | |
def remove_task(task_name) | |
Rake.application.remove_task(task_name) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment