Module: WireMockMapper

Defined in:
lib/configuration.rb,
lib/wiremock_mapper.rb,
lib/builders/helpers.rb,
lib/builders/match_builder.rb,
lib/builders/request_builder.rb,
lib/builders/response_builder.rb,
lib/builders/url_match_builder.rb

Defined Under Namespace

Modules: Builders Classes: Configuration

Class Method Summary collapse

Class Method Details

.create_mapping(url = Configuration.wiremock_url) {|request_builder, response_builder| ... } ⇒ Object

Yields:

  • (request_builder, response_builder)

5
6
7
8
9
10
11
12
# File 'lib/wiremock_mapper.rb', line 5

def self.create_mapping(url = Configuration.wiremock_url)
  request_builder = deep_clone(Configuration.request_builder)
  response_builder = deep_clone(Configuration.response_builder)

  yield request_builder, response_builder

  send_to_wiremock(url, request: request_builder, response: response_builder)
end