Sha256: 29c10b4ac5f59a825762fbf56b759f912aaf65c09887f3a365f028cd702c9aea

Contents?: true

Size: 1.35 KB

Versions: 67

Compression:

Stored size: 1.35 KB

Contents

$: << File.expand_path("../../../", __FILE__)

require 'spec/support/simplecov'
require 'pact/provider/rspec'
require 'db'
require 'tasks/database'
require 'pact_broker/db'
PactBroker::DB.connection = PactBroker::Database.database = DB::PACT_BROKER_DB
PactBroker.configuration.seed_example_data = false
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

67 entries across 67 versions & 1 rubygems

Version Path
pact_broker-2.79.1 spec/service_consumers/pact_helper.rb
pact_broker-2.79.0 spec/service_consumers/pact_helper.rb
pact_broker-2.78.1 spec/service_consumers/pact_helper.rb
pact_broker-2.78.0 spec/service_consumers/pact_helper.rb
pact_broker-2.77.0 spec/service_consumers/pact_helper.rb
pact_broker-2.76.2 spec/service_consumers/pact_helper.rb
pact_broker-2.76.1 spec/service_consumers/pact_helper.rb
pact_broker-2.76.0 spec/service_consumers/pact_helper.rb
pact_broker-2.75.0 spec/service_consumers/pact_helper.rb
pact_broker-2.74.1 spec/service_consumers/pact_helper.rb
pact_broker-2.74.0 spec/service_consumers/pact_helper.rb
pact_broker-2.73.0 spec/service_consumers/pact_helper.rb
pact_broker-2.72.0 spec/service_consumers/pact_helper.rb
pact_broker-2.71.0 spec/service_consumers/pact_helper.rb
pact_broker-2.70.0 spec/service_consumers/pact_helper.rb
pact_broker-2.69.0 spec/service_consumers/pact_helper.rb
pact_broker-2.68.1 spec/service_consumers/pact_helper.rb
pact_broker-2.68.0 spec/service_consumers/pact_helper.rb
pact_broker-2.67.0 spec/service_consumers/pact_helper.rb
pact_broker-2.66.0 spec/service_consumers/pact_helper.rb