class Pact::Consumer::Configuration::ServiceProvider
Attributes
Public Class Methods
Source
# File lib/pact/consumer/configuration/service_provider.rb, line 13 def initialize name, consumer_name @name = name @service = nil @consumer_name = consumer_name end
Public Instance Methods
Source
# File lib/pact/consumer/configuration/service_provider.rb, line 25 def finalize validate end
Source
# File lib/pact/consumer/configuration/service_provider.rb, line 20 def mock_service name, &block self.service = MockService.build(name, consumer_name, self.name, &block) end
Private Instance Methods
Source
# File lib/pact/consumer/configuration/service_provider.rb, line 31 def validate raise "Please configure a service for #{name}" unless service end