[rspec-users] first cut at blockless given/when/then

Wincent Colaiuta win at wincent.com
Thu Oct 18 13:23:03 EDT 2007

El 18/10/2007, a las 18:42, "David Chelimsky" <dchelimsky at gmail.com>  

> Easier to type, sure. I'm not in love w/ the names yet though because
> they sound like verb phrases - "given matcher", "when matcher", "then
> matcher".
> How about something like match_given, match_when, match_then?

That would be fine too. I mainly just wanted to avoid having to  
manually pass the symbol in.

Another alternative combining your suggestion with what Pat mentioned:

step_matchers do |match|
   match.given ...
   match.when ...
   match.then ...

Which has the nice side-effect of the user being able to say  
"matcher" or "m" or "foo" if he or she wants.


More information about the rspec-users mailing list