Sha256: 4540e5f21b0253cdffbb4a0a9c510c95fa79ae3c7a1ec7300f7d28114e1a4f07
Contents?: true
Size: 687 Bytes
Versions: 2
Compression:
Stored size: 687 Bytes
Contents
require 'browsermob/proxy' require 'selenium-webdriver' RestClient.log = STDOUT module BrowserMob module Proxy module SpecHelper def server $_bm_server ||= Server.new(File.join(home, "bin", "browsermob-proxy"), :log => true).start end def new_proxy server.create_proxy end def home ENV['BROWSERMOB_PROXY_HOME'] or raise "BROWSERMOB_PROXY_HOME not set" end def fixture(name) File.read(File.join(File.expand_path("../", __FILE__), "fixtures", name)) end end end end RSpec.configure do |c| c.include(BrowserMob::Proxy::SpecHelper) c.after(:suite) { $_bm_server.stop if $_bm_server } end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
browsermob-proxy-0.0.2 | spec/spec_helper.rb |
browsermob-proxy-0.0.1 | spec/spec_helper.rb |