Class: ErrorRequestTest
- Inherits:
-
ActionDispatch::IntegrationTest
- Object
- ActionDispatch::IntegrationTest
- ErrorRequestTest
- Defined in:
- lib/generators/crashbreak/templates/minitest_test.rb
Instance Method Summary collapse
Instance Method Details
#setup ⇒ Object
4 5 6 7 |
# File 'lib/generators/crashbreak/templates/minitest_test.rb', line 4 def setup @restorers_data = Crashbreak::StateRestorer.new('<%= error_id %>').restore @request_parser = Crashbreak::RequestParser.new @restorers_data[:request] end |
#test_sending_request ⇒ Object
9 10 11 12 13 |
# File 'lib/generators/crashbreak/templates/minitest_test.rb', line 9 def test_sending_request @request_parser.request_data do |request_method, url, body, headers| method(request_method).call url, body, headers end end |