Added single-quotes around --chdir argument to mongrel_rails call, as
webrat bombs with a file not found error if RAILS_ROOT contains a space.
This commit is contained in:
parent
49e86d103f
commit
ea8e1910d1
|
@ -27,7 +27,7 @@ module Webrat
|
|||
|
||||
def self.start_app_server #:nodoc:
|
||||
pid_file = prepare_pid_file("#{RAILS_ROOT}/tmp/pids", "mongrel_selenium.pid")
|
||||
system("mongrel_rails start -d --chdir=#{RAILS_ROOT} --port=#{Webrat.configuration.application_port} --environment=#{Webrat.configuration.application_environment} --pid #{pid_file} &")
|
||||
system("mongrel_rails start -d --chdir='#{RAILS_ROOT}' --port=#{Webrat.configuration.application_port} --environment=#{Webrat.configuration.application_environment} --pid #{pid_file} &")
|
||||
TCPSocket.wait_for_service :host => Webrat.configuration.application_address, :port => Webrat.configuration.application_port.to_i
|
||||
end
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ describe Webrat, "Selenium" do
|
|||
it "should start the app server with correct config options" do
|
||||
pid_file = "file"
|
||||
Webrat.should_receive(:prepare_pid_file).with("#{RAILS_ROOT}/tmp/pids","mongrel_selenium.pid").and_return pid_file
|
||||
Webrat.should_receive(:system).with("mongrel_rails start -d --chdir=#{RAILS_ROOT} --port=#{Webrat.configuration.application_port} --environment=#{Webrat.configuration.application_environment} --pid #{pid_file} &")
|
||||
Webrat.should_receive(:system).with("mongrel_rails start -d --chdir='#{RAILS_ROOT}' --port=#{Webrat.configuration.application_port} --environment=#{Webrat.configuration.application_environment} --pid #{pid_file} &")
|
||||
TCPSocket.should_receive(:wait_for_service).with(:host => Webrat.configuration.application_address, :port => Webrat.configuration.application_port.to_i)
|
||||
Webrat.start_app_server
|
||||
end
|
||||
|
@ -56,4 +56,4 @@ describe Webrat, "Selenium" do
|
|||
Webrat.stop_selenium_server
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue