Methods
- C
- E
- O
- P
- R
- T
-
- test_close_accepts_parameter,
- test_constructor_with_argument_error,
- test_content_type,
- test_delegate_eof_to_tempfile,
- test_delegate_respects_respond_to?,
- test_delegates_close_to_tempfile,
- test_delegates_open_to_tempfile,
- test_delegates_path_to_tempfile,
- test_delegates_read_to_tempfile,
- test_delegates_read_to_tempfile_with_params,
- test_filename_should_always_be_in_utf_8,
- test_filename_should_be_in_utf_8,
- test_headers,
- test_original_filename,
- test_respond_to?,
- test_tempfile,
- test_to_io_returns_the_tempfile
Instance Public methods
close(unlink_now=false)
Link
eof?()
Link
open()
Link
path()
Link
read(length=nil, buffer=nil)
Link
test_close_accepts_parameter()
Link
# File actionpack/test/dispatch/uploaded_file_test.rb, line 66 def test_close_accepts_parameter tf = Class.new { def close(unlink_now=false); "thunderhorse: #{unlink_now}" end } uf = Http::UploadedFile.new(:tempfile => tf.new) assert_equal 'thunderhorse: true', uf.close(true) end
test_constructor_with_argument_error()
Link
test_content_type()
Link
test_delegate_eof_to_tempfile()
Link
test_delegate_respects_respond_to?()
Link
# File actionpack/test/dispatch/uploaded_file_test.rb, line 84 def test_delegate_respects_respond_to? tf = Class.new { def read; yield end; private :read } uf = Http::UploadedFile.new(:tempfile => tf.new) assert_raises(NoMethodError) do uf.read end end def test_delegate_eof_to_tempfile tf = Class.new { def eof?; true end; } uf = Http::UploadedFile.new(:tempfile => tf.new) assert uf.eof? end def test_respond_to? tf = Class.new { def read; yield end } uf = Http::UploadedFile.new(:tempfile => tf.new) assert uf.respond_to?(:headers), 'responds to headers' assert uf.respond_to?(:read), 'responds to read' end end end
test_delegates_close_to_tempfile()
Link
test_delegates_open_to_tempfile()
Link
test_delegates_path_to_tempfile()
Link
test_delegates_read_to_tempfile()
Link
test_delegates_read_to_tempfile_with_params()
Link
# File actionpack/test/dispatch/uploaded_file_test.rb, line 78 def test_delegates_read_to_tempfile_with_params tf = Class.new { def read(length=nil, buffer=nil); [length, buffer] end } uf = Http::UploadedFile.new(:tempfile => tf.new) assert_equal %w{ thunder horse }, uf.read(*%w{ thunder horse }) end
test_filename_should_always_be_in_utf_8()
Link
test_filename_should_be_in_utf_8()
Link
test_headers()
Link
test_original_filename()
Link
test_respond_to?()
Link
# File actionpack/test/dispatch/uploaded_file_test.rb, line 98 def test_respond_to? tf = Class.new { def read; yield end } uf = Http::UploadedFile.new(:tempfile => tf.new) assert uf.respond_to?(:headers), 'responds to headers' assert uf.respond_to?(:read), 'responds to read' end end
test_tempfile()
Link