From dab08597417d55a1e9819781427aa2097ecdf2fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Gil=20P=C3=A9rez=20de=20la=20Manga?= Date: Thu, 20 Sep 2012 11:57:38 +0200 Subject: Delegate ActionDispatch::Http::UploadedFile#close to tempfile --- actionpack/test/dispatch/uploaded_file_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actionpack/test/dispatch') diff --git a/actionpack/test/dispatch/uploaded_file_test.rb b/actionpack/test/dispatch/uploaded_file_test.rb index e69c1fbed4..c921a16a4f 100644 --- a/actionpack/test/dispatch/uploaded_file_test.rb +++ b/actionpack/test/dispatch/uploaded_file_test.rb @@ -45,6 +45,12 @@ module ActionDispatch assert_equal 'thunderhorse', uf.open end + def test_delegates_close_to_tempfile + tf = Class.new { def close; 'thunderhorse' end } + uf = Http::UploadedFile.new(:tempfile => tf.new) + assert_equal 'thunderhorse', uf.close + end + def test_delegates_to_tempfile tf = Class.new { def read; 'thunderhorse' end } uf = Http::UploadedFile.new(:tempfile => tf.new) -- cgit v1.2.3