0

我正在尝试进行黄瓜测试,但出现了一个奇怪的错误!与gem 'cucumber-rails', '1.0.6'

features/hidden_links.feature: Parse error at features/hidden_links.feature:1. Found scenario when expecting one of: comment, feature, tag. (Current state: root). (Gherkin::Parser::ParseError)

hidden_​​links.feature

Scenario: Edit project link is hidden for non-signed-in users
  Given I am on the homepage
  When I follow "TextMate 2"
  Then I should not see the "Edit Project" link

Scenario: Edit project link is hidden for signed-in user
  Given I am signed in as "user@ticketee.com"
  When I follow "TextMate 2"
  Then I should not see the "Edit Project" link

Scenario: Edit project link is shown to admin
  Given I am signed in as "admin@ticketee.com"
  When I follow "TextMate 2"
  Then I should see the "Edit Proeject" link

Scenario: Delete project link is hidden for non-signed-in users
  Given I am on the homepage
  When I follow "TextMate 2"
  Then I should not see the "Delete Project" link

Scenario: Delete project link is hidden for signed-in users
  Given I am signed in as "user@ticketee.com"
  When I follow "TextMate 2"
  Then I should not see the "Delete Project" link

Scenario: Delete project link is shown to admins
  Given I am signed in as "admin@ticketee.com"
  When I follow "TextMate 2"
  Then I should see the "Delete Project" link
4

1 回答 1

3

功能文件应该从 Feature 关键字开始,而不是从 Scenario 开始

Feature: Hidden links
于 2013-08-31T18:21:25.100 回答