add the TestCase.fixture_path when testing file uploads

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4058 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Rick Olson
2006-03-27 02:24:47 +00:00
parent 8935209629
commit 3f496c6638

View File

@@ -436,7 +436,7 @@ module ActionController #:nodoc:
# post :change_avatar, :avatar => fixture_file_upload('/files/spongebob.png', 'image/png')
def fixture_file_upload(path, mime_type = nil)
ActionController::TestUploadedFile.new(
Test::Unit::TestCase.respond_to?(:fixture_path) ? Test::Unit::TestCase + path : path,
Test::Unit::TestCase.respond_to?(:fixture_path) ? Test::Unit::TestCase.fixture_path + path : path,
mime_type
)
end