Re: [rspec-users] ControllerExampleGroup.bypass_rescue

2011-08-16 Thread Lenny Marks
On Aug 11, 2011, at 8:59 AM, Justin Ko wrote: On Thu, Aug 11, 2011 at 8:40 AM, David Chelimsky dchelim...@gmail.com wrote: On Aug 11, 2011, at 7:17 AM, Justin Ko wrote: On Aug 10, 2011, at 11:13 AM, Lenny Marks le...@aps.org wrote: As best I can tell, bypass_rescue from rspec-rails-1

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 le...@aps.org wrote: As best I can tell, bypass_rescue from rspec-rails-1 is no longer

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 le...@aps.org 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 dchelim...@gmail.comwrote: On Aug 11, 2011, at 7:17 AM, Justin Ko wrote: On Aug 10, 2011, at 11:13 AM, Lenny Marks le...@aps.org wrote: As best I can tell, bypass_rescue from rspec-rails-1 is no longer part of rspec-rails, ' 2'. I had been

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

[rspec-users] ControllerExampleGroup.bypass_rescue

2011-08-10 Thread Lenny Marks
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 ... describe '#show' do it should raise an AuthorizationError if current user is not the correspondent do