[rspec-users] WDYT, simple, anonymous story listeners?

Zach Dennis zach.dennis at gmail.com
Wed Aug 13 10:41:42 EDT 2008

On Wed, Aug 13, 2008 at 5:26 AM, Joseph Wilk <lists at ruby-forum.com> wrote:
> It looks like a nice shortcut for those times when you are registering
> simple one-off listeners.
> While it does provide a nice shortcut I can see reasons why that
> shortcut might be bad(in some cases).
> Separating registering and implementation can be a good thing.
> *Split the logic.
> *Organise files/classes nicely
> *Enable inheritance from the listeners
> If it was anything that I had to maintain or touch regularly I would be
> happier with a class.
> Can/Could you support mixins inside FunctionalStruct? That would help
> overcome some of those points.

Yeah you definitely could, perhaps something like:

FunctionalStruct.new( SomeModule,
   :foo => ...,
   :bar => ...,

> I can think of a couple of places that I would be happy using
> FunctionalStruct. Is the source for 'FunctionalStruct'
> written/available?


Zach Dennis

More information about the rspec-users mailing list