From f32cf44870549c6cc5b6e6c84cffc1facf6ec38e Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sat, 2 May 2009 15:29:18 -0500 Subject: Switch functional tests to run through the rack interface instead of process --- actionpack/lib/action_dispatch/testing/test_request.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/testing/test_request.rb b/actionpack/lib/action_dispatch/testing/test_request.rb index 5d8cd7e619..20288aa7a5 100644 --- a/actionpack/lib/action_dispatch/testing/test_request.rb +++ b/actionpack/lib/action_dispatch/testing/test_request.rb @@ -16,6 +16,7 @@ module ActionDispatch def env write_cookies! + delete_nil_values! super end @@ -74,5 +75,9 @@ module ActionDispatch @env['HTTP_COOKIE'] = @cookies.map { |name, value| "#{name}=#{value};" }.join(' ') end end + + def delete_nil_values! + @env.delete_if { |k, v| v.nil? } + end end end -- cgit v1.2.3