2012-07-30 74 views
0

Rspec書說,運行cucumber features -n命令。但它是從黃瓜源給下面的錯誤錯誤與:黃瓜功能-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

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

+0

會'-n .'怎麼辦? – 2012-07-30 12:35:40

+1

我不明白你在做什麼?!如果你想運行所有的功能,只需跳過這個選項! – phoet 2012-07-30 12:47:08