[rspec-users] Are there any ways to detect spec faults during a run?

2011-03-09 Thread Magnus Erickson
Hi, Is there a way to detect if an example has failed? Something like a: "example_failed?" method. In my case I need to dump some information, i.e trace and error log, to be used when analyzing what went wrong in the example. I'm thinking about putting it in a after(:each) {}. BR Magnus

[rspec-users] Are there any ways to detect spec faults during a run?

2011-03-09 Thread Magnus Erickson
Hi, Is there a way to detect if an example has failed? Something like a: "example_failed?" method. In my case I need to dump some information, i.e trace and error log, to be used when analyzing what went wrong in the example. I'm thinking about putting it in a after(:each) {}. BR Magnus

Re: [rspec-users] How to do controller.stub(:some_method) at request test when using rspec2

2011-03-09 Thread Ken Chien
You should be able to call: controller.stub(:some_method) My suspicion is what you passed to the describe method. Instead of: describe "save attachment" pass the controller name, without quotes: describe DynamicFlowsController then controller.stub should work, and then you can refactor t