[rspec-users] Step matchers

Wincent Colaiuta win at wincent.com
Mon Oct 15 05:25:42 EDT 2007

El 15/10/2007, a las 5:49, rspec-users-request at rubyforge.org escribió:

>>> Actually a parser for this would be quite simple
>> Dead simple. It would also allow us to do away with methods like
>> Given, When and Then, which some people have objected to (because of
>> the capitalization), because the stories are no longer expressed
>> directly in Ruby. Internally, the parser could use a StepFactory  
>> to do
>> things like create_given, create_when, etc (or however we decide to
>> name these).
>> I'm really excited about this idea!
>> Cheers,
>> David
> I'm working with a customer who's got a decent-sized Rails app with
> absolutely 0 lines of test code.  The first thing we'll be doing is
> writing a bunch of user stories together.  I'm going to do it in this
> new format, so I ought to have at least a basic implementation in a
> couple of days as a matter of necessity :)

I've read this thread with some interest but I don't really get  
exactly what's being proposed, in the sense of how this would look in  

- The customer/client (not necessarily with any programming  
knowledge) writes the stories in a format which is (almost) plain text.
- The developer then writes custom "step matchers"; where do they go?
- How much of parsing can be generalized and done by RSpec itself  
without requiring the developer to spend too much time writing the  

Basically the idea of neat and readable stories is very appealing,  
but I don't really understand the mechanics of what's being proposed.  
Can someone please clarify?


More information about the rspec-users mailing list