2010-10-26 5 views
1

J'ai créé l'étape:concombre: pas non défini, bien que l'étape devrait être définie

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 

Et je le test de concombre avec:

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 

Etats Concombre:

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 

Je ne peux pas voir ce qui ne va pas avec mon pas. Qu'est-ce qui me manque? Merci à l'avance, Emil

Répondre

2

Dans votre étape, vous devez le « » autour de Twitter afin de l'utiliser même à propos 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" 
+0

Merci un groupe, ne peut pas croire que j'ai raté. –

+0

http://rubular.com/ est une excellente ressource pour vous aider à résoudre vos étapes de définition correspondant à vos démarches. – burtlo

Questions connexes