我正在铁轨上学习黄瓜/水豚。我正在开发一个期望从表中显示排序数据的场景。我无法弄清楚这个消息:
pending#用您希望的代码表达上面的正则表达式
我有这张桌子:
| 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
感谢您的帮助。
答案 0 :(得分:0)
您需要正确定义步骤,缺少步骤定义中的“要查看”