On Tue, Aug 12, 2008 at 7:25 PM, Zach Dennis <[EMAIL PROTECTED]> wrote:
> Sometimes I don't have a full need to make a class to do something,
> yet I want something readable and concise. This is influenced from the
> joys of JavaScript.
>
> Today I made this happen. Love it, like it, hate it, WDYT?
>
> Spec::Story::Runner.register_listener FunctionalStruct.new(
>  :run_started => lambda { |*args|
>    Generate.user(:login => "normal user")
>  },
>  :run_ended => lambda { |*args|
>      User.destroy_all
>  },
>  :method_missing => lambda { |*a| }
> )

Love is a bit strong. Like++
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to