Displaying 3 results from an estimated 3 matches for "mock_user_authentication".
2007 Apr 06
3
Mocking Authentication
Is anyone using Restful Authentication? If so, how are you mocking
the login for your controllers? I''m having trouble with it and would
love an example of someone''s login. I''m sure I''m missing something
simple.
Michael
railsconsulting.com
2007 May 08
4
help with rspec''ing controller
...ibe "Create with a valid product and authenticated user" do
controller_name :products
before(:each) do
@product= mock(Product)
Product.stub!(:new).and_return(@product)
end
it "should tell the Product model to create a new product" do
#mock_user_authentication(true)
Product.should_receive(:new).with(:params).and_return(@product)
post ''create'', :product => :params
end
end
describe "Create with a valid product and authenticated user with
everything in setup" do
controller_name :product
se...
2007 Jul 26
6
response.should_not redirect_to
Hey,
May be it is just too deep night over here and I''m missing something
though I got this failure on {{{response.should_not redirect_to}}}:
''QueuesController should allow authenticated user to access ''show''''
FAILED
Matcher does not support should_not.
See Spec::Matchers for more information
about matchers.
Also I''ve found this in