Skip to content

Support for provider states with no operations #261

@Jason-Wang-vineti

Description

@Jason-Wang-vineti

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions