From 4b4ac5ed5d62cab76790661ba92a9ac4d5f1c105 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 25 Feb 2010 15:05:14 -0800 Subject: unicorn_rails: make this "working_directory"-aware The temporary paths we create to mimic script/server-emulation did not work when working_directory was used. Now we defer path creation until after working_directory is bound. --- test/rails/test_rails.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/rails/test_rails.rb b/test/rails/test_rails.rb index 9502dcb..304f519 100644 --- a/test/rails/test_rails.rb +++ b/test/rails/test_rails.rb @@ -92,9 +92,6 @@ logger Logger.new('#{COMMON_TMP.path}') redirect_test_io { @pid = fork { exec 'unicorn_rails', "-l#@addr:#@port" } } wait_master_ready("test_stderr.#$$.log") - # temp dirs exist - tmp_dirs.each { |dir| assert(File.directory?("tmp/#{dir}")) } - # basic GET res = Net::HTTP.get_response(URI.parse("http://#@addr:#@port/foo")) assert_equal "FOO\n", res.body @@ -102,6 +99,9 @@ logger Logger.new('#{COMMON_TMP.path}') assert_equal "4", res['Content-Length'] assert_equal "200 OK", res['Status'] + # temp dirs exist + tmp_dirs.each { |dir| assert(File.directory?("tmp/#{dir}")) } + # can we set cookies? res = Net::HTTP.get_response(URI.parse("http://#@addr:#@port/foo/xcookie")) assert_equal "200", res.code -- cgit v1.2.3-24-ge0c7