Module: RescueRegistry::RailsTestHelpers
- Defined in:
- lib/rescue_registry/rails_test_helpers.rb
Overview
Helpers to improve the ease of testing error handling in Rails tests. These are not actually specific to RescueRegistry, but will certainly be useful for it.
Instance Method Summary collapse
- #handle_request_exceptions(handle = true, &block) ⇒ Object
- #handle_request_exceptions? ⇒ Boolean
- #show_detailed_exceptions(show = true, &block) ⇒ Object
- #show_detailed_exceptions? ⇒ Boolean
Instance Method Details
#handle_request_exceptions(handle = true, &block) ⇒ Object
5 6 7 |
# File 'lib/rescue_registry/rails_test_helpers.rb', line 5 def handle_request_exceptions(handle = true, &block) set_action_dispatch_property(:show_exceptions, handle, &block) end |
#handle_request_exceptions? ⇒ Boolean
9 10 11 |
# File 'lib/rescue_registry/rails_test_helpers.rb', line 9 def handle_request_exceptions? Rails.application.config.action_dispatch.show_exceptions end |
#show_detailed_exceptions(show = true, &block) ⇒ Object
13 14 15 |
# File 'lib/rescue_registry/rails_test_helpers.rb', line 13 def show_detailed_exceptions(show = true, &block) set_action_dispatch_property(:show_detailed_exceptions, show, &block) end |
#show_detailed_exceptions? ⇒ Boolean
17 18 19 |
# File 'lib/rescue_registry/rails_test_helpers.rb', line 17 def show_detailed_exceptions? Rails.application.config.action_dispatch.show_detailed_exceptions end |