Sha256: 345cfc3ac625101aa5ca8d0925aeb4e9d4edc0e852c93f2247d88768596252fb
Contents?: true
Size: 1.17 KB
Versions: 2
Compression:
Stored size: 1.17 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' require_relative 'provider_states_for_pact_broker_client' 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.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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pact_broker-2.15.0 | spec/service_consumers/pact_helper.rb |
pact_broker-2.14.0 | spec/service_consumers/pact_helper.rb |