Sha256: 5e55a1c335281b1164a53d4746d1d60fb49862be7bd3229aa52119d002a20255
Contents?: true
Size: 1.26 KB
Versions: 4
Compression:
Stored size: 1.26 KB
Contents
require 'proxy_pac_rb' require 'rspec' require 'proxy_pac_rb/rspec/matchers/base_matcher' require 'proxy_pac_rb/rspec/helpers' ProxyPacRb.require_file_matching_pattern('rspec/matchers/*.rb') ProxyPacRb.require_file_matching_pattern('rspec/shared_examples/*.rb') ProxyPacRb.require_file_matching_pattern('rspec/shared_contexts/*.rb') # Main Module module ProxyPacRb @configuration = CodeConfiguration.new class << self def configure(&block) @configuration.configure(&block) @configuration end end end ProxyPacRb.configure do |config| config.use_proxy = false end RSpec.configure do |config| config.include ProxyPacRb::Rspec::Helpers, type: :proxy_pac config.before :each do |example| next unless self.class.include?(ProxyPacRb::Rspec::Helpers) @proxy_pac_rb_config = ProxyPacRb.configure.dup \ unless defined?(@proxy_pac_rb_config) && @proxy_pac_rb_config.is_a?(ProxyPacRb::CodeConfiguration) example.metadata.select { |k, _v| k != :proxy_pac_rb_config }.each do |k, v| @proxy_pac_rb_config.set_if_option(k, v) end if @proxy_pac_rb_config.use_proxy == false %w( http_proxy https_proxy HTTP_PROXY HTTPS_PROXY ).each do |v| ENV.delete(v) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
proxy_pac_rb-0.9.1 | lib/proxy_pac_rb/rspec.rb |
proxy_pac_rb-0.8.2 | lib/proxy_pac_rb/rspec.rb |
proxy_pac_rb-0.8.1 | lib/proxy_pac_rb/rspec.rb |
proxy_pac_rb-0.8.0 | lib/proxy_pac_rb/rspec.rb |