[rspec-devel] [ rspec-Patches-12611 ] should_not redirect_to implementation

noreply at rubyforge.org noreply at rubyforge.org
Thu Jul 26 21:44:19 EDT 2007


Patches item #12611, was opened at 2007-07-27 04:44
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=12611&group_id=797

Category: rails plugin
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Yurii Rashkovskii (yrashk)
Assigned to: Nobody (None)
Summary: should_not redirect_to implementation

Initial Comment:
Here is an extract from my source code

     it "should allow authenticated user to access '#{action}'" do
       @user = mock_user_authentication(:id => 1, :identity_url =>
"http://openid.server/yrashk", :queues => [])
       get action, params
       assigns[:current_user].should == @user
       flash[:error].should be_nil
       response.should_not redirect_to(login_url)
     end

Depending on action, it is either successful response or response
that redirects somewhere (but not to login, since user is "proven" to
be authenticated). In this example, I really don't want to care,
whether it was successful response or redirection to somewhere, until
it is not a redirection to login URL.

--

Was discussed with David on maillist, he proposed to prepare a patch. Here it is. It is seems to be working, though can't be sure for 100% — almost 5AM.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=12611&group_id=797


More information about the rspec-devel mailing list