I started writing tests for my controllers. For one of them, I need to log in to check if the page is displayed, etc.
Since I use Devise, which has a current_user helper on the user model, how can I form my own:
describe "when it GETS 'town'" do it "should render the template and be successful" do get :index response.should render_template(:index) response.should be_success end end
so that I don't get undefined authentication! "method (develop specific) error?
source share