Огурец: неопределенный шаг, хотя шаг должен быть определен

Я создал шаг:

    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

Я просто не вижу, что не так с моим шагом. Что мне не хватает? Заранее спасибо, Эмиль


person Soroush Hakami    schedule 26.10.2010    source источник


Ответы (1)


На вашем этапе вам понадобится " " в Твиттере, так что используйте его и в Маджбрасе.

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"
person shingara    schedule 26.10.2010
comment
Большое спасибо, не могу поверить, что пропустил это. - person Soroush Hakami; 26.10.2010
comment
rubular.com – отличный ресурс для устранения неполадок в определениях шагов, соответствующих вашим шагам. - person burtlo; 12.11.2010