提交 f06cae36 编写于 作者: R Rick Olson

Require Tempfile explicitly for TestUploadedFile due to changes in class auto...

Require Tempfile explicitly for TestUploadedFile due to changes in class auto loading.  [Rick Olson]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4734 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 4679e1bf
*SVN*
* Require Tempfile explicitly for TestUploadedFile due to changes in class auto loading. [Rick Olson]
* Add RoutingError exception when RouteSet fails to generate a path from a Named Route. [Rick Olson]
* Replace Reloadable with Reloadable::Deprecated. [Nicholas Seckar]
......
......@@ -305,6 +305,7 @@ def delete() @attributes = {} end
#
# Usage example, within a functional test:
# post :change_avatar, :avatar => ActionController::TestUploadedFile.new(Test::Unit::TestCase.fixture_path + '/files/spongebob.png', 'image/png')
require 'tempfile'
class TestUploadedFile
# The filename, *not* including the path, of the "uploaded" file
attr_reader :original_filename
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册