Skip to content

Instantly share code, notes, and snippets.

@ariejan
Created August 14, 2009 08:33
Show Gist options
  • Save ariejan/167721 to your computer and use it in GitHub Desktop.
Save ariejan/167721 to your computer and use it in GitHub Desktop.
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 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