File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,12 +36,16 @@ def parse_body_from_response rack_response
3636 end
3737
3838 def set_up_provider_states provider_states , consumer , options = { }
39+ # If there are no provider state, execute with an nil state to ensure global and base states are executed
40+ Pact . configuration . provider_state_set_up . call ( nil , consumer , options ) if provider_states . nil? || provider_states . empty?
3941 provider_states . each do | provider_state |
4042 Pact . configuration . provider_state_set_up . call ( provider_state . name , consumer , options . merge ( params : provider_state . params ) )
4143 end
4244 end
4345
4446 def tear_down_provider_states provider_states , consumer , options = { }
47+ # If there are no provider state, execute with an nil state to ensure global and base states are executed
48+ Pact . configuration . provider_state_tear_down . call ( nil , consumer , options ) if provider_states . nil? || provider_states . empty?
4549 provider_states . reverse . each do | provider_state |
4650 Pact . configuration . provider_state_tear_down . call ( provider_state . name , consumer , options . merge ( params : provider_state . params ) )
4751 end
Original file line number Diff line number Diff line change 11# Remember to bump pact-provider-proxy when this changes major version
22module Pact
3- VERSION = "1.36.0 "
3+ VERSION = "1.36.1 "
44end
You can’t perform that action at this time.
0 commit comments