Forum: RSpec How to execute code if a rspec test fails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
69e338ad8eb13b7345e60791df5463e5?d=identicon&s=25 Bourne Identity (raginrish)
on 2009-05-23 14:13
I am trying to make a call to a class/fxn I made, depending on whether
an Rspec test fails. If it fails, I want to make the call, otherwise I
won't need to.
Is there some error message or specific syntax for checking this? Also,
WHERE should I place this to pickup failed tests, and make the call?
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2009-05-24 00:42
(Received via mailing list)
On Sat, May 23, 2009 at 8:13 AM, Rishi Gh <lists@ruby-forum.com> wrote:
> I am trying to make a call to a class/fxn I made, depending on whether
> an Rspec test fails. If it fails, I want to make the call, otherwise I
> won't need to.
> Is there some error message or specific syntax for checking this? Also,
> WHERE should I place this to pickup failed tests, and make the call?

Right now the only supported place to pick up this information is in a
custom formatter. See
http://wiki.github.com/dchelimsky/rspec/custom-formatters to get
started.

Cheers,
David
This topic is locked and can not be replied to.