From 2d05c203d79bca7b3b093c37f866ee41f294925b Mon Sep 17 00:00:00 2001 From: Thomas Walpole Date: Sun, 23 Oct 2022 08:11:13 -0700 Subject: [PATCH] Code style updates --- lib/capybara/session.rb | 2 +- spec/rspec/shared_spec_matchers.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/capybara/session.rb b/lib/capybara/session.rb index d5b426e88..a22c70db8 100644 --- a/lib/capybara/session.rb +++ b/lib/capybara/session.rb @@ -162,7 +162,7 @@ def raise_server_error! if config.raise_server_errors raise CapybaraError, 'Your application server raised an error - It has been raised in your test code because Capybara.raise_server_errors == true' end - rescue CapybaraError => capy_error + rescue CapybaraError => capy_error # rubocop:disable Naming/RescuedExceptionsVariableName raise @server.error, cause: capy_error ensure @server.reset_error! diff --git a/spec/rspec/shared_spec_matchers.rb b/spec/rspec/shared_spec_matchers.rb index 247c9bf8e..9c615dc58 100644 --- a/spec/rspec/shared_spec_matchers.rb +++ b/spec/rspec/shared_spec_matchers.rb @@ -120,7 +120,7 @@ describe 'have_xpath matcher' do it 'gives proper description' do - expect(have_xpath('//h1').description).to eq("have visible xpath \"\/\/h1\"") + expect(have_xpath('//h1').description).to eq('have visible xpath "//h1"') end context 'on a string' do