Is there a pattern to not include provider states ...
# pact-ruby
j
Is there a pattern to not include provider states if all provider states are
no_op
?
Copy code
Pact.provider_states_for 'My Service' do
  provider_state 'some state that needs no setup' do
    no_op
  end

  provider_state 'some other state that needs no setup' do
    no_op
  end
end
b
No, but that would be a good idea.
👍 1
j
The warning that provider states are missing is still needed to inform the provider to add them if they are needed. But if there's some way within
pact_helper
to explicitly indicate that no setup/teardown is necessary for any provider states for the specific consumer, that could reduce complexity a little...
Thanks for the response though Beth!
b
You can raise it in the pact-ruby repository, or in pact.canny.io @Jason Wang
1