1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Ruby 1.9 compatibility

This commit is contained in:
Jonas Nicklas 2009-12-19 11:52:08 +01:00
parent 3c85f392a2
commit 9aec17cbaf
2 changed files with 2 additions and 1 deletions

View file

@ -76,7 +76,7 @@ class Capybara::Driver::RackTest < Capybara::Driver::Base
merge_param!(params, select['name'].to_s, (option['value'] || option.text).to_s) if option
end
node.xpath(".//input[@type='file']").map do |input|
if input['value'].to_s.any?
unless input['value'].to_s.empty?
if multipart?
merge_param!(params, input['name'].to_s, Rack::Test::UploadedFile.new(input['value'].to_s))
else

View file

@ -1,5 +1,6 @@
require 'sinatra/base'
require 'rack'
require 'yaml'
class TestApp < Sinatra::Base
set :root, File.dirname(__FILE__)