aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/abstract_unit.rb
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2010-10-22 15:34:45 +0100
committerAndrew White <andyw@pixeltrix.co.uk>2010-10-25 16:36:35 +0100
commit2d5a12a50bcd83fcc99865de759b82e661b28698 (patch)
tree9adf7180e8ad739d69a6fc46e46955d6d6969a47 /actionpack/test/abstract_unit.rb
parentcdce5fc8860982afa63bfa82f6a752972e7f7d19 (diff)
downloadrails-2d5a12a50bcd83fcc99865de759b82e661b28698.tar.gz
rails-2d5a12a50bcd83fcc99865de759b82e661b28698.tar.bz2
rails-2d5a12a50bcd83fcc99865de759b82e661b28698.zip
Don't write out secure cookies unless the request is secure
Diffstat (limited to 'actionpack/test/abstract_unit.rb')
-rw-r--r--actionpack/test/abstract_unit.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb
index 470b36dbe2..92597e40ff 100644
--- a/actionpack/test/abstract_unit.rb
+++ b/actionpack/test/abstract_unit.rb
@@ -47,6 +47,11 @@ end
require 'pp' # require 'pp' early to prevent hidden_methods from not picking up the pretty-print methods until too late
module Rails
+ class << self
+ def env
+ @_env ||= ActiveSupport::StringInquirer.new(ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "test")
+ end
+ end
end
ActiveSupport::Dependencies.hook!