From 6c50f14f3bc94f1c5f9b0b91660e165d94d9e31a Mon Sep 17 00:00:00 2001 From: ragaskar Date: Wed, 10 Mar 2010 22:19:17 -0800 Subject: [PATCH] Minimal coverage for SELENIUM_SERVER_PORT --- spec/config_spec.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/spec/config_spec.rb b/spec/config_spec.rb index 3e6a9a91..20e89c74 100644 --- a/spec/config_spec.rb +++ b/spec/config_spec.rb @@ -128,7 +128,7 @@ describe Jasmine::Config do with(anything(), anything(), "*firefox", anything()). and_return(mock(Jasmine::SeleniumDriver, :connect => true)) config.start - end + end it "should use ENV['JASMINE_BROWSER'] if set" do ENV.should_receive(:[], "JASMINE_BROWSER").and_return("mosaic") @@ -141,4 +141,13 @@ describe Jasmine::Config do end end + describe "#start_selenium_server" do + it "should use an existing selenium server if SELENIUM_SERVER_PORT is set" do + config = Jasmine::Config.new + ENV.stub!(:[], "SELENIUM_SERVER_PORT").and_return(1234) + Jasmine.should_receive(:wait_for_listener).with(1234, "selenium server") + config.start_selenium_server + end + end + end