Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WebMock.last_request
# Thankyou Bartosz Blimke!
# https://twitter.com/bartoszblimke/status/198391214247124993
module LastRequest
def last_request
@last_request
end
def last_request=(request_signature)
@last_request = request_signature
end
end
WebMock.extend(LastRequest)
WebMock.after_request do |request_signature, response|
WebMock.last_request = request_signature
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment