我已经创建了以下步骤:
Given /^the feed "([^"]*)" has an item "([^"]*)" published at "([^"]*)"$/ do |feed_name, feed_item_title, published_at|
feed = Feed.find_by_name(feed_name)
FeedItem.make(:feed => feed, :title => feed_item_title, :published_at => published_at)
end
我用以下命令运行黄瓜测试:
Scenario: feed items should be sorted by date
Given I am signed into an account called "GT" as a customer
And there is a social feed called "Twitter" for the account "GT"
And the feed Twitter has an item Majbrasa published at "2010-05-01"
--- more follows
黄瓜指出:
7 steps (4 skipped, 1 undefined, 2 passed)
You can implement step definitions for undefined steps with these snippets:
Given /^the feed Twitter has an item Majbrasa published at "([^"]*)"$/ do |arg1|
pending # express the regexp above with the code you wish you had
end
我只是看不出我的脚步出了什么问题。我缺少什么?
预先感谢,埃米尔
在您的步骤中,您需要 Twitter 周围的“ ”,因此对于 Majbrasa 也使用相同的内容
Scenario: feed items should be sorted by date
Given I am signed into an account called "GT" as a customer
And there is a social feed called "Twitter" for the account "GT"
And the feed "Twitter" has an item "Majbrasa" published at "2010-05-01"
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)