Module: Pact::Provider::DSL

Defined in:
lib/pact/provider/configuration.rb,
lib/pact/provider/provider_state.rb

Instance Method Summary collapse

Instance Method Details

#provider_state(name, &block) ⇒ Object



5
6
7
# File 'lib/pact/provider/provider_state.rb', line 5

def provider_state name, &block
  ProviderState.provider_state(name, &block).register
end

#provider_states_for(name, &block) ⇒ Object



9
10
11
12
13
# File 'lib/pact/provider/provider_state.rb', line 9

def provider_states_for name, &block
  ProviderState.current_namespaces << name
  instance_eval(&block)
  ProviderState.current_namespaces.pop
end

#service_provider(name, &block) ⇒ Object



8
9
10
# File 'lib/pact/provider/configuration.rb', line 8

def service_provider name, &block
  Configuration::ServiceProviderDSL.build(name, &block)
end