Stubbing current_user in Testing

Stubbing current_user is easy for testing:

@user = FactoryGirl.create(:user)

controller.stub!(:current_user).and_return(@user)

Advertisements