Sha256: 9be91e2ee96422e3a2db23ba63a24b4de73e90a6d0074dd447d348d7518af697

Contents?: true

Size: 942 Bytes

Versions: 8

Compression:

Stored size: 942 Bytes

Contents

require_relative '../lib/base/apis'
require 'webmock/rspec'
require 'vcr'

Dir[Base::Apis::ROOT / 'spec/support/**/*_spec.rb']
  .sort
  .each { |f| require f }

FIXTURES_PATH = Base::Apis::ROOT / 'spec' / 'fixtures'

VCR.configure do |config|
  config.allow_http_connections_when_no_cassette = true
  config.cassette_library_dir = FIXTURES_PATH / 'vcr_cassettes'
  config.hook_into :webmock
end

WebMock.disable_net_connect!(allow_localhost: true)

RSpec.configure do |config|
  config.expect_with :rspec do |expectations|
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true
  end

  config.mock_with :rspec do |mocks|
    mocks.verify_partial_doubles = true
  end

  config.before do
    secret_file = FIXTURES_PATH / 'files' / 'client_secret.json'
    data = MultiJson.load(File.open(secret_file, 'r').read)
    allow_any_instance_of(Base::APIClient::ClientSecret)
      .to receive(:load_file) { data }
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
base-api-client-0.3.1.beta spec/spec_helper.rb
base-api-client-0.3.beta spec/spec_helper.rb
base-api-client-0.2.5.beta spec/spec_helper.rb
base-api-client-0.2.4.beta spec/spec_helper.rb
base-api-client-0.2.3.beta spec/spec_helper.rb
base-api-client-0.2.2.beta spec/spec_helper.rb
base-api-client-0.2.1.beta spec/spec_helper.rb
base-api-client-0.1.beta spec/spec_helper.rb