Now I am using thor in a rails project.
I wrote these codes:
lib/tasks/my_task.rb
require 'thor'
module Tasks
class MyTask < Thor
desc 'My Batch', 'This is my awesome batch'
option :date
def execute(type)
# do_something
end
end
end
Tasks::MyTask.start(ARGV)
spec/lib/tasks/my_task_spec.rb
# do_some_test
The problem is when I run bundle exec rspec
, it showed:
Run options: exclude {:heavy=>true}
..................................................................................................................................................................................................****************************...................................................
........................................................************.......................................................................................................................................................................................................******
***..............................................................................................................Commands:
rspec help [COMMAND] # Describe available commands or one specific command
rspec My Batch # This is my awesome batch
.................................................................................................................................................................................................................................................................................
.............................................................................................................................................................................................................................
Why the desc messages been shown here? How to config to remove them?
Aucun commentaire:
Enregistrer un commentaire