diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-05-02 15:29:18 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-05-02 15:29:18 -0500 |
commit | f32cf44870549c6cc5b6e6c84cffc1facf6ec38e (patch) | |
tree | 320e7398d1e6e4f3f372cd2ee90d1e2560459f10 /actionpack/lib/action_dispatch/testing | |
parent | a8b75c480fc9774252f5976dcf1a614079822e56 (diff) | |
download | rails-f32cf44870549c6cc5b6e6c84cffc1facf6ec38e.tar.gz rails-f32cf44870549c6cc5b6e6c84cffc1facf6ec38e.tar.bz2 rails-f32cf44870549c6cc5b6e6c84cffc1facf6ec38e.zip |
Switch functional tests to run through the rack interface instead of process
Diffstat (limited to 'actionpack/lib/action_dispatch/testing')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/test_request.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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 |