Functional testing with Rails and Devise. What to put in my fixtures?
问题 Hi I'm wanting to do some functional testing of my Rails 3 app that uses Devise and CanCan. In my User model I have the users age, I want to test that a user can only visit a certain page if they are: Logged in Over 35 I have seen in the Devise document that I can use: *sign_in* and I have put it in my tests and it appears to work - the test doesn't error because I have: include Devise::TestHelpers in my *test_helper.rb* When I take it out my test does error because *sign_in* is not defined.