spec/spec_helper.rb in browsermob-proxy-0.0.6 vs spec/spec_helper.rb in browsermob-proxy-0.0.7

- old
+ new

@@ -6,11 +6,15 @@ module BrowserMob module Proxy module SpecHelper def server - $_bm_server ||= Server.new(File.join(home, "bin", "browsermob-proxy"), :log => true).start + $_bm_server ||= Server.new( + File.join(home, "bin", "browsermob-proxy"), + :port => Selenium::WebDriver::PortProber.random, + :log => true + ).start end def new_proxy server.create_proxy end @@ -32,10 +36,9 @@ end end end end - RSpec.configure do |c| c.include(BrowserMob::Proxy::SpecHelper) c.after(:suite) { $_bm_server.stop if $_bm_server } end