sorry, tests are still new to me so having a hard time understanding why this is failing. i'm on chapter 9 and getting this failure below.
1) Failure: UsersControllerTest#test_should_redirect_index_when_not_logged_in [/home/ubuntu/workspace/sample_app/test/controllers/users_controller_test.rb:43]:
Expected response to be a
---
usercontroller
def index
@users = User.all
end
---
usercontroller test
test "should redirect index when not logged in" do
get :index
assert_redirected_to login_url
end
why dont u use rspec?
You missed the codechanges in Listing 9.32: Requiring a logged-in user for the index action.