[rspec-users] Evaluating shared example customisation block before shared block

Myron Marston myron.marston at gmail.com
Fri Jul 30 19:56:35 EDT 2010

I may be the only one who finds this useful, but I think there's value
in evaluating the customization block after the shared example group
block.  It allows the shared example group to provide a default
implementation of a helper method, and then an instance of the shared
behavior to override the helper method if appropriate.  If you
evaluate the customization block before the shared example group
block, the default implementation wins out, and you have no way to
override helper methods in an instance of a shared example group.

On Jul 30, 2:58 pm, Ashley Moran <ashley.mo... at patchspace.co.uk>
> On 30 Jul 2010, at 5:00 PM, David Chelimsky wrote:
> > By all means.
> I've started on that and filed a ticket[1].
> One question I have, is I keep calling the Example Group that uses a shared block the "host group".  Is there already a name for it?  I never know what to use, and I'm not sure "host group" describes it accurately anyway.
> Cheers
> Ash
> [1]http://github.com/rspec/rspec-core/issues/issue/99
> --http://www.patchspace.co.uk/http://www.linkedin.com/in/ashleymoran
> _______________________________________________
> rspec-users mailing list
> rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list