diff --git a/lib/capybara/driver/base.rb b/lib/capybara/driver/base.rb index 114fb013..6f104014 100644 --- a/lib/capybara/driver/base.rb +++ b/lib/capybara/driver/base.rb @@ -68,7 +68,7 @@ class Capybara::Driver::Base end def frame_title - title = find_xpath('/html/head/title').map(&:all_text).first.to_s + find_xpath('/html/head/title').map(&:all_text).first.to_s end def frame_url diff --git a/lib/capybara/spec/session/attach_file_spec.rb b/lib/capybara/spec/session/attach_file_spec.rb index 0331d6d1..c3ce7a41 100644 --- a/lib/capybara/spec/session/attach_file_spec.rb +++ b/lib/capybara/spec/session/attach_file_spec.rb @@ -133,14 +133,14 @@ Capybara::SpecHelper.spec "#attach_file" do expect do @session.attach_file("hidden_file", with_os_path_separators(__FILE__), - make_visible: {opacity: 1, display: 'block'}) + make_visible: { opacity: 1, display: 'block' }) end.not_to raise_error end it "raises an error when the file input is not made visible" do @session.visit('/with_js') expect do - @session.attach_file("hidden_file", with_os_path_separators(__FILE__), make_visible: {color: 'red'}) + @session.attach_file("hidden_file", with_os_path_separators(__FILE__), make_visible: { color: 'red' }) end.to raise_error(Capybara::ExpectationNotMet) end @@ -151,7 +151,6 @@ Capybara::SpecHelper.spec "#attach_file" do end end - private def with_os_path_separators(path) diff --git a/lib/capybara/spec/session/current_url_spec.rb b/lib/capybara/spec/session/current_url_spec.rb index 440ae8b3..23e221bf 100644 --- a/lib/capybara/spec/session/current_url_spec.rb +++ b/lib/capybara/spec/session/current_url_spec.rb @@ -115,5 +115,4 @@ Capybara::SpecHelper.spec '#current_url, #current_path, #current_host' do end end end - end diff --git a/spec/server_spec.rb b/spec/server_spec.rb index aecca8e1..b2c24aa5 100644 --- a/spec/server_spec.rb +++ b/spec/server_spec.rb @@ -35,7 +35,7 @@ RSpec.describe Capybara::Server do ensure Capybara.server_host = nil end - end unless (ENV['TRAVIS'] && (RUBY_ENGINE == 'jruby') or Gem.win_platform?) + end unless ENV['TRAVIS'] && (RUBY_ENGINE == 'jruby') or Gem.win_platform? it "should use specified port" do Capybara.server_port = 22789