Sha256: cc5424d61f0b5fdefafaea7d7bda123c3a42dd10d53b660e38042fbbce034f35

Contents?: true

Size: 977 Bytes

Versions: 10

Compression:

Stored size: 977 Bytes

Contents

require 'webmock/rspec'

WebMock.disable_net_connect!(allow_localhost: true)

require "./spec/support/shared_context.rb"

is_windows = (RbConfig::CONFIG['host_os'] =~ /bccwin|cygwin|djgpp|mingw|mswin|wince/i) != nil

RSpec.configure do | config |

  config.before(:each) do
    ENV.delete('PACT_BROKER_BASE_URL')
    ENV.delete('PACT_BROKER_USERNAME')
    ENV.delete('PACT_BROKER_PASSWORD')
  end

  config.after(:all) do
    Pact::Fixture.check_fixtures
  end

  config.filter_run_excluding :skip_windows => is_windows
  config.example_status_persistence_file_path = "./spec/examples.txt"
end

module Pact
  module Fixture

    def self.add_fixture key, value
      fixtures[key] ||= []
      fixtures[key] << value
    end

    def self.fixtures
      @fixtures ||= {}
    end

    def self.check_fixtures
      fixtures.each do | fixture_group |
        if fixture_group.size > 1
          #TODO compare fixtures to ensure they match
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
pact_broker-client-1.21.0 spec/spec_helper.rb
pact_broker-client-1.20.0 spec/spec_helper.rb
pact_broker-client-1.19.0 spec/spec_helper.rb
pact_broker-client-1.18.0 spec/spec_helper.rb
pact_broker-client-1.17.0 spec/spec_helper.rb
pact_broker-client-1.16.2 spec/spec_helper.rb
pact_broker-client-1.16.1 spec/spec_helper.rb
pact_broker-client-1.16.0 spec/spec_helper.rb
pact_broker-client-1.15.1 spec/spec_helper.rb
pact_broker-client-1.15.0 spec/spec_helper.rb