Sha256: c287d27d5c84767565b5d896802b6be545fdfaca23517f1894fdd73d1ddac1b1

Contents?: true

Size: 1.27 KB

Versions: 15

Compression:

Stored size: 1.27 KB

Contents

$: << File.expand_path("../../../", __FILE__)
require 'pact/provider/rspec'
require 'db'
require 'tasks/database'
require 'pact_broker/db'
PactBroker::DB.connection = PactBroker::Database.database = DB::PACT_BROKER_DB

require 'spec/support/database_cleaner'
require 'pact_broker'
require 'pact_broker/app'

require_relative 'hal_relation_proxy_app'

Dir.glob(File.join(File.dirname(__FILE__), "provider_states_for*.rb")).each do | path |
  require path
end

pact_broker = PactBroker::App.new { |c| c.database_connection = DB::PACT_BROKER_DB }
app_to_verify = HalRelationProxyApp.new(pact_broker)

module Rack
  module PactBroker
    class DatabaseTransaction
      def do_not_rollback? response
        # Dodgey hack to stop exceptions raising a Rollback error while verifying
        # Otherwise the provider states that deliberately raise exceptions
        # end up raising exceptions that break the verification tests
        true
      end
    end
  end
end

Pact.configuration.logger.level = Logger::DEBUG

Pact.service_provider "Pact Broker" do

  app { HalRelationProxyApp.new(app_to_verify) }

  honours_pact_with "Pact Broker Client" do
    pact_uri "https://raw.githubusercontent.com/pact-foundation/pact_broker-client/master/spec/pacts/pact_broker_client-pact_broker.json"
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
pact_broker-2.27.6 spec/service_consumers/pact_helper.rb
pact_broker-2.27.5 spec/service_consumers/pact_helper.rb
pact_broker-2.27.4 spec/service_consumers/pact_helper.rb
pact_broker-2.27.3 spec/service_consumers/pact_helper.rb
pact_broker-2.27.2 spec/service_consumers/pact_helper.rb
pact_broker-2.27.0 spec/service_consumers/pact_helper.rb
pact_broker-2.26.1 spec/service_consumers/pact_helper.rb
pact_broker-2.26.0 spec/service_consumers/pact_helper.rb
pact_broker-2.25.0 spec/service_consumers/pact_helper.rb
pact_broker-2.24.0 spec/service_consumers/pact_helper.rb
pact_broker-2.23.4 spec/service_consumers/pact_helper.rb
pact_broker-2.23.3 spec/service_consumers/pact_helper.rb
pact_broker-2.23.2 spec/service_consumers/pact_helper.rb
pact_broker-2.23.1 spec/service_consumers/pact_helper.rb
pact_broker-2.23.0 spec/service_consumers/pact_helper.rb