spec/support/pact_rake_support.rb in pact-0.1.28 vs spec/support/pact_rake_support.rb in pact-0.1.35
- old
+ new
@@ -10,29 +10,26 @@
raise "unexpected path #{env['PATH_INFO']}!!!"
end
end
end
- Pact.configure do | config |
- config.producer do
- name "Some Producer"
- app { TestApp.new }
- end
+ Pact.service_provider "Some Producer" do
+ app { TestApp.new }
end
#one with a top level consumer
- Pact.with_consumer 'some-test-consumer' do
- producer_state "the weather is sunny" do
+ Pact.provider_states_for 'some-test-consumer' do
+ provider_state "the weather is sunny" do
set_up do
WEATHER ||= {}
WEATHER[:current_state] = 'sunny'
end
end
end
#one without a top level consumer
- Pact.producer_state "the weather is cloudy" do
+ Pact.provider_state "the weather is cloudy" do
set_up do
WEATHER ||= {}
WEATHER[:current_state] = 'cloudy'
end
end