Sha256: 9034c6144026490958236efd924775352ba9a7972e0ccacef79b8cdd61cd8fc6

Contents?: true

Size: 500 Bytes

Versions: 18

Compression:

Stored size: 500 Bytes

Contents

require 'pact/provider/rspec'
require_relative "provider_states_for_zoo_app"


class AnimalService

  def call env
    response_body = {}
    if env['PATH_INFO'] == '/alligators'
      response_body = {'name' => 'Bob'}.to_json
    end
    [200, {'Content-Type' => 'application/json'}, [response_body]]
  end
end

Pact.service_provider 'Animal Service' do
  app do
    AnimalService.new
  end

  honours_pact_with "Zoo App" do
    pact_uri '../zoo-app/spec/pacts/zoo_app-animal_service.json'
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
pact-1.0.30 example/animal-service/spec/service_consumers/pact_helper.rb
pact-1.0.29 example/animal-service/spec/service_consumers/pact_helper.rb
pact-1.0.28 example/animal-service/spec/service_consumers/pact_helper.rb
pact-1.0.27 example/animal-service/spec/service_consumers/pact_helper.rb
pact-1.0.26 example/animal-service/spec/service_consumers/pact_helper.rb
pact-1.0.25 example/animal-service/spec/service_consumers/pact_helper.rb
pact-1.0.24 example/animal-service/spec/service_consumers/pact_helper.rb
pact-1.0.23 example/animal-service/spec/service_consumers/pact_helper.rb
pact-1.0.22 example/animal-service/spec/service_consumers/pact_helper.rb
pact-1.0.21 example/animal-service/spec/service_consumers/pact_helper.rb
pact-1.0.20 example/animal-service/spec/service_consumers/pact_helper.rb
pact-1.0.19 example/animal-service/spec/service_consumers/pact_helper.rb
pact-1.0.18 example/animal-service/spec/service_consumers/pact_helper.rb
pact-1.0.15 example/animal-service/spec/service_consumers/pact_helper.rb
pact-1.0.13 example/animal-service/spec/service_consumers/pact_helper.rb
pact-1.0.12 example/animal-service/spec/service_consumers/pact_helper.rb
pact-1.0.11 example/animal-service/spec/service_consumers/pact_helper.rb
pact-1.0.10 example/animal-service/spec/service_consumers/pact_helper.rb