I mostly followed these instructions to get things spun up: http://lindsaar.net/2010/5/9/Getting-Rails-3-Edge-with-jQuery-RSpec-and-Cucumber-using-RVM
If I create a completely blank .feature file, running cucumber results in this error:
cucumber
wrong number of arguments (3 for 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 开发者_C百科
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
parse' /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
each' /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
execute!' /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
load' /bin/cucumber:19
Interestingly, if I comment out the features/support/env.rb file, I do not get the error. That doesn't do me much good though. I can run the site successfully (It's empty). Can anyone think of why the env code would kill the gherkin parser? I'm a little too new at this to know where to look next.
Thanks. -Jeff
Has this one answered for me. It's an incompatibility between the latest cucumber and gherkin. Needed to alter my gemfile to:
gem "cucumber" gem "gherkin", "= 2.1.4" gem "cucumber-rails"
精彩评论