[rspec-users] executing code after each step of a story

David Chelimsky dchelimsky at gmail.com
Wed Dec 26 16:48:41 EST 2007


On Dec 26, 2007 4:38 PM, Armin Joellenbeck
<armin.joellenbeck at googlemail.com> wrote:
> Hello,
>
> how can I execute some code after each step of a story. Is there some
> kind of listener documentated.

Very little is documented, and Story Runner is still considered
experimental (i.e. API's subject to change), but here is what you can
do with the 1.1.1 release:

World.add_listener(mylistener)

The listener needs to respond to a variety of messages related to
steps and scenarios, so you'll probably want to implement
method_missing to ignore the messages you're not interested in.

HTH,
David

>
> Thank you in advance,
>
> Armin
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list