From 5a241fd12e96680721725fcc633963e1df85392a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 18 Feb 2007 11:41:39 +0000 Subject: file upload test now uses ActionController::TestUploadedFile git-svn-id: http://redmine.rubyforge.org/svn/trunk@251 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/test_helper.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test/test_helper.rb') diff --git a/test/test_helper.rb b/test/test_helper.rb index 2e4f7dcd0..b5218c29b 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -53,3 +53,20 @@ class Test::Unit::TestCase assert_equal login, User.find(session[:user_id]).login end end + + +# ActionController::TestUploadedFile bug +# see http://dev.rubyonrails.org/ticket/4635 +class String + def original_filename + "testfile.txt" + end + + def content_type + "text/plain" + end + + def read + self.to_s + end +end \ No newline at end of file -- cgit v1.2.3