Sha256: e8270328bb94fa1516065cbe6eb05ecb942b66e5e88438bf0d85aba0dc0d191a
Contents?: true
Size: 1.06 KB
Versions: 2
Compression:
Stored size: 1.06 KB
Contents
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 } 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
moneta-api-1.0.1 | spec/spec_helper.rb |
moneta-api-1.0.0 | spec/spec_helper.rb |