Sha256: 66d214671ed0b087de155869a2810491a3f7e2adf5db8e7b06454eccbbba7a15

Contents?: true

Size: 1.34 KB

Versions: 18

Compression:

Stored size: 1.34 KB

Contents

if ENV['CODECLIMATE_REPO_TOKEN']
  require 'codeclimate-test-reporter'
  CodeClimate::TestReporter.start
end

require 'rspec'
require 'pry'
require 'rspec/its'
require 'moneta/api'
require 'yaml'
require 'vcr'

Dir['spec/support/**/*.rb'].each do |file|
  require File.join(File.dirname(__FILE__), '..', file)
end

config = YAML.load(File.read(File.join(Dir.pwd, 'spec/support/moneta.yml')))

$username = config['username']
$password = config['password']

class WebHelper
  def self.with_real_connection
    FakeWeb.allow_net_connect = true

    VCR.turned_off do
      yield
    end
  end
end

VCR.configure do |config|
  config.cassette_library_dir = File.join(Dir.pwd, 'spec/vcr')
  config.hook_into :fakeweb
  config.filter_sensitive_data('<USERNAME>') { $username }
  config.filter_sensitive_data('<PASSWORD>') { $password }
  config.ignore_hosts 'codeclimate.com'
end

RSpec.configure do |config|
  config.around(:each, :vcr) do |example|
    name = example.metadata[:full_description].split(/\s+/, 2).join('/').downcase.gsub(/[^\w\/]+/, '_')
    options = example.metadata.select{ |key| [ :record, :match_requests_on ].member?(key) }
    VCR.use_cassette(name, options) { example.call }
  end

  config.before(:each) do
    allow_any_instance_of(Moneta::Api::Service).to receive(:wsdl).and_return(
      Nokogiri::XML(File.read('spec/support/wsdl'))
    )
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
moneta-api-1.12.5 spec/spec_helper.rb
moneta-api-1.12.4 spec/spec_helper.rb
moneta-api-1.12.3 spec/spec_helper.rb
moneta-api-1.12.2 spec/spec_helper.rb
moneta-api-1.12.1 spec/spec_helper.rb
moneta-api-1.12.0 spec/spec_helper.rb
moneta-api-1.11.0 spec/spec_helper.rb
moneta-api-1.10.0 spec/spec_helper.rb
moneta-api-1.9.0 spec/spec_helper.rb
moneta-api-1.8.0 spec/spec_helper.rb
moneta-api-1.7.0 spec/spec_helper.rb
moneta-api-1.6.0 spec/spec_helper.rb
moneta-api-1.5.0 spec/spec_helper.rb
moneta-api-1.4.0 spec/spec_helper.rb
moneta-api-1.3.0 spec/spec_helper.rb
moneta-api-1.2.1 spec/spec_helper.rb
moneta-api-1.2.0 spec/spec_helper.rb
moneta-api-1.1.0 spec/spec_helper.rb