spec/spec_helper.rb in moneta-api-2.0.0 vs spec/spec_helper.rb in moneta-api-2.1.0

- old
+ new

@@ -15,13 +15,19 @@ require File.join(File.dirname(__FILE__), '..', file) end config = YAML.load(File.read(File.join(Dir.pwd, 'spec/support/moneta.yml'))) +cert_path = File.join(Dir.pwd, config['cert_path']) +cert_private_key_path = File.join(Dir.pwd, config['cert_private_key_path']) + $username = config['username'] $password = config['password'] +$cert = OpenSSL::X509::Certificate.new(File.read(cert_path)) +$cert_private_key = OpenSSL::PKey::RSA.new(File.read(cert_private_key_path), config['private_key_password']) + class WebHelper def self.with_real_connection WebMock.allow_net_connect! VCR.turned_off do @@ -33,9 +39,10 @@ VCR.configure do |config| config.cassette_library_dir = File.join(Dir.pwd, 'spec/vcr') config.hook_into :webmock config.filter_sensitive_data('<USERNAME>') { $username } config.filter_sensitive_data('<PASSWORD>') { $password } + config.filter_sensitive_data('<CERT_PASSWORD>') { $cert_pass } config.ignore_hosts 'codeclimate.com' end RSpec.configure do |config| config.around(:each, :vcr) do |example|