Minor refactorings

This commit is contained in:
Bryan Helmkamp 2008-12-27 20:18:55 -05:00
parent 45f36b8ed9
commit 7c603f834c
2 changed files with 7 additions and 7 deletions

View File

@ -26,7 +26,7 @@ module Webrat
def self.start_app_server #:nodoc:
pid_file = File.expand_path(RAILS_ROOT + "/tmp/pids/mongrel_selenium.pid")
system("mongrel_rails start -d --chdir=#{RAILS_ROOT} --port=#{Webrat.configuration.selenium_port.to_s} --environment=#{Webrat.configuration.selenium_environment.to_s} --pid #{pid_file} &")
system("mongrel_rails start -d --chdir=#{RAILS_ROOT} --port=#{Webrat.configuration.selenium_port} --environment=#{Webrat.configuration.selenium_environment} --pid #{pid_file} &")
TCPSocket.wait_for_service :host => "0.0.0.0", :port => Webrat.configuration.selenium_port.to_i
end

View File

@ -25,23 +25,23 @@ describe Webrat::Configuration do
config.should open_error_files
end
it "should have selenium setting defaults" do
it "should use 'selenium' as the selenium environment by default" do
config = Webrat::Configuration.new
config.selenium_environment.should == :selenium
config.selenium_port.should == 3001
end
it "should use 3001 as the selenium port by default" do
config = Webrat::Configuration.new
config.selenium_port.should == 3001
end
it "should be configurable with a block" do
Webrat.configure do |config|
config.open_error_files = false
config.selenium_environment = :test
config.selenium_port = 4000
end
config = Webrat.configuration
config.should_not open_error_files
config.selenium_environment.should == :test
config.selenium_port.should == 4000
end
[:rails,