diff --git a/lib/capybara/spec/session/node_spec.rb b/lib/capybara/spec/session/node_spec.rb index c0fa138c6..b2ae26ca8 100644 --- a/lib/capybara/spec/session/node_spec.rb +++ b/lib/capybara/spec/session/node_spec.rb @@ -686,7 +686,7 @@ @session.visit('/with_js') target = @session.find('//div[@id="drop_html5"]') target.drop( - Pathname.new with_os_path_separators(File.expand_path('../fixtures/capybara.jpg', File.dirname(__FILE__))) + Pathname.new(with_os_path_separators(File.expand_path('../fixtures/capybara.jpg', File.dirname(__FILE__)))) ) expect(@session).to have_xpath('//div[contains(., "HTML5 Dropped file: capybara.jpg")]') end