[rspec-users] Specing based on user roles
Pat Maddox
pergesu at gmail.com
Tue Nov 11 18:10:08 EST 2008
Fernando Perez <lists at ruby-forum.com> writes:
>>
>> I am using restful_authentication. I tried to look at their specs, but
>> they are unreadable. So I am trying to throw together my own
>> authentication mocker/stuber but with no luck.
>
> Just to clear things out, can you tell me which snippet is correct:
>
> 1)
> get :index
> response.should be_redirect
>
> 2)
> response.should be_redirect
> get :index
>
>
>
> It appears to me that 1) is correct, as 2) seems to be messing up all my
> specs.
Yep, #1
Pat
More information about the rspec-users
mailing list