[rspec-users] Step matchers

David Chelimsky dchelimsky at gmail.com
Mon Oct 15 08:21:02 EDT 2007

On 10/15/07, Tom Stuart <tom at experthuman.com> wrote:
> On 15 Oct 2007, at 10:25, Wincent Colaiuta wrote:
> > - 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
> > matchers?
> I'm a bit sceptical about all this (not to suggest that Wincent
> necessarily is!). I don't fully grasp the implications of the
> proposal either but superficially it smells like using a sledgehammer
> to crack the rather straightforward nut of having something that
> works like string interpolation.
> What's the problem with the alternating 'string', parameter,
> 'string', parameter, 'string' syntax? It might be less aesthetically
> beautiful than punctuation-free plain text but conceptually it
> expresses exactly what you're trying to achieve without all of that
> tedious mucking about with matching. I'm biased, I suppose; as a Ruby
> programmer a big part of the conceptual beauty of examples comes from
> them being written in native code, so I'd be sad to see that go out
> of the window with scenarios, but I appreciate the pull of the
> customer-facing aspect. Regardless I believe (without evidence) that
> trying to pretend we're doing something fundamentally different to
> writing a program when constructing a scenario is a recipe for
> confusion at best, and the "but customers will balk at apostrophes
> and commas!" sentiment feels slightly too specious to justify it.

I can tell you from my experience with FitNesse that this is sentiment
does play out. Customers really get the idea that the ability to write
their own acceptance tests is very powerful, but their eyes glaze over
as soon as you start talking about programmatic things like setup and
teardown (which are front and center in a FitNese page).

We wanted the customer to feel ownership of the FitNesse pages - to
feel free to add a new page with a new scenario to check their
assumptions or to explore their questions about whether the fact that
the system can do A means that it can also do B. This simply never
happened. They ran the suites periodically, but they never used it as
a tool to explore the system.

Having this expression of stories and scenarios appearing devoid of
programmatic ideas has great potential to help the customers feel
ownership over stories/scenarios. Of course, there is an underlying
relationship to syntax that they'd have to understand and, ideally,
the system would help them out with (i.e. if they do write a new
scenario with steps that don't match any existing steps, they'd be
alerted). But that's all a bit down the road.



> Cheers,
> -Tom
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list