Changeset 3908
- Timestamp:
- 03/18/06 03:27:37 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/lib/action_controller/integration_test.rb
r3840 r3908 27 27 28 28 # The hostname used in the last request. 29 attr_reader :host 29 attr_accessor :host 30 31 # The remote_addr used in the last request. 32 attr_accessor :remote_addr 30 33 31 34 # A map of the cookies returned by the last response, and which will be … … 62 65 @controller = @request = @response = nil 63 66 64 host! "www.example.test" 67 self.host = "www.example.test" 68 self.remote_addr = "127.0.0.1" 65 69 66 70 unless @named_routes_configured … … 99 103 @host = name 100 104 end 101 102 # To make setting the host more natural when using a session object103 # directly: foo.host = "blah"104 alias_method :host=, :host!105 105 106 106 # Follow a single redirect response. If the last response was not a … … 205 205 "REQUEST_URI" => path, 206 206 "HTTP_HOST" => host, 207 "REMOTE_ADDR" => remote_addr, 207 208 "SERVER_PORT" => (https? ? "443" : "80"), 208 209 "CONTENT_TYPE" => "application/x-www-form-urlencoded", … … 430 431 # changes to those variables. So, we make those two attributes copy-on-write. 431 432 432 class <<self433 class << self 433 434 def use_transactional_fixtures=(flag) #:nodoc: 434 435 @_use_transactional_fixtures = true