Created
October 1, 2012 17:21
-
-
Save agraves/3813150 to your computer and use it in GitHub Desktop.
Regain control over default Rake task from Rspec
This file contains 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
# Add your own tasks in files placed in lib/tasks ending in .rake, | |
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. | |
require File.expand_path('../config/application', __FILE__) | |
require 'rake' | |
require 'rake/testtask' | |
Web::Application.load_tasks | |
Rake::TestTask.new do |t| | |
t.pattern = 'test/**/*.rb' | |
t.libs.push 'test' | |
end | |
Rake.application.instance_variable_get('@tasks').delete('default') | |
task :default => [:spec, :test] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Line 15 is due to this: rspec/rspec-rails#123