[rspec-users] Help with regexp in matcher

James Byrne lists at ruby-forum.com
Wed Jan 14 11:21:07 EST 2009

Matt Wynne wrote:

> I actually rather like the unambiguous, and jargon-free 'current
> authenticated session' phraseology, but I'm not one of your users, so
> that doesn't really matter!

I do too, but I am not the president either...

> I have one more suggestion. From all these different ways of saying
> the same thing, pick a winner, then write a regexp step that catches
> all the possible alternative ways of expressing it you can think of,
> and raises an error saying "did you mean 'current authenticated
> session'" (or whatever).

That is a very good idea.  Yesterday, I caught myself about to write 
another multi-matching step definition regexp and I said, uuummm... 
better not.  But catching those type of variants and failing the step 
with a meaningful warning message might just be the answer to this.

Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list