[rspec-users] basic authentication

Ivo Dancet ivo.dancet at gmail.com
Sun Dec 23 07:49:06 EST 2007

When I try to get a page via post_via_redirect on a project that uses  
the new rails 2 http authentication, for example:

post_via_redirect path,
         {:name_of_object => { :att => "test" }},
	:authorization => authorize

then the post works, but then I'm being redirected to the show action  
where I'm unauthorized again. A browser doesn't suffer from this but  
all the tests are. After searching for a long time I just put a  
session in my authorization method, but this can't be the best  
solution (as it is only there to satisfy tests...).

Any recommendations on this?

Ivo Dancet

More information about the rspec-users mailing list