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? -- Posted via http://www.ruby-forum.com/.
David Chelimsky
2009-May-23 22:05 UTC
[rspec-users] How to execute code if a rspec test fails
On Sat, May 23, 2009 at 8:13 AM, Rishi Gh <lists at 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