These are chat archives for cucumber/cucumber-ruby

May 2015
May 19 2015 14:41


After filtering a list of movies, I am trying to write a cucumber step definition to check whether each column of that table contains the correct values. For example,

When I check "PG" Then ratings within Movies should contain PG.

The step definition I am using reads:

Then /^the "([^]*) field(?: within (.*))? should contain "([^]*)$/

But I receiving this error message: "Ambiguous match of "the "ratings" field with "table#movies" should contain "PG"

I am unsure what the error is suggesting and similarly unclear on what I am doing wrong.

Steve Tooke
May 19 2015 16:14
Hey @newom - cucumber is telling you that you have multiple step definitions that match with your step text.
May 19 2015 17:22
Thanks. But could there be something else going wrong? I am looking at the step definitions, and there is only one containing the syntax Then the "X" field within "Y" should contain "Z."
Could it be due to the fact that there are multiple rows, and thus multiple "X" fields within the "Y" that contain "Z"?
May 19 2015 17:29
Also, I just ran in guess mode, and was notified, unable to find "ratings" field