Adopting two puppies

45 views
Skip to first unread message

Tatyana Djambazoff

unread,
Mar 31, 2015, 5:39:07 PM3/31/15
to cucumber-...@googlegroups.com
In general, is it ok to have in one directory files with almost the same features and step definitions?
My test_puppies project:

When I try to run one of features files, I get the error messages: 
"Cucumber::Ambiguous: Ambiguous match of "I am on the puppy adopting site":

features/step_definitions/adopting_puppy_steps.rb:1:in `/^I am on the puppy adopting site$/'
features/step_definitions/adopting_two_puppies.rb:2:in `/^I am on the puppy adopting site$/'
........etc"

If you need, I can send you all features and step definitions files!

Thank you in advance for your time!!!

Tatyana

Tatyana Djambazoff

unread,
Mar 31, 2015, 5:58:48 PM3/31/15
to cucumber-...@googlegroups.com
Just to add:
adopting_puppy.feature and adopting_two_puppies.feature are working fine, when only one of them is in the directory.

(hopefully, I clearly express myself)

Cheezy

unread,
Apr 1, 2015, 7:06:22 AM4/1/15
to cucumber-...@googlegroups.com
It is ok to have almost the same step definition but it is not ok to have the exact same step definition.
The error you got is simply stating that two different step definitions match a line in the feature file
and therefore Cucumber doesn't know which one to run.
Reply all
Reply to author
Forward
0 new messages