Class: Pact::Consumer::Configuration::MockService

Inherits:
Object
  • Object
show all
Extended by:
DSL
Defined in:
lib/pact/consumer/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DSL

build, dsl

Constructor Details

#initialize(name, consumer_name, provider_name) ⇒ MockService

Returns a new instance of MockService.



102
103
104
105
106
107
108
109
# File 'lib/pact/consumer/configuration.rb', line 102

def initialize name, consumer_name, provider_name
  @name = name
  @consumer_name = consumer_name
  @provider_name = provider_name
  @port = nil
  @standalone = false
  @verify = true
end

Instance Attribute Details

#consumer_nameObject

Returns the value of attribute consumer_name.



100
101
102
# File 'lib/pact/consumer/configuration.rb', line 100

def consumer_name
  @consumer_name
end

#portObject

Returns the value of attribute port.



100
101
102
# File 'lib/pact/consumer/configuration.rb', line 100

def port
  @port
end

#provider_nameObject

Returns the value of attribute provider_name.



100
101
102
# File 'lib/pact/consumer/configuration.rb', line 100

def provider_name
  @provider_name
end

#standaloneObject

Returns the value of attribute standalone.



100
101
102
# File 'lib/pact/consumer/configuration.rb', line 100

def standalone
  @standalone
end

#verifyObject

Returns the value of attribute verify.



100
101
102
# File 'lib/pact/consumer/configuration.rb', line 100

def verify
  @verify
end

Instance Method Details

#finalizeObject



125
126
127
128
129
# File 'lib/pact/consumer/configuration.rb', line 125

def finalize
  validate
  register_mock_service
  configure_consumer_contract_builder
end