In our project, if you run rake test
, terrible things happen; you need to run rake spec
. I can't seem to figure out how to re-define rake test
to just output a message suggesting running rake spec
instead.
How can I do this?
Rake is a software task management and build automation tool created by Jim Weirich. It allows the user to specify tasks and describe dependencies as well as to group tasks in a namespace. It is similar in to SCons and Make.
Including => :environment will tell Rake to load full the application environment, giving the relevant task access to things like classes, helpers, etc. Without the :environment , you won't have access to any of those extras.
On your Rakefile at the end:
Rake::Task["test"].clear
task 'test' do
puts "use 'rake spec'"
end
Or even better
Rake::Task["test"].clear
task 'test' do
Rake::Task["spec"].invoke
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With