Cucumber - Ambiguous steps

On Mon, Sep 15, 2008 at 8:55 AM, Joseph W.-2
[email protected] wrote:

I like this much better. -Guiding people to use regexen properly is
better than redefining their semantics.

Well put. Do you mind if I add this David?

Well - it turns out that this is slightly more complicated. The code
example in cucumber has these expressions:

/Three (.*) mice/
/Three blind (.*)/

The proposed hint in the error message (appending $) does not really
apply to this, and trying to cover all of the different possible
reasons for ambiguity in steps seems counter productive to me.

I did make one change
(change Ambiguous to Multiple · dchelimsky/cucumber@ca70b37 · GitHub)
in my fork: I changed Amiguous to Multiple and the error message now
reads:

Multiple step definitions match “Three blind mice”:

./spec/cucumber/step_mother_spec.rb:24:in /Three (.*) mice/' ./spec/cucumber/step_mother_spec.rb:27:in /Three blind (.*)/’

I think this is a bit more clear than Ambiguous (that reads sorta
funny). Aslak - if you agree, go ahead and pull/merge that commit.

David

On Mon, Sep 15, 2008 at 9:34 AM, aslak hellesoy
[email protected] wrote:

I’ve been unable to think of a good example where I would want only a

(erroneous, but intuitive) expectation that in the presence of these
Ambiguous step resolution for “this and "that" and the other thing”:
better than redefining their semantics.

I completely agree. The current story runner fudges with regexps and
it’s really annoying. Raise the bar for regexp education… K-12. :wink:


Zach D.
http://www.continuousthinking.com