Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for provider states with no operations #261

Open
Jason-Wang-vineti opened this issue Mar 15, 2022 · 0 comments
Open

Support for provider states with no operations #261

Jason-Wang-vineti opened this issue Mar 15, 2022 · 0 comments

Comments

@Jason-Wang-vineti
Copy link

It would be nice to have the ability to not include provider states if all provider states are no_op.

Example:

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

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.rb to explicitly indicate that no setup/teardown is necessary for any provider states for the specific consumer, that could reduce complexity a little.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant