[rspec-users] ExampleGroup and SharedExampleGroup relationship(?)
David Chelimsky
dchelimsky at gmail.com
Thu Dec 27 12:41:23 EST 2007
On Dec 27, 2007 11:12 AM, Scott Taylor <mailing_lists at railsnewbie.com> wrote:
>> On Dec 27, 2007, at 11:30 AM, Corey Haines wrote:
>> I'm working on a series going over the source code for rspec, and I ran into
>> something interesting with ExampleGroup and SharedExampleGroup. I was
>> wondering if anyone could shed light on it.
<snip/>
> Now - for why it was implemented this way, and not another way, David or
> Aslak could tell you much better than I.
>
> Also - it's likely this implementation will change in the near future.
I had said it might change a while back, but at this point we are
quite happy with the way this works and don't expect it to change.
The reason we like it is as you described: to use a shared group you
just include the module and you get everything for free. The
alternative is slinging around a bunch of Method objects. This would
be fine if it added some value, but the way things have landed it
really doesn't.
Cheers,
David
More information about the rspec-users
mailing list