[rspec-users] Selectively ignoring exceptions in examples

Ash Moran ash.moran at patchspace.co.uk
Mon Aug 29 17:08:00 EDT 2011

On 29 Aug 2011, at 20:09, Nick wrote:

> Hey there, Ash. Why not put your call to #run_command inside a begin-rescue statement?

Hi Nick

Yes I'm missing the obvious as usual* :-)

Well I guess I could, but the syntax then is even more intrusive. I guess I just want the lightest way possible to say "Yes, I know this code fails, but I still want to know what's going on inside it!" That's why I wondered maybe I should give more thought to how I'm using exceptions. (I'm raising a CLI::CommandError anywhere in a Command class where I know I don't want the CLI to proceed any further.)


* I'm sorry, I wrote the code on my own, my pair was actually taking his bank holiday off :)


More information about the rspec-users mailing list