Follow Along as I Stumble on the Path to Learning RoR

Stubbing current_user in Testing

Stubbing current_user is easy for testing:

@user = FactoryGirl.create(:user)

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

Advertisements

Comments are closed.