0
我有一個失敗的步驟定義。黃瓜步驟定義失敗
從功能下面我有它未能在「這功能有問題」(在標題未定義的局部變量)
Feature: Viewing issue
In order to view the issues for a feature
As a user
I want to see them on that feature's page
Background:
Given there is a release called "Confluence"
And that release has a feature:
| title | description |
| Make it shiny! | Gradients! Starbursts! Oh my! |
And that feature has a issue:
| title | description |
| First Issue | This is a first issue. |
And I am on the homepage
Scenario: Viewing issue for a given feature
When I follow "Confluence"
Then I should see "Standards compliance"
When I follow "Standards compliance"
Then I should see "First Issue"
And I should see "This is a first issue."
我如何爲它編寫傢伙步驟定義。
這就是我對功能的定義和它的偉大工程,但我已經嘗試做同樣的問題的對象和它不工作
Given /^that release has a feature:$/ do |table|
table.hashes.each do |attributes|
@release.features.create!(attributes)
end
end
:
那麼你的黃瓜功能會這樣寫的更好「該功能有問題」的步驟定義。 –