Cucumber rails test result -
i learning cucumber / capybara on rails. working on scenario expects display sorted data table. cannot figure out message:
pending # express regexp above code wish had
i have table:
| title | rating | release_date | | aladdin | g | 25-nov-1992 | | terminator | r | 26-oct-1984 | | when harry met sally | r | 21-jul-1989 | | | pg-13 | 10-aug-2011 | | chocolat | pg-13 | 5-jan-2001 | | amelie | r | 25-apr-2001 | | 2001: space odyssey | g | 6-apr-1968 | | incredibles | pg | 5-nov-2004 | | raiders of lost ark | pg | 12-jun-1981 | | chicken run | g | 21-jun-2000 |
below step definition:
when(/^i clicked "(.*?)"$/) |arg1| if arg1 == "movie title" click_link ("title_header") end end then(/^i expect "(.*)" before "(.*)"$/) |arg1, arg2| assert page.body.expect =~ /arg1.*arg2/ end
the message again trying resolve below:
you can implement step definitions undefined steps these snippets:
then(/^i expect see "(.*?)" before "(.*?)"$/) |arg1, arg2| pending # express regexp above code wish had end
thank help.
you need define step correctly, missing 'to see' in step definition
Comments
Post a Comment