Skip to content

Instantly share code, notes, and snippets.

@lxneng
Created March 11, 2010 02:54
Show Gist options
  • Save lxneng/328762 to your computer and use it in GitHub Desktop.
Save lxneng/328762 to your computer and use it in GitHub Desktop.
rspec, restful_authentication, and login_required
before :each do
@current_user = mock_model(User, :id =>1)
controller.stub!(:current_user).and_return(@current_user)
controller.stub!(:login_required).and_return(:true)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment