I have created the step:
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
And I run the cucumber test with:
Scenario: feed items should be sorted by date
开发者_C百科 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
Cucumber states:
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
I just can't see what's wrong with my step. What is it that I'm missing? Thanks in advance, Emil
In your step you need the " " around Twitter so use it same about 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"
精彩评论