我大部分时间都按照这些说明进行了调整: http://lindsaar.net/2010/5/9/Getting-Rails-3-Edge-with-jQuery-RSpec-and-Cucumber-using-RVM
如果我创建一个完全空白的.feature文件,运行黄瓜会导致此错误:
黄瓜
错误的参数数量(3表示1) (引发ArgumentError) /gems/gherkin-2.0.2/lib/gherkin/parser/parser.rb:125:in
scan' /gems/gherkin-2.0.2/lib/gherkin/parser/parser.rb:125:in
transition_table” /gems/gherkin-2.0.2/lib/gherkin/parser/parser.rb:112:inbuild_transition_map' /gems/gherkin-2.0.2/lib/gherkin/parser/parser.rb:108:in
transition_map” /gems/gherkin-2.0.2/lib/gherkin/parser/parser.rb:75:ininitialize' /gems/gherkin-2.0.2/lib/gherkin/parser/parser.rb:52:in
new' /gems/gherkin-2.0.2/lib/gherkin/parser/parser.rb:52:inpush_machine' /gems/gherkin-2.0.2/lib/gherkin/parser/parser.rb:20:in
initialize' /gems/cucumber-0.8.3/bin/../lib/cucumber/feature_file.rb:32:innew' /gems/cucumber-0.8.3/bin/../lib/cucumber/feature_file.rb:32:in
解析” /gems/cucumber-0.8.3/bin/../lib/cucumber/step_mother.rb:62:inload_plain_text_features' /gems/cucumber-0.8.3/bin/../lib/cucumber/step_mother.rb:60:in
每个” /gems/cucumber-0.8.3/bin/../lib/cucumber/step_mother.rb:60:inload_plain_text_features' /gems/cucumber-0.8.3/bin/../lib/cucumber/cli/main.rb:55:in
执行!” /gems/cucumber-0.8.3/bin/../lib/cucumber/cli/main.rb:25:inexecute' /gems/cucumber-0.8.3/bin/cucumber:8 /bin/cucumber:19:in
负载” / bin中/黄瓜:19
有趣的是,如果我注释掉features / support / env.rb文件,我就不会收到错误。虽然这对我没什么好处。我可以成功运行该网站(它是空的)。任何人都可以想到为什么env代码会杀死小黄瓜解析器?我有点太新了,不知道接下来要去哪儿。
感谢。 -Jeff
答案 0 :(得分:0)
这个是否已经为我解答了。这是最新的黄瓜和小黄瓜之间的不相容。需要将我的gemfile改为:
宝石“黄瓜” 宝石“小黄瓜”,“= 2.1.4” gem“cucumber-rails”