Minimal coverage for SELENIUM_SERVER_PORT

This commit is contained in:
ragaskar
2010-03-10 22:19:17 -08:00
parent a0fbbd7f67
commit 6c50f14f3b

View File

@@ -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