Class: ErrorRequestTest

Inherits:
ActionDispatch::IntegrationTest
  • Object
show all
Defined in:
lib/generators/crashbreak/templates/minitest_test.rb

Instance Method Summary collapse

Instance Method Details

#setupObject



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_requestObject



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