黄瓜耙黄瓜:好的 - 错误

时间:2011-06-04 23:28:17

标签: ruby-on-rails ruby-on-rails-3 cucumber gherkin

我跑步时遇到错误:耙黄瓜:好的 你能告诉我如何解决以下错误吗?

我正在使用的Gem版本:

rails Rails 3.0.8.rc4
rspec 2.6.3
cucumber 0.10.3

我跑的错误:rake cucumber:ok

[ticketee (master)]$ rake cucumber:ok
/Users/duser/.rvm/rubies/ruby-1.9.2-p180/bin/ruby -S bundle exec cucumber --profile default
Using the default profile...
features/creating_projects.feature: Lexing error on line 12: '%%_FEATURE_END_%%'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information. (Gherkin::Lexer::LexingError)
/Users/duser/.rvm/gems/ruby-1.9.2-p180/gems/gherkin-2.3.10/lib/gherkin/lexer/i18n_lexer.rb:23:in `scan'
/Users/duser/.rvm/gems/ruby-1.9.2-p180/gems/gherkin-2.3.10/lib/gherkin/lexer/i18n_lexer.rb:23:in `scan'
/Users/duser/.rvm/gems/ruby-1.9.2-p180/gems/gherkin-2.3.10/lib/gherkin/parser/parser.rb:31:in `parse'
/Users/duser/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.3/lib/cucumber/feature_file.rb:37:in `parse'
/Users/duser/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.3/lib/cucumber/runtime/features_loader.rb:28:in `block in load'
/Users/duser/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.3/lib/cucumber/runtime/features_loader.rb:26:in `each'
/Users/duser/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.3/lib/cucumber/runtime/features_loader.rb:26:in `load'
/Users/duser/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.3/lib/cucumber/runtime/features_loader.rb:14:in `features'
/Users/duser/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.3/lib/cucumber/runtime.rb:132:in `features'
/Users/duser/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.3/lib/cucumber/runtime.rb:45:in `run!'
/Users/duser/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.3/lib/cucumber/cli/main.rb:43:in `execute!'
/Users/duser/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.3/lib/cucumber/cli/main.rb:20:in `execute'
/Users/duser/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.3/bin/cucumber:14:in `<top (required)>'
/Users/duser/.rvm/gems/ruby-1.9.2-p180/bin/cucumber:19:in `load'
/Users/duser/.rvm/gems/ruby-1.9.2-p180/bin/cucumber:19:in `<main>'
rake aborted!
Command failed with status (1): [/Users/duser/.rvm/rubies/ruby-1.9.2-p18...]

Tasks: TOP => cucumber:ok
(See full trace by running task with --trace)
[ticketee (master)]$

features / creating_projects.feature

的内容
Feature: Creating projects 
In order to have projects to assign tickets to 
As a user I want to create them easily 
Scenarios: Creating a project 
  Given I am on the homepage 
  When I follow "New Project" 
  And I fill in "Name" with "Text Mate 2" 
  And I press "Create Project" 
  Then I should see "Project has been created"


我发现了问题:

  

在features / creating_projects.feature文件中,我有“Scenarios:”,它应该是“Scenario:”。这就是错误的原因。

1 个答案:

答案 0 :(得分:0)

您在features / creating_projects.feature的第12行有lexing error,最有可能在功能定义的末尾。您在文件中使用了正确的语法吗?