Skip to content

Instantly share code, notes, and snippets.

@jbodah
Created August 6, 2014 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbodah/57c00eb28b50d37dd0ab to your computer and use it in GitHub Desktop.
Save jbodah/57c00eb28b50d37dd0ab to your computer and use it in GitHub Desktop.
Bypassing Rails routing
should 'support custom read only mode handler methods' do
controller = CustomReadOnlyHandlerTestController.new
controller.params = HashWithIndifferentAccess.new
controller.request = ActionController::TestRequest.new
controller.response = ActionController::TestResponse.new
controller.expects(:my_read_only_handler).at_least_once
controller.process :foo
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment