Displaying 1 result from an estimated 1 matches for "should_assign_to".
2010 May 27
3
before_filter always running in test, not in development or production mode.
...quired, :only =>
[:update, :edit, :suspend, :unsuspend, :destroy, :purge]
My test is this:
context ''A guest to the site'' do
context ''on GET 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 shoul...