show missing file path on failed fixture_file_upload
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4631 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
d02c07dbb9
commit
efff453148
@ -313,7 +313,7 @@ class TestUploadedFile
|
||||
attr_reader :content_type
|
||||
|
||||
def initialize(path, content_type = 'text/plain')
|
||||
raise "file does not exist" unless File.exist?(path)
|
||||
raise "#{path} file does not exist" unless File.exist?(path)
|
||||
@content_type = content_type
|
||||
@original_filename = path.sub(/^.*#{File::SEPARATOR}([^#{File::SEPARATOR}]+)$/) { $1 }
|
||||
@tempfile = Tempfile.new(@original_filename)
|
||||
|
Loading…
Reference in New Issue
Block a user