【发布时间】:2010-03-16 02:59:25
【问题描述】:
我同时使用 Cucumber、Webrat 和 Pickle。 当我写一个场景时,我可以这样做:
Given a product exists with title: "Bread"
When I go to the edit page for that product
And I fill in "Title" with "Milk"
And I press "Save changes"
Then I should see "Successfully edited product."
And I should be on that car's page
注意for that product。这是 pickle 提供的东西,对于引用我正在检查是否存在的产品的记录非常方便。但是,最后一行不起作用。
基本上我试图确保我是该记录的显示页面,但由于我没有它的 ID,我不知道如何引用它。
有什么帮助吗? 谢谢!
【问题讨论】:
标签: ruby-on-rails testing cucumber pickle webrat