我正在描述隨機繪圖的行爲。要做到這一點,我想寫一個像這樣的場景:黃瓜/水豚表中的變量
Scenario: Request a drawing
Given a drawing list has been created
And there is a drawing code for today
And no emails have been sent
Then "[email protected]" should have no emails
And "[email protected]" should have no emails
When I go to the drawing page
Then I should see "Special Drawing"
And the title should be "Special Drawing"
And I fill in the following:
|Promotion code |#{@drawings.code}|
最後一行是我朦朧的那一行。我有一個步驟可以創建一個能夠使@drawings.code
成爲有效表達式的ivar,但是我只是隨機地將插值語法放在那裏以說明就像要做的那樣。
問題是,我不知道代碼,直到執行第二個給定時才確定。什麼是檢索它的最好方法?
由於
- 導軌(3.0.3)
- 黃瓜(0.10.0)
- 黃瓜導軌(0.3.2)
- 水豚(0.4.0)
您是否試圖將該表視爲first-col = name,second-col = value?或者在單行下方會有其他值? – Andy 2012-01-21 04:42:34