Class: Fixturama::Changes::Request

Inherits:
Base
  • Object
show all
Defined in:
lib/fixturama/changes/request.rb,
lib/fixturama/changes/request/response.rb,
lib/fixturama/changes/request/responses.rb

Overview

Stub an HTTP(S) request using Webmock

Defined Under Namespace

Classes: Response, Responses

Instance Attribute Summary

Attributes inherited from Base

#key The key identifier of the change

Instance Method Summary collapse

Methods inherited from Base

#merge

Instance Method Details

#call(example) ⇒ Object



10
11
12
13
14
15
# File 'lib/fixturama/changes/request.rb', line 10

def call(example)
  stub = example.stub_request(http_method, uri)
  stub = stub.with(request) if request.any?
  stub.to_return { |_| responses.next }
  self
end