0
我正在學習鐵軌上的黃瓜/水豚。我正在研究一個預期從表中顯示排序數據的場景。我想不通這樣的信息:黃瓜欄試驗結果
未決#表達上面代碼中的正則表達式,你希望你有
我有這個表:
| title | rating | release_date |
| Aladdin | G | 25-Nov-1992 |
| The Terminator | R | 26-Oct-1984 |
| When Harry Met Sally | R | 21-Jul-1989 |
| The Help | PG-13 | 10-Aug-2011 |
| Chocolat | PG-13 | 5-Jan-2001 |
| Amelie | R | 25-Apr-2001 |
| 2001: A Space Odyssey | G | 6-Apr-1968 |
| The Incredibles | PG | 5-Nov-2004 |
| Raiders of the Lost Ark | PG | 12-Jun-1981 |
| Chicken Run | G | 21-Jun-2000 |
下面是我的步驟定義:
When(/^I clicked "(.*?)"$/) do |arg1|
if arg1 == "Movie Title"
click_link ("title_header")
end
end
Then(/^I expect "(.*)" before "(.*)"$/) do |arg1, arg2|
assert page.body.expect =~ /arg1.*arg2/
end
我試圖解決的消息如下:
您可以使用這些片段實現未定義步驟的步驟定義:
Then(/^I expect to see "(.*?)" before "(.*?)"$/) do |arg1, arg2|
pending # express the regexp above with the code you wish you had
end
感謝您的幫助。
顯然我沒有注意到這一點。謝謝湯姆。 – user5415750