0

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>'
4

1 回答 1

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

于 2012-07-30T12:24:58.163 回答