在我cucumber.yml我試圖增加該選項(default: --drb --format progress
),但它返回一個錯誤:當我把它在括號黃瓜「--format進步」不工作
Exception encountered: #<ArgumentError: wrong number of arguments (3 for 2)
Error creating formatter: progress>
default: --drb --"format progress"
它不會幫助:
invalid option: --format progress (OptionParser::InvalidOption)
所以也許沒有選擇,但it should be
和「格式相當」正常工作,沒有任何支架。 我不想看到控制檯中的所有場景,但只是哪個有錯誤,也許還有另一種方法可以做到這一點。
完全跟蹤:
wrong number of arguments (3 for 2)
Error creating formatter: progress (ArgumentError)
/home/alder/.rvm/gems/[email protected]/gems/activerecord-3.1.0/lib/active_record/base.rb:1543:in `initialize'
/home/alder/.rvm/gems/[email protected]/gems/cucumber-1.1.0/lib/cucumber/cli/configuration.rb:168:in `new'
/home/alder/.rvm/gems/[email protected]/gems/cucumber-1.1.0/lib/cucumber/cli/configuration.rb:168:in `block in formatters'
/home/alder/.rvm/gems/[email protected]/gems/cucumber-1.1.0/lib/cucumber/cli/configuration.rb:163:in `map'
/home/alder/.rvm/gems/[email protected]/gems/cucumber-1.1.0/lib/cucumber/cli/configuration.rb:163:in `formatters'
/home/alder/.rvm/gems/[email protected]/gems/cucumber-1.1.0/lib/cucumber/cli/configuration.rb:68:in `build_tree_walker'
/home/alder/.rvm/gems/[email protected]/gems/cucumber-1.1.0/lib/cucumber/runtime.rb:42:in `run!'
/home/alder/.rvm/gems/[email protected]/gems/cucumber-1.1.0/lib/cucumber/cli/main.rb:43:in `execute!'
/home/alder/.rvm/gems/[email protected]/gems/cucumber-1.1.0/lib/cucumber/cli/main.rb:20:in `execute'
/home/alder/.rvm/gems/[email protected]/gems/cucumber-1.1.0/bin/cucumber:14:in `<top (required)>'
/home/alder/.rvm/gems/[email protected]/bin/cucumber:19:in `load'
/home/alder/.rvm/gems/[email protected]/bin/cucumber:19:in `<main>'
,如果我寫cucumer.yml錯誤略有不同的選項:
Exception encountered: #<ArgumentError: wrong number of arguments (3 for 2)
Error creating formatter: progress>
backtrace:
/home/alder/.rvm/gems/[email protected]/gems/activerecord-3.1.0/lib/active_record/base.rb:1543:in `initialize'
/home/alder/.rvm/gems/[email protected]/gems/cucumber-1.1.0/lib/cucumber/cli/configuration.rb:168:in `new'
/home/alder/.rvm/gems/[email protected]/gems/cucumber-1.1.0/lib/cucumber/cli/configuration.rb:168:in `block in formatters'
/home/alder/.rvm/gems/[email protected]/gems/cucumber-1.1.0/lib/cucumber/cli/configuration.rb:163:in `map'
/home/alder/.rvm/gems/[email protected]/gems/cucumber-1.1.0/lib/cucumber/cli/configuration.rb:163:in `formatters'
/home/alder/.rvm/gems/[email protected]/gems/cucumber-1.1.0/lib/cucumber/cli/configuration.rb:68:in `build_tree_walker'
/home/alder/.rvm/gems/[email protected]/gems/cucumber-1.1.0/lib/cucumber/runtime.rb:42:in `run!'
/home/alder/.rvm/gems/[email protected]/gems/cucumber-1.1.0/lib/cucumber/cli/main.rb:43:in `execute!'
/home/alder/.rvm/gems/[email protected]/gems/spork-0.9.0.rc9/lib/spork/test_framework/cucumber.rb:24:in `run_tests'
/home/alder/.rvm/gems/[email protected]/gems/spork-0.9.0.rc9/lib/spork/run_strategy/forking.rb:13:in `block in run'
/home/alder/.rvm/gems/[email protected]/gems/spork-0.9.0.rc9/lib/spork/forker.rb:21:in `block in initialize'
/home/alder/.rvm/gems/[email protected]/gems/spork-0.9.0.rc9/lib/spork/forker.rb:18:in `fork'
/home/alder/.rvm/gems/[email protected]/gems/spork-0.9.0.rc9/lib/spork/forker.rb:18:in `initialize'
/home/alder/.rvm/gems/[email protected]/gems/spork-0.9.0.rc9/lib/spork/run_strategy/forking.rb:9:in `new'
/home/alder/.rvm/gems/[email protected]/gems/spork-0.9.0.rc9/lib/spork/run_strategy/forking.rb:9:in `run'
/home/alder/.rvm/gems/[email protected]/gems/spork-0.9.0.rc9/lib/spork/server.rb:48:in `run'
/home/alder/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/drb/drb.rb:1558:in `perform_without_block'
/home/alder/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/drb/drb.rb:1518:in `perform'
/home/alder/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/drb/drb.rb:1592:in `block (2 levels) in main_loop'
/home/alder/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/drb/drb.rb:1588:in `loop'
/home/alder/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/drb/drb.rb:1588:in `block in main_loop'
我的方式有叉勺也許這是一個問題。
太棒了!非常感謝這樣的詳細回覆,我只是在'env'中添加'require'並且它可以工作! – zishe