错误:cucumber features -n命令

时间:2012-07-30 12:09:35

标签: ruby cucumber

Rspec书说要运行cucumber features -n命令。但它给出了以下错误

missing argument: -n (OptionParser::MissingArgument)
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/gems/cucumber-    1.2.1/lib/cucumber/cli/options.rb:119:in `parse!'
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/gems/cucumber-1.2.1/lib/cucumber/cli/configuration.rb:25:in `parse!'
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/gems/cucumber-1.2.1/lib/cucumber/cli/main.rb:55:in `configuration'
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/gems/cucumber-1.2.1/lib/cucumber/cli/main.rb:63:in `run_drb_client'
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/gems/cucumber-1.2.1/lib/cucumber/cli/main.rb:34:in `execute!'
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/gems/cucumber-1.2.1/lib/cucumber/cli/main.rb:20:in `execute'
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/gems/cucumber-1.2.1/bin/cucumber:14:in `<top (required)>'
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/bin/cucumber:19:in `load'
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/bin/cucumber:19:in `<main>'
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/bin/ruby_noexec_wrapper:14:in `eval'
/Users/pajama/.rvm/gems/ruby-1.9.2-p320/bin/ruby_noexec_wrapper:14:in `<main>'

1 个答案:

答案 0 :(得分:1)

来自黄瓜来源:

opts.on("-n NAME", "--name NAME",
        "Only execute the feature elements which match part of the given name.",
        "If this option is given more than once, it will match against all the",
        "given names.")

因此您需要致电-n name_of_the_feature