class Capybara::RackTest::Form::NilUploadedFile
This only needs to inherit from Rack::Test::UploadedFile because Rack::Test checks for the class specifically when determining whether to construct the request as multipart. That check should be based solely on the form element's 'enctype' attribute value, which should probably be provided to Rack::Test in its non-GET request methods.
Public Class Methods
new()
click to toggle source
# File lib/capybara/rack_test/form.rb, line 8 def initialize @empty_file = Tempfile.new("nil_uploaded_file") @empty_file.close end
Public Instance Methods
content_type()
click to toggle source
# File lib/capybara/rack_test/form.rb, line 14 def content_type; "application/octet-stream"; end
original_filename()
click to toggle source
# File lib/capybara/rack_test/form.rb, line 13 def original_filename; ""; end
path()
click to toggle source
# File lib/capybara/rack_test/form.rb, line 15 def path; @empty_file.path; end