简体   繁体   中英

Rake - Adding to default task

I am using a third party gem that gives me the ability to execute some tests using the rake command:

rake jasminerice:run

Is it possible to include the task as part of default rake task? (ie when I run rake then rake jasminerice:run is added to the rest of my tests). This is required for CI integration.

Any help would be greatly appreciated!

In Rake, tasks can have dependencies. Generally, you can do this:

task :hello do
  puts "hello"
end

task :default => :hello

For your specific problem, you should be able to do this:

task :default => "jasminerice:run"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM