Mentimun: langkah tidak ditentukan, meskipun langkahnya harus ditentukan

Saya telah membuat langkahnya:

    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

Dan saya menjalankan tes mentimun dengan:

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 

Status mentimun:

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

Aku hanya tidak bisa melihat apa yang salah dengan langkahku. Apa yang saya lewatkan? Terima kasih sebelumnya, Emil


person Soroush Hakami    schedule 26.10.2010    source sumber


Jawaban (1)


Dalam langkah Anda, Anda memerlukan " " di sekitar Twitter jadi gunakan hal yang sama tentang 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"
person shingara    schedule 26.10.2010
comment
Terima kasih banyak, tidak percaya saya melewatkannya. - person Soroush Hakami; 26.10.2010
comment
rubular.com adalah sumber daya yang bagus untuk membantu memecahkan masalah definisi langkah yang cocok dengan langkah Anda. - person burtlo; 12.11.2010