Re: [rspec-users] ControllerExampleGroup.bypass_rescue

2011-08-11 Thread Justin Ko
If you are rescuing an exception, test what the rescue does. Purposely cause the exception, then check the rescue does what it's supposed to. Sent from my iPhone On Aug 10, 2011, at 11:13 AM, Lenny Marks wrote: > As best I can tell, bypass_rescue from rspec-rails-1 is no longer part of > rspe

Re: [rspec-users] ControllerExampleGroup.bypass_rescue

2011-08-11 Thread David Chelimsky
On Aug 11, 2011, at 7:17 AM, Justin Ko wrote: > On Aug 10, 2011, at 11:13 AM, Lenny Marks wrote: > >> As best I can tell, bypass_rescue from rspec-rails-1 is no longer part of >> rspec-rails, '> 2'. I had been using it on occasion for things like: >> >> describe CorrespondencesController do >>

Re: [rspec-users] ControllerExampleGroup.bypass_rescue

2011-08-11 Thread Justin Ko
On Thu, Aug 11, 2011 at 8:40 AM, David Chelimsky wrote: > On Aug 11, 2011, at 7:17 AM, Justin Ko wrote: > > On Aug 10, 2011, at 11:13 AM, Lenny Marks wrote: > > As best I can tell, bypass_rescue from rspec-rails-1 is no longer part of > rspec-rails, '> 2'. I had been using it on occasion for thin

Re: [rspec-users] ControllerExampleGroup.bypass_rescue

2011-08-11 Thread Stefan Kanev
I agree with Lenny. I can give an example. Lets say that parts of the application are restricted. Whenever they are accessed by an unauthorized user, they trigger UnauthorizedAccessError. Depending on the role the user has in the system, different actions should be performed, e.g. unauthenticated