[rspec-users] response.should_not redirect_to

Yurii Rashkovskii yrashk at gmail.com
Thu Jul 26 20:49:08 EDT 2007


David,

>>
>> 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.
>>
>> Stupid enough?
>
> That's not a fair question.
>
> Wanna submit a patch?
>

With please — the code was above, once I will understand where should  
I put a spec for it. I got some misunderstanding there (probably the  
night is reason :)

Yurii.


More information about the rspec-users mailing list