Sha256: f8aa2862bac05134469b43b7f0e671454253106240b22f0c008704f2e3efeeaa
Contents?: true
Size: 1.21 KB
Versions: 3
Compression:
Stored size: 1.21 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'] 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
moneta-api-1.0.4 | spec/spec_helper.rb |
moneta-api-1.0.3 | spec/spec_helper.rb |
moneta-api-1.0.2 | spec/spec_helper.rb |