Changeset 467
- Timestamp:
- 01/20/05 14:43:59 (4 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/test_process.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r463 r467 1 1 *SVN* 2 3 * Added TestResponse#binary_content that'll return as a string the data sent through send_data/send_file for testing #500 [Alexey] 2 4 3 5 * Added @request.env['RAW_POST_DATA'] for people who need access to the data before Ruby's CGI has parsed it #505 [bitsweat] trunk/actionpack/lib/action_controller/test_process.rb
r402 r467 192 192 end 193 193 194 # Returns binary content (downloadable file), converted to a String 195 def binary_content 196 raise "Response body is not a Proc: #{body.inspect}" unless body.kind_of?(Proc) 197 require 'stringio' 198 199 sio = StringIO.new 200 201 begin 202 $stdout = sio 203 body.call 204 ensure 205 $stdout = STDOUT 206 end 207 208 sio.rewind 209 sio.read 210 end 194 211 end 195 212