Class: WireMockMapper::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/configuration.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.request_headersObject (readonly)

Returns the value of attribute request_headers.



7
8
9
# File 'lib/configuration.rb', line 7

def request_headers
  @request_headers
end

.wiremock_urlObject (readonly)

Returns the value of attribute wiremock_url.



7
8
9
# File 'lib/configuration.rb', line 7

def wiremock_url
  @wiremock_url
end

Class Method Details

.add_request_header(key) ⇒ MatchBuilder

Add a request header for all future requests

Parameters:

  • key (String)

    header key

Returns:

  • (MatchBuilder)

    match builder to declare the match on the header



13
14
15
# File 'lib/configuration.rb', line 13

def add_request_header(key)
  @request_headers[key] = MatchBuilder.new(self)
end

.set_wiremock_url(url) ⇒ Object

Set the WireMock url

Parameters:

  • url (String)

    the url of the WireMock server



19
20
21
# File 'lib/configuration.rb', line 19

def set_wiremock_url(url)
  @wiremock_url = url
end