Sha256: 69717ff3ad6af5e5cfe0b9f1689d922e562f9f4e887e45fbdd6d0a45d8579dc4

Contents?: true

Size: 531 Bytes

Versions: 11

Compression:

Stored size: 531 Bytes

Contents

require 'sequel'
require 'animal_service/db'
require 'animal_service/animal_repository'

Pact.provider_states_for "Zoo App" do

  provider_state "there is an alligator named Mary" do
    set_up do
      AnimalService::DATABASE[:animals].insert(name: 'Mary')
    end
  end

  provider_state "there is not an alligator named Mary" do
    no_op
  end

  provider_state "an error occurs retrieving an alligator" do
    set_up do
      AnimalService::AnimalRepository.stub(:find_alligator_by_name).and_raise("Argh!!!")
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
pact-1.0.39 example/animal-service/spec/service_consumers/provider_states_for_zoo_app.rb
pact-1.1.0.rc2 example/animal-service/spec/service_consumers/provider_states_for_zoo_app.rb
pact-1.0.38 example/animal-service/spec/service_consumers/provider_states_for_zoo_app.rb
pact-1.1.0.rc1 example/animal-service/spec/service_consumers/provider_states_for_zoo_app.rb
pact-1.0.37 example/animal-service/spec/service_consumers/provider_states_for_zoo_app.rb
pact-1.0.36 example/animal-service/spec/service_consumers/provider_states_for_zoo_app.rb
pact-1.0.35 example/animal-service/spec/service_consumers/provider_states_for_zoo_app.rb
pact-1.0.34 example/animal-service/spec/service_consumers/provider_states_for_zoo_app.rb
pact-1.0.33 example/animal-service/spec/service_consumers/provider_states_for_zoo_app.rb
pact-1.0.32 example/animal-service/spec/service_consumers/provider_states_for_zoo_app.rb
pact-1.0.31 example/animal-service/spec/service_consumers/provider_states_for_zoo_app.rb