-1
我還是比較新的rails。目前卡在這一步:Rails黃瓜場景
And I should see "THX-1138"
以前令人驚訝的通過。然而,我被困在快樂之路的最後一步。下面是我的錯誤的描述:
Then I should be on the Similar Movies page for "Star Wars" # features/step_definitions/web_steps.rb:230
And I should see "THX-1138" # features/Search_movie_by_director.feature:25
Ambiguous match of "I should see "THX-1138"":
features/step_definitions/movie_steps.rb:12:in `/^(?:|I)should see "([^"]*)"$/'
features/step_definitions/web_steps.rb:105:in `/^(?:|I)should see "([^"]*)"$/'
You can run again with --guess to make Cucumber be more smart about it
(Cucumber::Ambiguous)
features/Search_movie_by_director.feature:25:in `And I should see "THX-1138"'
在我paths.rb我已經輸入:
When /the Similar Movies page for "(.*)"/
"/movies/the_same_director/xxx%20XXX"
在我的電影的步驟(懷疑這個相關的)我已經輸入:
Then /^(?:|I)should see "([^"]*)"$/ do |title|
if page.respond_to? :should
page.should have_content(title)
else
assert page.has_content?(title)
end
end
最後,在我的movie_controller.rb:
def the_same_director
#left it empty for I think its relevant to the happy scenerio
end
願有人請指點我正確的方向?
感謝凱爾及時的反饋! – user3435842 2014-12-03 17:13:05