Permalink
Browse files

Merge pull request #67 from dosire/uploaded_file_supports_template_at…

…tribute

Allow testers to request the tempfile attribute.
  • Loading branch information...
2 parents 5652789 + 1d452e3 commit 1b1e7308668391ac7498d67eb1927978f7634603 @brynary committed Nov 16, 2012
Showing with 5 additions and 0 deletions.
  1. +3 −0 lib/rack/test/uploaded_file.rb
  2. +2 −0 spec/rack/test/uploaded_file_spec.rb
@@ -14,6 +14,9 @@ class UploadedFile
# The filename, *not* including the path, of the "uploaded" file
attr_reader :original_filename
+ # The tempfile
+ attr_reader :tempfile
+
# The content type of the "uploaded" file
attr_accessor :content_type
@@ -17,6 +17,8 @@ def test_file_path
uploaded_file.should respond_to(:size)
uploaded_file.should respond_to(:unlink)
uploaded_file.should respond_to(:read)
+ uploaded_file.should respond_to(:original_filename)
+ uploaded_file.should respond_to(:tempfile) # Allows calls to params[:file].tempfile
end
end

0 comments on commit 1b1e730

Please sign in to comment.