Displaying 1 result from an estimated 1 matches for "userscontrollertest".
Did you mean:
usercontrollertest
2010 May 27
3
before_filter always running in test, not in development or production mode.
...to :show'' do
setup { get :show, { :id => users(:alexander).id } }
should_not_set_the_flash
should_assign_to :user
should_respond_with :success
end
end
The test fails though:
3) Failure:
test: A guest to the site on GET to :show should assign @user.
(UsersControllerTest)
[]:
Expected action to assign a value for @user
4) Failure:
test: A guest to the site on GET to :show should not set the flash.
(UsersControllerTest)
[]:
Did not expect the flash to be set, but was {:error=>"Sorry! You
need to log in before visiting that page."}
5)...