last_request.rb 313 B

12345678910111213141516
  1. # frozen_string_literal: true
  2. module LastRequest
  3. def last_request
  4. @last_request
  5. end
  6. def last_request=(request_signature)
  7. @last_request = request_signature
  8. end
  9. end
  10. WebMock.extend(LastRequest)
  11. WebMock.after_request do |request_signature, _response|
  12. WebMock.last_request = request_signature
  13. end