From 62230c7e0b5757789960482bd7cf3ac1918d3c41 Mon Sep 17 00:00:00 2001 From: Thomas Walpole Date: Mon, 13 May 2019 16:49:22 -0700 Subject: [PATCH] Fix spec typo and minor cleanup --- spec/selenium_spec_ie.rb | 5 +---- spec/server_spec.rb | 6 ++++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/spec/selenium_spec_ie.rb b/spec/selenium_spec_ie.rb index f32c7e04..edd1e86a 100644 --- a/spec/selenium_spec_ie.rb +++ b/spec/selenium_spec_ie.rb @@ -39,7 +39,6 @@ Capybara.register_driver :selenium_ie do |app| browser: :remote, options: options, url: url).tap do |driver| - puts driver.browser.capabilities.inspect driver.browser.file_detector = lambda do |args| str = args.first.to_s str if File.exist?(str) @@ -50,9 +49,7 @@ Capybara.register_driver :selenium_ie do |app| app, browser: :ie, options: options - ).tap do |driver| - puts driver.browser.capabilities.inspect - end + ) end end diff --git a/spec/server_spec.rb b/spec/server_spec.rb index 69edec2a..b2625241 100644 --- a/spec/server_spec.rb +++ b/spec/server_spec.rb @@ -83,8 +83,10 @@ RSpec.describe Capybara::Server do server = Capybara::Server.new(app).boot expect do - Net::HTTP.start(server.host, server.port, max_retries: 0) { |http| http.get('/__idntify__') } - end.to raise_error(EOFError) + Net::HTTP.start(server.host, server.port, max_retries: 0) { |http| http.get('/__identify__') } + end.to(raise_error do |e| + expect(e.is_a?(EOFError) || e.is_a?(Net::ReadTimeout)).to be true + end) res = Net::HTTP.start(server.host, server.port, use_ssl: true, verify_mode: OpenSSL::SSL::VERIFY_NONE) do |https| https.get('/')