From 07e777742532ba4a0e4957f3241fc4fb6a903e86 Mon Sep 17 00:00:00 2001 From: Thomas Walpole Date: Mon, 7 Mar 2016 16:52:19 -0800 Subject: [PATCH] frozen literal magic comment --- features/step_definitions/capybara_steps.rb | 1 + features/support/env.rb | 1 + lib/capybara.rb | 1 + lib/capybara/cucumber.rb | 1 + lib/capybara/driver/base.rb | 1 + lib/capybara/driver/node.rb | 1 + lib/capybara/dsl.rb | 1 + lib/capybara/helpers.rb | 1 + lib/capybara/node/actions.rb | 1 + lib/capybara/node/base.rb | 1 + lib/capybara/node/document.rb | 1 + lib/capybara/node/document_matchers.rb | 1 + lib/capybara/node/element.rb | 1 + lib/capybara/node/finders.rb | 1 + lib/capybara/node/matchers.rb | 1 + lib/capybara/node/simple.rb | 1 + lib/capybara/queries/base_query.rb | 1 + lib/capybara/queries/current_path_query.rb | 1 + lib/capybara/queries/text_query.rb | 1 + lib/capybara/queries/title_query.rb | 1 + lib/capybara/query.rb | 1 + lib/capybara/rack_test/browser.rb | 1 + lib/capybara/rack_test/css_handlers.rb | 1 + lib/capybara/rack_test/driver.rb | 1 + lib/capybara/rack_test/form.rb | 1 + lib/capybara/rack_test/node.rb | 1 + lib/capybara/rails.rb | 1 + lib/capybara/result.rb | 1 + lib/capybara/rspec.rb | 1 + lib/capybara/rspec/features.rb | 1 + lib/capybara/rspec/matchers.rb | 1 + lib/capybara/selector.rb | 1 + lib/capybara/selenium/driver.rb | 1 + lib/capybara/selenium/node.rb | 1 + lib/capybara/server.rb | 1 + lib/capybara/session.rb | 1 + lib/capybara/session/matchers.rb | 3 ++- lib/capybara/spec/session/accept_alert_spec.rb | 3 ++- lib/capybara/spec/session/accept_confirm_spec.rb | 3 ++- lib/capybara/spec/session/accept_prompt_spec.rb | 3 ++- lib/capybara/spec/session/all_spec.rb | 1 + lib/capybara/spec/session/assert_current_path.rb | 1 + lib/capybara/spec/session/assert_selector.rb | 1 + lib/capybara/spec/session/assert_text.rb | 1 + lib/capybara/spec/session/assert_title.rb | 1 + lib/capybara/spec/session/attach_file_spec.rb | 1 + lib/capybara/spec/session/body_spec.rb | 1 + lib/capybara/spec/session/check_spec.rb | 1 + lib/capybara/spec/session/choose_spec.rb | 1 + lib/capybara/spec/session/click_button_spec.rb | 1 + lib/capybara/spec/session/click_link_or_button_spec.rb | 1 + lib/capybara/spec/session/click_link_spec.rb | 1 + lib/capybara/spec/session/current_scope_spec.rb | 3 ++- lib/capybara/spec/session/current_url_spec.rb | 1 + lib/capybara/spec/session/dismiss_confirm_spec.rb | 3 ++- lib/capybara/spec/session/dismiss_prompt_spec.rb | 3 ++- lib/capybara/spec/session/evaluate_script_spec.rb | 1 + lib/capybara/spec/session/execute_script_spec.rb | 1 + lib/capybara/spec/session/fill_in_spec.rb | 1 + lib/capybara/spec/session/find_button_spec.rb | 1 + lib/capybara/spec/session/find_by_id_spec.rb | 1 + lib/capybara/spec/session/find_field_spec.rb | 1 + lib/capybara/spec/session/find_link_spec.rb | 1 + lib/capybara/spec/session/find_spec.rb | 1 + lib/capybara/spec/session/first_spec.rb | 1 + lib/capybara/spec/session/go_back_spec.rb | 1 + lib/capybara/spec/session/go_forward_spec.rb | 1 + lib/capybara/spec/session/has_button_spec.rb | 1 + lib/capybara/spec/session/has_css_spec.rb | 1 + lib/capybara/spec/session/has_current_path_spec.rb | 1 + lib/capybara/spec/session/has_field_spec.rb | 1 + lib/capybara/spec/session/has_link_spec.rb | 1 + lib/capybara/spec/session/has_select_spec.rb | 1 + lib/capybara/spec/session/has_selector_spec.rb | 1 + lib/capybara/spec/session/has_table_spec.rb | 1 + lib/capybara/spec/session/has_text_spec.rb | 1 + lib/capybara/spec/session/has_title_spec.rb | 1 + lib/capybara/spec/session/has_xpath_spec.rb | 1 + lib/capybara/spec/session/headers.rb | 1 + lib/capybara/spec/session/html_spec.rb | 1 + lib/capybara/spec/session/node_spec.rb | 1 + lib/capybara/spec/session/reset_session_spec.rb | 1 + lib/capybara/spec/session/response_code.rb | 1 + lib/capybara/spec/session/save_and_open_page_spec.rb | 1 + lib/capybara/spec/session/save_and_open_screenshot_spec.rb | 1 + lib/capybara/spec/session/save_page_spec.rb | 1 + lib/capybara/spec/session/save_screenshot_spec.rb | 1 + lib/capybara/spec/session/screenshot_spec.rb | 4 +++- lib/capybara/spec/session/select_spec.rb | 1 + lib/capybara/spec/session/text_spec.rb | 1 + lib/capybara/spec/session/title_spec.rb | 3 ++- lib/capybara/spec/session/uncheck_spec.rb | 1 + lib/capybara/spec/session/unselect_spec.rb | 1 + lib/capybara/spec/session/visit_spec.rb | 1 + lib/capybara/spec/session/window/become_closed_spec.rb | 1 + lib/capybara/spec/session/window/current_window_spec.rb | 1 + lib/capybara/spec/session/window/open_new_window_spec.rb | 1 + lib/capybara/spec/session/window/switch_to_window_spec.rb | 1 + lib/capybara/spec/session/window/window_opened_by_spec.rb | 1 + lib/capybara/spec/session/window/window_spec.rb | 1 + lib/capybara/spec/session/window/windows_spec.rb | 1 + lib/capybara/spec/session/window/within_window_spec.rb | 5 ++--- lib/capybara/spec/session/within_frame_spec.rb | 1 + lib/capybara/spec/session/within_spec.rb | 1 + lib/capybara/spec/spec_helper.rb | 1 + lib/capybara/spec/test_app.rb | 1 + lib/capybara/spec/views/buttons.erb | 1 + lib/capybara/spec/views/fieldsets.erb | 3 ++- lib/capybara/spec/views/form.erb | 1 + lib/capybara/spec/views/frame_child.erb | 3 ++- lib/capybara/spec/views/frame_one.erb | 3 ++- lib/capybara/spec/views/frame_parent.erb | 3 ++- lib/capybara/spec/views/frame_two.erb | 3 ++- lib/capybara/spec/views/header_links.erb | 1 + lib/capybara/spec/views/host_links.erb | 1 + lib/capybara/spec/views/path.erb | 1 + lib/capybara/spec/views/popup_one.erb | 1 + lib/capybara/spec/views/popup_two.erb | 1 + lib/capybara/spec/views/postback.erb | 3 ++- lib/capybara/spec/views/tables.erb | 1 + lib/capybara/spec/views/with_base_tag.erb | 1 + lib/capybara/spec/views/with_count.erb | 3 ++- lib/capybara/spec/views/with_hover.erb | 3 ++- lib/capybara/spec/views/with_html.erb | 1 + lib/capybara/spec/views/with_html_entities.erb | 1 + lib/capybara/spec/views/with_js.erb | 1 + lib/capybara/spec/views/with_scope.erb | 1 + lib/capybara/spec/views/with_simple_html.erb | 3 ++- lib/capybara/spec/views/with_title.erb | 3 ++- lib/capybara/spec/views/with_windows.erb | 1 + lib/capybara/spec/views/within_frames.erb | 3 ++- lib/capybara/version.rb | 1 + lib/capybara/window.rb | 1 + spec/basic_node_spec.rb | 1 + spec/capybara_spec.rb | 1 + spec/dsl_spec.rb | 1 + spec/fixtures/selenium_driver_rspec_failure.rb | 1 + spec/fixtures/selenium_driver_rspec_success.rb | 1 + spec/rack_test_spec.rb | 1 + spec/result_spec.rb | 1 + spec/rspec/features_spec.rb | 1 + spec/rspec/matchers_spec.rb | 1 + spec/rspec/scenarios_spec.rb | 1 + spec/rspec/views_spec.rb | 1 + spec/rspec_spec.rb | 1 + spec/selector_spec.rb | 1 + spec/selenium_spec.rb | 1 + spec/selenium_spec_chrome.rb | 1 + spec/server_spec.rb | 1 + spec/spec_helper.rb | 1 + 150 files changed, 172 insertions(+), 23 deletions(-) diff --git a/features/step_definitions/capybara_steps.rb b/features/step_definitions/capybara_steps.rb index 76ab1ed6..c0940505 100644 --- a/features/step_definitions/capybara_steps.rb +++ b/features/step_definitions/capybara_steps.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true When /^I visit the (?:root|home) page$/ do visit('/') end diff --git a/features/support/env.rb b/features/support/env.rb index ea3f0bff..66d970b7 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'rubygems' require 'bundler/setup' diff --git a/lib/capybara.rb b/lib/capybara.rb index 7a175983..26ed328d 100644 --- a/lib/capybara.rb +++ b/lib/capybara.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'timeout' require 'nokogiri' require 'xpath' diff --git a/lib/capybara/cucumber.rb b/lib/capybara/cucumber.rb index 9f98124c..f9e9e76e 100644 --- a/lib/capybara/cucumber.rb +++ b/lib/capybara/cucumber.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'capybara/dsl' require 'capybara/rspec/matchers' diff --git a/lib/capybara/driver/base.rb b/lib/capybara/driver/base.rb index 6bf105cf..dd2b037b 100644 --- a/lib/capybara/driver/base.rb +++ b/lib/capybara/driver/base.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Capybara::Driver::Base def current_url raise NotImplementedError diff --git a/lib/capybara/driver/node.rb b/lib/capybara/driver/node.rb index 0f364bfb..798e442a 100644 --- a/lib/capybara/driver/node.rb +++ b/lib/capybara/driver/node.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Capybara module Driver class Node diff --git a/lib/capybara/dsl.rb b/lib/capybara/dsl.rb index eb166e21..994b26b1 100644 --- a/lib/capybara/dsl.rb +++ b/lib/capybara/dsl.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'capybara' module Capybara diff --git a/lib/capybara/helpers.rb b/lib/capybara/helpers.rb index 0cb81fd9..408f2bff 100644 --- a/lib/capybara/helpers.rb +++ b/lib/capybara/helpers.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true module Capybara diff --git a/lib/capybara/node/actions.rb b/lib/capybara/node/actions.rb index 6312df4c..9702979d 100644 --- a/lib/capybara/node/actions.rb +++ b/lib/capybara/node/actions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Capybara module Node module Actions diff --git a/lib/capybara/node/base.rb b/lib/capybara/node/base.rb index f5d73f36..37c80148 100644 --- a/lib/capybara/node/base.rb +++ b/lib/capybara/node/base.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Capybara module Node diff --git a/lib/capybara/node/document.rb b/lib/capybara/node/document.rb index 88a9346d..e5e9a53d 100644 --- a/lib/capybara/node/document.rb +++ b/lib/capybara/node/document.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Capybara module Node diff --git a/lib/capybara/node/document_matchers.rb b/lib/capybara/node/document_matchers.rb index e1c61313..0bdec0f2 100644 --- a/lib/capybara/node/document_matchers.rb +++ b/lib/capybara/node/document_matchers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Capybara module Node module DocumentMatchers diff --git a/lib/capybara/node/element.rb b/lib/capybara/node/element.rb index bd5bedbd..4abb33e2 100644 --- a/lib/capybara/node/element.rb +++ b/lib/capybara/node/element.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Capybara module Node diff --git a/lib/capybara/node/finders.rb b/lib/capybara/node/finders.rb index 06cec29a..56f24612 100644 --- a/lib/capybara/node/finders.rb +++ b/lib/capybara/node/finders.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Capybara module Node module Finders diff --git a/lib/capybara/node/matchers.rb b/lib/capybara/node/matchers.rb index 8fd202f3..6912b8ed 100644 --- a/lib/capybara/node/matchers.rb +++ b/lib/capybara/node/matchers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Capybara module Node module Matchers diff --git a/lib/capybara/node/simple.rb b/lib/capybara/node/simple.rb index 85f0b997..ed96b229 100644 --- a/lib/capybara/node/simple.rb +++ b/lib/capybara/node/simple.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Capybara module Node diff --git a/lib/capybara/queries/base_query.rb b/lib/capybara/queries/base_query.rb index 7850c0b6..c5e3b047 100644 --- a/lib/capybara/queries/base_query.rb +++ b/lib/capybara/queries/base_query.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Capybara # @api private module Queries diff --git a/lib/capybara/queries/current_path_query.rb b/lib/capybara/queries/current_path_query.rb index dc15f455..86050aea 100644 --- a/lib/capybara/queries/current_path_query.rb +++ b/lib/capybara/queries/current_path_query.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'addressable/uri' module Capybara diff --git a/lib/capybara/queries/text_query.rb b/lib/capybara/queries/text_query.rb index 836c4033..b17cdbd6 100644 --- a/lib/capybara/queries/text_query.rb +++ b/lib/capybara/queries/text_query.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Capybara # @api private module Queries diff --git a/lib/capybara/queries/title_query.rb b/lib/capybara/queries/title_query.rb index e69e908f..b6ffdfaa 100644 --- a/lib/capybara/queries/title_query.rb +++ b/lib/capybara/queries/title_query.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Capybara # @api private module Queries diff --git a/lib/capybara/query.rb b/lib/capybara/query.rb index 0bb3b363..5ff43a2a 100644 --- a/lib/capybara/query.rb +++ b/lib/capybara/query.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Capybara # @deprecated This class and its methods are not supposed to be used by users of Capybara's public API. # It may be removed in future versions of Capybara. diff --git a/lib/capybara/rack_test/browser.rb b/lib/capybara/rack_test/browser.rb index 730266de..62dc44e4 100644 --- a/lib/capybara/rack_test/browser.rb +++ b/lib/capybara/rack_test/browser.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Capybara::RackTest::Browser include ::Rack::Test::Methods diff --git a/lib/capybara/rack_test/css_handlers.rb b/lib/capybara/rack_test/css_handlers.rb index fd5fa20a..714d6754 100644 --- a/lib/capybara/rack_test/css_handlers.rb +++ b/lib/capybara/rack_test/css_handlers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Capybara::RackTest::CSSHandlers < BasicObject include ::Kernel diff --git a/lib/capybara/rack_test/driver.rb b/lib/capybara/rack_test/driver.rb index 89ce48d3..18622512 100644 --- a/lib/capybara/rack_test/driver.rb +++ b/lib/capybara/rack_test/driver.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'rack/test' require 'rack/utils' require 'mime/types' diff --git a/lib/capybara/rack_test/form.rb b/lib/capybara/rack_test/form.rb index 6bc8fabe..3459b36f 100644 --- a/lib/capybara/rack_test/form.rb +++ b/lib/capybara/rack_test/form.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Capybara::RackTest::Form < Capybara::RackTest::Node # This only needs to inherit from Rack::Test::UploadedFile because Rack::Test checks for # the class specifically when determining whether to construct the request as multipart. diff --git a/lib/capybara/rack_test/node.rb b/lib/capybara/rack_test/node.rb index 31fb9096..ef70aed2 100644 --- a/lib/capybara/rack_test/node.rb +++ b/lib/capybara/rack_test/node.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Capybara::RackTest::Node < Capybara::Driver::Node def all_text Capybara::Helpers.normalize_whitespace(native.text) diff --git a/lib/capybara/rails.rb b/lib/capybara/rails.rb index c08f929b..130e3f7d 100644 --- a/lib/capybara/rails.rb +++ b/lib/capybara/rails.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'capybara/dsl' Capybara.app = Rack::Builder.new do diff --git a/lib/capybara/result.rb b/lib/capybara/result.rb index bd24045c..90731f6a 100644 --- a/lib/capybara/result.rb +++ b/lib/capybara/result.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'forwardable' module Capybara diff --git a/lib/capybara/rspec.rb b/lib/capybara/rspec.rb index 00d7fe8f..50f72a84 100644 --- a/lib/capybara/rspec.rb +++ b/lib/capybara/rspec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'capybara/dsl' require 'rspec/core' require 'capybara/rspec/matchers' diff --git a/lib/capybara/rspec/features.rb b/lib/capybara/rspec/features.rb index 679ac5a4..3b91b636 100644 --- a/lib/capybara/rspec/features.rb +++ b/lib/capybara/rspec/features.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true if RSpec::Core::Version::STRING.to_f >= 3.0 RSpec.shared_context "Capybara Features", :capybara_feature => true do instance_eval do diff --git a/lib/capybara/rspec/matchers.rb b/lib/capybara/rspec/matchers.rb index 2b27f8e1..7daf225d 100644 --- a/lib/capybara/rspec/matchers.rb +++ b/lib/capybara/rspec/matchers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Capybara module RSpecMatchers class Matcher diff --git a/lib/capybara/selector.rb b/lib/capybara/selector.rb index a9de1ea5..0a00b7a0 100644 --- a/lib/capybara/selector.rb +++ b/lib/capybara/selector.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Capybara class Selector class Filter diff --git a/lib/capybara/selenium/driver.rb b/lib/capybara/selenium/driver.rb index 9464343e..b8d69387 100644 --- a/lib/capybara/selenium/driver.rb +++ b/lib/capybara/selenium/driver.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "uri" class Capybara::Selenium::Driver < Capybara::Driver::Base diff --git a/lib/capybara/selenium/node.rb b/lib/capybara/selenium/node.rb index 338b9663..c23e5086 100644 --- a/lib/capybara/selenium/node.rb +++ b/lib/capybara/selenium/node.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Capybara::Selenium::Node < Capybara::Driver::Node def visible_text # Selenium doesn't normalize Unicode whitespace. diff --git a/lib/capybara/server.rb b/lib/capybara/server.rb index 68d96931..88a2af12 100644 --- a/lib/capybara/server.rb +++ b/lib/capybara/server.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'uri' require 'net/http' require 'rack' diff --git a/lib/capybara/session.rb b/lib/capybara/session.rb index 800f4ab6..87beabaa 100644 --- a/lib/capybara/session.rb +++ b/lib/capybara/session.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'capybara/session/matchers' module Capybara diff --git a/lib/capybara/session/matchers.rb b/lib/capybara/session/matchers.rb index 32ad9079..c09a797b 100644 --- a/lib/capybara/session/matchers.rb +++ b/lib/capybara/session/matchers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Capybara module SessionMatchers ## @@ -66,4 +67,4 @@ module Capybara return false end end -end \ No newline at end of file +end diff --git a/lib/capybara/spec/session/accept_alert_spec.rb b/lib/capybara/spec/session/accept_alert_spec.rb index 3fe51296..fc89e873 100644 --- a/lib/capybara/spec/session/accept_alert_spec.rb +++ b/lib/capybara/spec/session/accept_alert_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#accept_alert', :requires => [:modals] do before do @session.visit('/with_js') @@ -54,4 +55,4 @@ Capybara::SpecHelper.spec '#accept_alert', :requires => [:modals] do expect(@session).to have_xpath("//a[@id='open-slow-alert' and @opened='true']") end end -end \ No newline at end of file +end diff --git a/lib/capybara/spec/session/accept_confirm_spec.rb b/lib/capybara/spec/session/accept_confirm_spec.rb index 4386098a..f1dff765 100644 --- a/lib/capybara/spec/session/accept_confirm_spec.rb +++ b/lib/capybara/spec/session/accept_confirm_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#accept_confirm', :requires => [:modals] do before do @session.visit('/with_js') @@ -27,4 +28,4 @@ Capybara::SpecHelper.spec '#accept_confirm', :requires => [:modals] do }.not_to raise_error expect(@session).to have_xpath("//a[@id='open-twice' and @confirmed='false']") end -end \ No newline at end of file +end diff --git a/lib/capybara/spec/session/accept_prompt_spec.rb b/lib/capybara/spec/session/accept_prompt_spec.rb index 1a3b4c07..7186ff7d 100644 --- a/lib/capybara/spec/session/accept_prompt_spec.rb +++ b/lib/capybara/spec/session/accept_prompt_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#accept_prompt', :requires => [:modals] do before do @session.visit('/with_js') @@ -46,4 +47,4 @@ Capybara::SpecHelper.spec '#accept_prompt', :requires => [:modals] do end expect(message).to eq('Prompt opened') end -end \ No newline at end of file +end diff --git a/lib/capybara/spec/session/all_spec.rb b/lib/capybara/spec/session/all_spec.rb index 532b39ab..b7e05473 100644 --- a/lib/capybara/spec/session/all_spec.rb +++ b/lib/capybara/spec/session/all_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec "#all" do before do @session.visit('/with_html') diff --git a/lib/capybara/spec/session/assert_current_path.rb b/lib/capybara/spec/session/assert_current_path.rb index 6738d438..703d4997 100644 --- a/lib/capybara/spec/session/assert_current_path.rb +++ b/lib/capybara/spec/session/assert_current_path.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#assert_current_path' do before do @session.visit('/with_js') diff --git a/lib/capybara/spec/session/assert_selector.rb b/lib/capybara/spec/session/assert_selector.rb index 7b6cdc8d..ea99219b 100644 --- a/lib/capybara/spec/session/assert_selector.rb +++ b/lib/capybara/spec/session/assert_selector.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#assert_selector' do before do @session.visit('/with_html') diff --git a/lib/capybara/spec/session/assert_text.rb b/lib/capybara/spec/session/assert_text.rb index 61b91a83..b8fb9c42 100644 --- a/lib/capybara/spec/session/assert_text.rb +++ b/lib/capybara/spec/session/assert_text.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#assert_text' do it "should be true if the given text is on the page" do @session.visit('/with_html') diff --git a/lib/capybara/spec/session/assert_title.rb b/lib/capybara/spec/session/assert_title.rb index 377f780f..0205a999 100644 --- a/lib/capybara/spec/session/assert_title.rb +++ b/lib/capybara/spec/session/assert_title.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#assert_title' do before do @session.visit('/with_js') diff --git a/lib/capybara/spec/session/attach_file_spec.rb b/lib/capybara/spec/session/attach_file_spec.rb index 5c014118..40e6cdb0 100644 --- a/lib/capybara/spec/session/attach_file_spec.rb +++ b/lib/capybara/spec/session/attach_file_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec "#attach_file" do before do @test_file_path = File.expand_path('../fixtures/test_file.txt', File.dirname(__FILE__)) diff --git a/lib/capybara/spec/session/body_spec.rb b/lib/capybara/spec/session/body_spec.rb index bb7a6fad..1344f1e6 100644 --- a/lib/capybara/spec/session/body_spec.rb +++ b/lib/capybara/spec/session/body_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#body' do it "should return the unmodified page body" do @session.visit('/') diff --git a/lib/capybara/spec/session/check_spec.rb b/lib/capybara/spec/session/check_spec.rb index bee1219c..12dc16d1 100644 --- a/lib/capybara/spec/session/check_spec.rb +++ b/lib/capybara/spec/session/check_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec "#check" do before do @session.visit('/form') diff --git a/lib/capybara/spec/session/choose_spec.rb b/lib/capybara/spec/session/choose_spec.rb index 4959b64d..24477eb6 100644 --- a/lib/capybara/spec/session/choose_spec.rb +++ b/lib/capybara/spec/session/choose_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec "#choose" do before do @session.visit('/form') diff --git a/lib/capybara/spec/session/click_button_spec.rb b/lib/capybara/spec/session/click_button_spec.rb index 2cdb7fe3..45851f6f 100644 --- a/lib/capybara/spec/session/click_button_spec.rb +++ b/lib/capybara/spec/session/click_button_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#click_button' do before do @session.visit('/form') diff --git a/lib/capybara/spec/session/click_link_or_button_spec.rb b/lib/capybara/spec/session/click_link_or_button_spec.rb index ca31add1..ee1d9016 100644 --- a/lib/capybara/spec/session/click_link_or_button_spec.rb +++ b/lib/capybara/spec/session/click_link_or_button_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#click_link_or_button' do it "should click on a link" do @session.visit('/with_html') diff --git a/lib/capybara/spec/session/click_link_spec.rb b/lib/capybara/spec/session/click_link_spec.rb index e1ed0b0f..09962f02 100644 --- a/lib/capybara/spec/session/click_link_spec.rb +++ b/lib/capybara/spec/session/click_link_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#click_link' do before do @session.visit('/with_html') diff --git a/lib/capybara/spec/session/current_scope_spec.rb b/lib/capybara/spec/session/current_scope_spec.rb index 30b07455..dc45b2ec 100644 --- a/lib/capybara/spec/session/current_scope_spec.rb +++ b/lib/capybara/spec/session/current_scope_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#current_scope' do before do @session.visit('/with_scope') @@ -26,4 +27,4 @@ Capybara::SpecHelper.spec '#current_scope' do end end end -end \ No newline at end of file +end diff --git a/lib/capybara/spec/session/current_url_spec.rb b/lib/capybara/spec/session/current_url_spec.rb index 69b9672e..7fbd867a 100644 --- a/lib/capybara/spec/session/current_url_spec.rb +++ b/lib/capybara/spec/session/current_url_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "capybara/spec/test_app" Capybara::SpecHelper.spec '#current_url, #current_path, #current_host' do diff --git a/lib/capybara/spec/session/dismiss_confirm_spec.rb b/lib/capybara/spec/session/dismiss_confirm_spec.rb index 9bb65ccf..92a6819b 100644 --- a/lib/capybara/spec/session/dismiss_confirm_spec.rb +++ b/lib/capybara/spec/session/dismiss_confirm_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#dismiss_confirm', :requires => [:modals] do before do @session.visit('/with_js') @@ -32,4 +33,4 @@ Capybara::SpecHelper.spec '#dismiss_confirm', :requires => [:modals] do end expect(message).to eq('Confirm opened') end -end \ No newline at end of file +end diff --git a/lib/capybara/spec/session/dismiss_prompt_spec.rb b/lib/capybara/spec/session/dismiss_prompt_spec.rb index 42ae2f87..c0f4af7d 100644 --- a/lib/capybara/spec/session/dismiss_prompt_spec.rb +++ b/lib/capybara/spec/session/dismiss_prompt_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#dismiss_prompt', :requires => [:modals] do before do @session.visit('/with_js') @@ -16,4 +17,4 @@ Capybara::SpecHelper.spec '#dismiss_prompt', :requires => [:modals] do end expect(message).to eq('Prompt opened') end -end \ No newline at end of file +end diff --git a/lib/capybara/spec/session/evaluate_script_spec.rb b/lib/capybara/spec/session/evaluate_script_spec.rb index 2a529c47..02822a5f 100644 --- a/lib/capybara/spec/session/evaluate_script_spec.rb +++ b/lib/capybara/spec/session/evaluate_script_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec "#evaluate_script", :requires => [:js] do it "should evaluate the given script and return whatever it produces" do @session.visit('/with_js') diff --git a/lib/capybara/spec/session/execute_script_spec.rb b/lib/capybara/spec/session/execute_script_spec.rb index 979bc097..e6bec224 100644 --- a/lib/capybara/spec/session/execute_script_spec.rb +++ b/lib/capybara/spec/session/execute_script_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec "#execute_script", :requires => [:js] do it "should execute the given script and return nothing" do @session.visit('/with_js') diff --git a/lib/capybara/spec/session/fill_in_spec.rb b/lib/capybara/spec/session/fill_in_spec.rb index fd8024b7..8df45f63 100644 --- a/lib/capybara/spec/session/fill_in_spec.rb +++ b/lib/capybara/spec/session/fill_in_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec "#fill_in" do before do @session.visit('/form') diff --git a/lib/capybara/spec/session/find_button_spec.rb b/lib/capybara/spec/session/find_button_spec.rb index 1ede7d22..44fc5902 100644 --- a/lib/capybara/spec/session/find_button_spec.rb +++ b/lib/capybara/spec/session/find_button_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#find_button' do before do @session.visit('/form') diff --git a/lib/capybara/spec/session/find_by_id_spec.rb b/lib/capybara/spec/session/find_by_id_spec.rb index 50ffde10..fffd7e52 100644 --- a/lib/capybara/spec/session/find_by_id_spec.rb +++ b/lib/capybara/spec/session/find_by_id_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#find_by_id' do before do @session.visit('/with_html') diff --git a/lib/capybara/spec/session/find_field_spec.rb b/lib/capybara/spec/session/find_field_spec.rb index cd9521b5..ff0b99b9 100644 --- a/lib/capybara/spec/session/find_field_spec.rb +++ b/lib/capybara/spec/session/find_field_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#find_field' do before do @session.visit('/form') diff --git a/lib/capybara/spec/session/find_link_spec.rb b/lib/capybara/spec/session/find_link_spec.rb index 3ad2c3c4..f0e73d35 100644 --- a/lib/capybara/spec/session/find_link_spec.rb +++ b/lib/capybara/spec/session/find_link_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#find_link' do before do @session.visit('/with_html') diff --git a/lib/capybara/spec/session/find_spec.rb b/lib/capybara/spec/session/find_spec.rb index c0a3dbda..8cef6ffc 100644 --- a/lib/capybara/spec/session/find_spec.rb +++ b/lib/capybara/spec/session/find_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#find' do before do @session.visit('/with_html') diff --git a/lib/capybara/spec/session/first_spec.rb b/lib/capybara/spec/session/first_spec.rb index 2b038917..c2d31518 100644 --- a/lib/capybara/spec/session/first_spec.rb +++ b/lib/capybara/spec/session/first_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#first' do before do @session.visit('/with_html') diff --git a/lib/capybara/spec/session/go_back_spec.rb b/lib/capybara/spec/session/go_back_spec.rb index 1ac67759..9cbe2e6e 100644 --- a/lib/capybara/spec/session/go_back_spec.rb +++ b/lib/capybara/spec/session/go_back_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#go_back', :requires => [:js] do it "should fetch a response from the driver from the previous page" do @session.visit('/') diff --git a/lib/capybara/spec/session/go_forward_spec.rb b/lib/capybara/spec/session/go_forward_spec.rb index df70fd45..87a93de9 100644 --- a/lib/capybara/spec/session/go_forward_spec.rb +++ b/lib/capybara/spec/session/go_forward_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#go_forward', :requires => [:js] do it "should fetch a response from the driver from the previous page" do @session.visit('/') diff --git a/lib/capybara/spec/session/has_button_spec.rb b/lib/capybara/spec/session/has_button_spec.rb index 965b4563..27dd500f 100644 --- a/lib/capybara/spec/session/has_button_spec.rb +++ b/lib/capybara/spec/session/has_button_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#has_button?' do before do @session.visit('/form') diff --git a/lib/capybara/spec/session/has_css_spec.rb b/lib/capybara/spec/session/has_css_spec.rb index d82a8836..c19efbbf 100644 --- a/lib/capybara/spec/session/has_css_spec.rb +++ b/lib/capybara/spec/session/has_css_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#has_css?' do before do @session.visit('/with_html') diff --git a/lib/capybara/spec/session/has_current_path_spec.rb b/lib/capybara/spec/session/has_current_path_spec.rb index 80fdbdde..a9a7c0ad 100644 --- a/lib/capybara/spec/session/has_current_path_spec.rb +++ b/lib/capybara/spec/session/has_current_path_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#has_current_path?' do before do @session.visit('/with_js') diff --git a/lib/capybara/spec/session/has_field_spec.rb b/lib/capybara/spec/session/has_field_spec.rb index ec331234..df6acaac 100644 --- a/lib/capybara/spec/session/has_field_spec.rb +++ b/lib/capybara/spec/session/has_field_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#has_field' do before { @session.visit('/form') } diff --git a/lib/capybara/spec/session/has_link_spec.rb b/lib/capybara/spec/session/has_link_spec.rb index 4c3be066..ce562ace 100644 --- a/lib/capybara/spec/session/has_link_spec.rb +++ b/lib/capybara/spec/session/has_link_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#has_link?' do before do @session.visit('/with_html') diff --git a/lib/capybara/spec/session/has_select_spec.rb b/lib/capybara/spec/session/has_select_spec.rb index 90608f70..4bbfb2bd 100644 --- a/lib/capybara/spec/session/has_select_spec.rb +++ b/lib/capybara/spec/session/has_select_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#has_select?' do before { @session.visit('/form') } diff --git a/lib/capybara/spec/session/has_selector_spec.rb b/lib/capybara/spec/session/has_selector_spec.rb index 5875bc21..43c1cdd6 100644 --- a/lib/capybara/spec/session/has_selector_spec.rb +++ b/lib/capybara/spec/session/has_selector_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#has_selector?' do before do @session.visit('/with_html') diff --git a/lib/capybara/spec/session/has_table_spec.rb b/lib/capybara/spec/session/has_table_spec.rb index d7018ba1..b1911646 100644 --- a/lib/capybara/spec/session/has_table_spec.rb +++ b/lib/capybara/spec/session/has_table_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#has_table?' do before do @session.visit('/tables') diff --git a/lib/capybara/spec/session/has_text_spec.rb b/lib/capybara/spec/session/has_text_spec.rb index c61e265a..7ad98e7e 100644 --- a/lib/capybara/spec/session/has_text_spec.rb +++ b/lib/capybara/spec/session/has_text_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#has_text?' do it "should be true if the given text is on the page at least once" do @session.visit('/with_html') diff --git a/lib/capybara/spec/session/has_title_spec.rb b/lib/capybara/spec/session/has_title_spec.rb index 3243888c..c9b89f47 100644 --- a/lib/capybara/spec/session/has_title_spec.rb +++ b/lib/capybara/spec/session/has_title_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#has_title?' do before do @session.visit('/with_js') diff --git a/lib/capybara/spec/session/has_xpath_spec.rb b/lib/capybara/spec/session/has_xpath_spec.rb index 339ecb61..662a92ff 100644 --- a/lib/capybara/spec/session/has_xpath_spec.rb +++ b/lib/capybara/spec/session/has_xpath_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#has_xpath?' do before do @session.visit('/with_html') diff --git a/lib/capybara/spec/session/headers.rb b/lib/capybara/spec/session/headers.rb index 81e8f8ee..fb5fd139 100644 --- a/lib/capybara/spec/session/headers.rb +++ b/lib/capybara/spec/session/headers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#response_headers' do it "should return response headers", :requires => [:response_headers] do @session.visit('/with_simple_html') diff --git a/lib/capybara/spec/session/html_spec.rb b/lib/capybara/spec/session/html_spec.rb index 1e0d180e..a5d73074 100644 --- a/lib/capybara/spec/session/html_spec.rb +++ b/lib/capybara/spec/session/html_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#html' do it "should return the unmodified page body" do @session.visit('/') diff --git a/lib/capybara/spec/session/node_spec.rb b/lib/capybara/spec/session/node_spec.rb index 98f56b09..d1c75d7f 100644 --- a/lib/capybara/spec/session/node_spec.rb +++ b/lib/capybara/spec/session/node_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec "node" do before do diff --git a/lib/capybara/spec/session/reset_session_spec.rb b/lib/capybara/spec/session/reset_session_spec.rb index 2babc7f3..35c8d7ba 100644 --- a/lib/capybara/spec/session/reset_session_spec.rb +++ b/lib/capybara/spec/session/reset_session_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#reset_session!' do it "removes cookies" do @session.visit('/set_cookie') diff --git a/lib/capybara/spec/session/response_code.rb b/lib/capybara/spec/session/response_code.rb index fa6f8846..e30a4c91 100644 --- a/lib/capybara/spec/session/response_code.rb +++ b/lib/capybara/spec/session/response_code.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#status_code' do it "should return response codes", :requires => [:status_code] do @session.visit('/with_simple_html') diff --git a/lib/capybara/spec/session/save_and_open_page_spec.rb b/lib/capybara/spec/session/save_and_open_page_spec.rb index 42e8634e..a866c18e 100644 --- a/lib/capybara/spec/session/save_and_open_page_spec.rb +++ b/lib/capybara/spec/session/save_and_open_page_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'launchy' Capybara::SpecHelper.spec '#save_and_open_page' do diff --git a/lib/capybara/spec/session/save_and_open_screenshot_spec.rb b/lib/capybara/spec/session/save_and_open_screenshot_spec.rb index 2e9ddcfe..f34d635d 100644 --- a/lib/capybara/spec/session/save_and_open_screenshot_spec.rb +++ b/lib/capybara/spec/session/save_and_open_screenshot_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'launchy' Capybara::SpecHelper.spec '#save_and_open_screenshot' do diff --git a/lib/capybara/spec/session/save_page_spec.rb b/lib/capybara/spec/session/save_page_spec.rb index 27e8b0b5..5455e778 100644 --- a/lib/capybara/spec/session/save_page_spec.rb +++ b/lib/capybara/spec/session/save_page_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#save_page' do let(:alternative_path) { File.join(Dir.pwd, "save_and_open_page_tmp") } before do diff --git a/lib/capybara/spec/session/save_screenshot_spec.rb b/lib/capybara/spec/session/save_screenshot_spec.rb index 00cb008f..e7d57130 100644 --- a/lib/capybara/spec/session/save_screenshot_spec.rb +++ b/lib/capybara/spec/session/save_screenshot_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#save_screenshot', requires: [:screenshot] do before do @session.visit '/foo' diff --git a/lib/capybara/spec/session/screenshot_spec.rb b/lib/capybara/spec/session/screenshot_spec.rb index d1f35e81..65a8305c 100644 --- a/lib/capybara/spec/session/screenshot_spec.rb +++ b/lib/capybara/spec/session/screenshot_spec.rb @@ -1,4 +1,6 @@ -#coding: US-ASCII +# coding: US-ASCII +# frozen_string_literal: true + Capybara::SpecHelper.spec "#save_screenshot" do let(:image_path) { File.join(Dir.tmpdir, 'capybara-screenshot.png') } diff --git a/lib/capybara/spec/session/select_spec.rb b/lib/capybara/spec/session/select_spec.rb index c0289248..90cf03b2 100644 --- a/lib/capybara/spec/session/select_spec.rb +++ b/lib/capybara/spec/session/select_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec "#select" do before do @session.visit('/form') diff --git a/lib/capybara/spec/session/text_spec.rb b/lib/capybara/spec/session/text_spec.rb index 7008f5c7..9fca5c63 100644 --- a/lib/capybara/spec/session/text_spec.rb +++ b/lib/capybara/spec/session/text_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#text' do it "should print the text of the page" do @session.visit('/with_simple_html') diff --git a/lib/capybara/spec/session/title_spec.rb b/lib/capybara/spec/session/title_spec.rb index cfb7d61c..b9307e7e 100644 --- a/lib/capybara/spec/session/title_spec.rb +++ b/lib/capybara/spec/session/title_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#title' do it "should get the title of the page" do @@ -13,4 +14,4 @@ Capybara::SpecHelper.spec '#title' do end after { Capybara.default_selector = :xpath } end -end \ No newline at end of file +end diff --git a/lib/capybara/spec/session/uncheck_spec.rb b/lib/capybara/spec/session/uncheck_spec.rb index 478370a0..f01bae91 100644 --- a/lib/capybara/spec/session/uncheck_spec.rb +++ b/lib/capybara/spec/session/uncheck_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec "#uncheck" do before do @session.visit('/form') diff --git a/lib/capybara/spec/session/unselect_spec.rb b/lib/capybara/spec/session/unselect_spec.rb index 834d17f4..ffd7041b 100644 --- a/lib/capybara/spec/session/unselect_spec.rb +++ b/lib/capybara/spec/session/unselect_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec "#unselect" do before do @session.visit('/form') diff --git a/lib/capybara/spec/session/visit_spec.rb b/lib/capybara/spec/session/visit_spec.rb index f9b56d65..7c045e30 100644 --- a/lib/capybara/spec/session/visit_spec.rb +++ b/lib/capybara/spec/session/visit_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#visit' do it "should fetch a response from the driver with a relative url" do @session.visit('/') diff --git a/lib/capybara/spec/session/window/become_closed_spec.rb b/lib/capybara/spec/session/window/become_closed_spec.rb index 3885897b..15c34a8f 100644 --- a/lib/capybara/spec/session/window/become_closed_spec.rb +++ b/lib/capybara/spec/session/window/become_closed_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#become_closed', requires: [:windows, :js] do before(:each) do @window = @session.current_window diff --git a/lib/capybara/spec/session/window/current_window_spec.rb b/lib/capybara/spec/session/window/current_window_spec.rb index bd2a3093..966b95be 100644 --- a/lib/capybara/spec/session/window/current_window_spec.rb +++ b/lib/capybara/spec/session/window/current_window_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#current_window', requires: [:windows] do before(:each) do @window = @session.current_window diff --git a/lib/capybara/spec/session/window/open_new_window_spec.rb b/lib/capybara/spec/session/window/open_new_window_spec.rb index 581739ba..33353592 100644 --- a/lib/capybara/spec/session/window/open_new_window_spec.rb +++ b/lib/capybara/spec/session/window/open_new_window_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#open_new_window', requires: [:windows] do before(:each) do @window = @session.current_window diff --git a/lib/capybara/spec/session/window/switch_to_window_spec.rb b/lib/capybara/spec/session/window/switch_to_window_spec.rb index e2af01fa..a674944d 100644 --- a/lib/capybara/spec/session/window/switch_to_window_spec.rb +++ b/lib/capybara/spec/session/window/switch_to_window_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#switch_to_window', requires: [:windows] do before(:each) do @window = @session.current_window diff --git a/lib/capybara/spec/session/window/window_opened_by_spec.rb b/lib/capybara/spec/session/window/window_opened_by_spec.rb index 01d6ddc7..9f1c8fe0 100644 --- a/lib/capybara/spec/session/window/window_opened_by_spec.rb +++ b/lib/capybara/spec/session/window/window_opened_by_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#window_opened_by', requires: [:windows] do before(:each) do @window = @session.current_window diff --git a/lib/capybara/spec/session/window/window_spec.rb b/lib/capybara/spec/session/window/window_spec.rb index 26728106..503f4615 100644 --- a/lib/capybara/spec/session/window/window_spec.rb +++ b/lib/capybara/spec/session/window/window_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec Capybara::Window, requires: [:windows] do before(:each) do @window = @session.current_window diff --git a/lib/capybara/spec/session/window/windows_spec.rb b/lib/capybara/spec/session/window/windows_spec.rb index 102e6a8f..6d6918cf 100644 --- a/lib/capybara/spec/session/window/windows_spec.rb +++ b/lib/capybara/spec/session/window/windows_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#windows', requires: [:windows] do before(:each) do @window = @session.current_window diff --git a/lib/capybara/spec/session/window/within_window_spec.rb b/lib/capybara/spec/session/window/within_window_spec.rb index f2f0eace..686cad90 100644 --- a/lib/capybara/spec/session/window/within_window_spec.rb +++ b/lib/capybara/spec/session/window/within_window_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#within_window', requires: [:windows] do before(:each) do @window = @session.current_window @@ -132,9 +133,7 @@ Capybara::SpecHelper.spec '#within_window', requires: [:windows] do context "with string" do it "should warn" do - expect(@session).to receive(:warn).with("DEPRECATION WARNING: Passing string argument "\ - "to #within_window is deprecated. Pass window object or lambda. "\ - "(called from #{__FILE__}:138)").and_call_original + expect(@session).to receive(:warn).with(/DEPRECATION WARNING/).and_call_original @session.within_window('firstPopup') {} end diff --git a/lib/capybara/spec/session/within_frame_spec.rb b/lib/capybara/spec/session/within_frame_spec.rb index ceb8cdce..98bcd2db 100644 --- a/lib/capybara/spec/session/within_frame_spec.rb +++ b/lib/capybara/spec/session/within_frame_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#within_frame', :requires => [:frames] do before(:each) do @session.visit('/within_frames') diff --git a/lib/capybara/spec/session/within_spec.rb b/lib/capybara/spec/session/within_spec.rb index adb7fe14..cb1801c7 100644 --- a/lib/capybara/spec/session/within_spec.rb +++ b/lib/capybara/spec/session/within_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Capybara::SpecHelper.spec '#within' do before do @session.visit('/with_scope') diff --git a/lib/capybara/spec/spec_helper.rb b/lib/capybara/spec/spec_helper.rb index 2d0b8aec..e1e2410c 100644 --- a/lib/capybara/spec/spec_helper.rb +++ b/lib/capybara/spec/spec_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rspec" require "capybara" require "capybara/rspec" # Required here instead of in rspec_spec to avoid RSpec deprecation warning diff --git a/lib/capybara/spec/test_app.rb b/lib/capybara/spec/test_app.rb index 79094617..6c6db3b0 100644 --- a/lib/capybara/spec/test_app.rb +++ b/lib/capybara/spec/test_app.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'sinatra/base' require 'tilt/erb' require 'rack' diff --git a/lib/capybara/spec/views/buttons.erb b/lib/capybara/spec/views/buttons.erb index 65c61ab1..6bd47669 100644 --- a/lib/capybara/spec/views/buttons.erb +++ b/lib/capybara/spec/views/buttons.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %>

Buttons

diff --git a/lib/capybara/spec/views/fieldsets.erb b/lib/capybara/spec/views/fieldsets.erb index 8f427841..a1a5cb9d 100644 --- a/lib/capybara/spec/views/fieldsets.erb +++ b/lib/capybara/spec/views/fieldsets.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %>
Agent @@ -26,4 +27,4 @@

-
\ No newline at end of file + diff --git a/lib/capybara/spec/views/form.erb b/lib/capybara/spec/views/form.erb index d72209e7..ef29ceb9 100644 --- a/lib/capybara/spec/views/form.erb +++ b/lib/capybara/spec/views/form.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %>

Form

diff --git a/lib/capybara/spec/views/frame_child.erb b/lib/capybara/spec/views/frame_child.erb index 1c8e2ea2..8114b92f 100644 --- a/lib/capybara/spec/views/frame_child.erb +++ b/lib/capybara/spec/views/frame_child.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %> This is the child frame title @@ -6,4 +7,4 @@ - \ No newline at end of file + diff --git a/lib/capybara/spec/views/frame_one.erb b/lib/capybara/spec/views/frame_one.erb index 6b8f8a7b..742082ca 100644 --- a/lib/capybara/spec/views/frame_one.erb +++ b/lib/capybara/spec/views/frame_one.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %> This is the title of frame one @@ -5,4 +6,4 @@
This is the text of divInFrameOne
- \ No newline at end of file + diff --git a/lib/capybara/spec/views/frame_parent.erb b/lib/capybara/spec/views/frame_parent.erb index a42f3e03..c60b9d1c 100644 --- a/lib/capybara/spec/views/frame_parent.erb +++ b/lib/capybara/spec/views/frame_parent.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %> This is the parent frame title @@ -5,4 +6,4 @@ - \ No newline at end of file + diff --git a/lib/capybara/spec/views/frame_two.erb b/lib/capybara/spec/views/frame_two.erb index b344964d..23f3bcee 100644 --- a/lib/capybara/spec/views/frame_two.erb +++ b/lib/capybara/spec/views/frame_two.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %> This is the title of frame two @@ -5,4 +6,4 @@
This is the text of divInFrameTwo
- \ No newline at end of file + diff --git a/lib/capybara/spec/views/header_links.erb b/lib/capybara/spec/views/header_links.erb index f4b7e521..43022a88 100644 --- a/lib/capybara/spec/views/header_links.erb +++ b/lib/capybara/spec/views/header_links.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %>

Link

diff --git a/lib/capybara/spec/views/host_links.erb b/lib/capybara/spec/views/host_links.erb index 2051cdd3..d7f4a83b 100644 --- a/lib/capybara/spec/views/host_links.erb +++ b/lib/capybara/spec/views/host_links.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %>

Relative Host Absolute Host diff --git a/lib/capybara/spec/views/path.erb b/lib/capybara/spec/views/path.erb index bbf472af..da6adbaf 100644 --- a/lib/capybara/spec/views/path.erb +++ b/lib/capybara/spec/views/path.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %>

diff --git a/lib/capybara/spec/views/popup_one.erb b/lib/capybara/spec/views/popup_one.erb index 2b20a309..20abf44d 100644 --- a/lib/capybara/spec/views/popup_one.erb +++ b/lib/capybara/spec/views/popup_one.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %> Title of the first popup diff --git a/lib/capybara/spec/views/popup_two.erb b/lib/capybara/spec/views/popup_two.erb index 1c32270e..da16d4e4 100644 --- a/lib/capybara/spec/views/popup_two.erb +++ b/lib/capybara/spec/views/popup_two.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %> Title of popup two diff --git a/lib/capybara/spec/views/postback.erb b/lib/capybara/spec/views/postback.erb index 340c2d21..35423340 100644 --- a/lib/capybara/spec/views/postback.erb +++ b/lib/capybara/spec/views/postback.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %>

Postback

@@ -10,4 +11,4 @@

- \ No newline at end of file + diff --git a/lib/capybara/spec/views/tables.erb b/lib/capybara/spec/views/tables.erb index b3c9a0af..66bb9ed3 100644 --- a/lib/capybara/spec/views/tables.erb +++ b/lib/capybara/spec/views/tables.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %>
diff --git a/lib/capybara/spec/views/with_base_tag.erb b/lib/capybara/spec/views/with_base_tag.erb index 5b568fd3..78c3f491 100644 --- a/lib/capybara/spec/views/with_base_tag.erb +++ b/lib/capybara/spec/views/with_base_tag.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %> diff --git a/lib/capybara/spec/views/with_count.erb b/lib/capybara/spec/views/with_count.erb index d4ddcad9..f71af0fe 100644 --- a/lib/capybara/spec/views/with_count.erb +++ b/lib/capybara/spec/views/with_count.erb @@ -1,7 +1,8 @@ +<%# frozen_string_literal: true %>

This page is used for testing number options of has_text?

count1

2 count

Count

-
\ No newline at end of file + diff --git a/lib/capybara/spec/views/with_hover.erb b/lib/capybara/spec/views/with_hover.erb index 67e3dade..57d05a57 100644 --- a/lib/capybara/spec/views/with_hover.erb +++ b/lib/capybara/spec/views/with_hover.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %> @@ -14,4 +15,4 @@
Here I am
- \ No newline at end of file + diff --git a/lib/capybara/spec/views/with_html.erb b/lib/capybara/spec/views/with_html.erb index 0870d065..8d7a32e3 100644 --- a/lib/capybara/spec/views/with_html.erb +++ b/lib/capybara/spec/views/with_html.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %>
<%= referrer %>

This is a test

diff --git a/lib/capybara/spec/views/with_html_entities.erb b/lib/capybara/spec/views/with_html_entities.erb index b7b0e33c..8a88f760 100644 --- a/lib/capybara/spec/views/with_html_entities.erb +++ b/lib/capybara/spec/views/with_html_entities.erb @@ -1 +1,2 @@ +<%# frozen_string_literal: true %> Encoding with — html entities » diff --git a/lib/capybara/spec/views/with_js.erb b/lib/capybara/spec/views/with_js.erb index 1d32d60a..e1aabbb3 100644 --- a/lib/capybara/spec/views/with_js.erb +++ b/lib/capybara/spec/views/with_js.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %> diff --git a/lib/capybara/spec/views/with_scope.erb b/lib/capybara/spec/views/with_scope.erb index 7a3d2046..d6f6fb3b 100644 --- a/lib/capybara/spec/views/with_scope.erb +++ b/lib/capybara/spec/views/with_scope.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %>

This page is used for testing various scopes

diff --git a/lib/capybara/spec/views/with_simple_html.erb b/lib/capybara/spec/views/with_simple_html.erb index d9d3a9a8..f83199c1 100644 --- a/lib/capybara/spec/views/with_simple_html.erb +++ b/lib/capybara/spec/views/with_simple_html.erb @@ -1 +1,2 @@ -Bar \ No newline at end of file +<%# frozen_string_literal: true %> +Bar diff --git a/lib/capybara/spec/views/with_title.erb b/lib/capybara/spec/views/with_title.erb index 770ca26f..d659b2b7 100644 --- a/lib/capybara/spec/views/with_title.erb +++ b/lib/capybara/spec/views/with_title.erb @@ -1,4 +1,5 @@ +<%# frozen_string_literal: true %> Test Title abcdefg - \ No newline at end of file + diff --git a/lib/capybara/spec/views/with_windows.erb b/lib/capybara/spec/views/with_windows.erb index 9f17a42a..fcbd22f6 100644 --- a/lib/capybara/spec/views/with_windows.erb +++ b/lib/capybara/spec/views/with_windows.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %> With Windows diff --git a/lib/capybara/spec/views/within_frames.erb b/lib/capybara/spec/views/within_frames.erb index 102683da..15c23a18 100644 --- a/lib/capybara/spec/views/within_frames.erb +++ b/lib/capybara/spec/views/within_frames.erb @@ -1,3 +1,4 @@ +<%# frozen_string_literal: true %> With Frames @@ -8,4 +9,4 @@ - \ No newline at end of file + diff --git a/lib/capybara/version.rb b/lib/capybara/version.rb index 2fadcabe..f492fef1 100644 --- a/lib/capybara/version.rb +++ b/lib/capybara/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Capybara VERSION = '2.7.0.dev' end diff --git a/lib/capybara/window.rb b/lib/capybara/window.rb index f2ba7da4..57fe8bda 100644 --- a/lib/capybara/window.rb +++ b/lib/capybara/window.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Capybara ## # The Window class represents a browser window. diff --git a/spec/basic_node_spec.rb b/spec/basic_node_spec.rb index 590e2d49..eff57711 100644 --- a/spec/basic_node_spec.rb +++ b/spec/basic_node_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' RSpec.describe Capybara do diff --git a/spec/capybara_spec.rb b/spec/capybara_spec.rb index 548f9484..348eaf32 100644 --- a/spec/capybara_spec.rb +++ b/spec/capybara_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' RSpec.describe Capybara do diff --git a/spec/dsl_spec.rb b/spec/dsl_spec.rb index 88c60cc8..6b7e1a00 100644 --- a/spec/dsl_spec.rb +++ b/spec/dsl_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' require 'capybara/dsl' diff --git a/spec/fixtures/selenium_driver_rspec_failure.rb b/spec/fixtures/selenium_driver_rspec_failure.rb index 2ec124ab..a60d9402 100644 --- a/spec/fixtures/selenium_driver_rspec_failure.rb +++ b/spec/fixtures/selenium_driver_rspec_failure.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' RSpec.describe Capybara::Selenium::Driver do diff --git a/spec/fixtures/selenium_driver_rspec_success.rb b/spec/fixtures/selenium_driver_rspec_success.rb index 1f5f9672..38e6e0b8 100644 --- a/spec/fixtures/selenium_driver_rspec_success.rb +++ b/spec/fixtures/selenium_driver_rspec_success.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' RSpec.describe Capybara::Selenium::Driver do diff --git a/spec/rack_test_spec.rb b/spec/rack_test_spec.rb index eb391832..3149a93a 100644 --- a/spec/rack_test_spec.rb +++ b/spec/rack_test_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' module TestSessions diff --git a/spec/result_spec.rb b/spec/result_spec.rb index 9f14c5c6..a3bb4dc2 100644 --- a/spec/result_spec.rb +++ b/spec/result_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' RSpec.describe Capybara::Result do diff --git a/spec/rspec/features_spec.rb b/spec/rspec/features_spec.rb index 857c8773..dd792c8a 100644 --- a/spec/rspec/features_spec.rb +++ b/spec/rspec/features_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' require 'capybara/rspec' diff --git a/spec/rspec/matchers_spec.rb b/spec/rspec/matchers_spec.rb index 32792565..255295ca 100644 --- a/spec/rspec/matchers_spec.rb +++ b/spec/rspec/matchers_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' require 'capybara/dsl' require 'capybara/rspec/matchers' diff --git a/spec/rspec/scenarios_spec.rb b/spec/rspec/scenarios_spec.rb index 365b90fc..1c158784 100644 --- a/spec/rspec/scenarios_spec.rb +++ b/spec/rspec/scenarios_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' require 'capybara/rspec' diff --git a/spec/rspec/views_spec.rb b/spec/rspec/views_spec.rb index c9ae8cb0..0eaa3342 100644 --- a/spec/rspec/views_spec.rb +++ b/spec/rspec/views_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' RSpec.describe "capybara/rspec", type: :view do diff --git a/spec/rspec_spec.rb b/spec/rspec_spec.rb index 360f45e9..b19c305a 100644 --- a/spec/rspec_spec.rb +++ b/spec/rspec_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' RSpec.describe 'capybara/rspec', :type => :feature do diff --git a/spec/selector_spec.rb b/spec/selector_spec.rb index 61304a3e..49cb4c6a 100644 --- a/spec/selector_spec.rb +++ b/spec/selector_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' RSpec.describe Capybara do diff --git a/spec/selenium_spec.rb b/spec/selenium_spec.rb index dd5d61d7..91ef1768 100644 --- a/spec/selenium_spec.rb +++ b/spec/selenium_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' require "selenium-webdriver" diff --git a/spec/selenium_spec_chrome.rb b/spec/selenium_spec_chrome.rb index 743c3e8b..3dcb337b 100644 --- a/spec/selenium_spec_chrome.rb +++ b/spec/selenium_spec_chrome.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' require 'selenium-webdriver' diff --git a/spec/server_spec.rb b/spec/server_spec.rb index 0393b181..08c68053 100644 --- a/spec/server_spec.rb +++ b/spec/server_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' RSpec.describe Capybara::Server do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 345e1dbe..9a33cdb6 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'rspec/expectations' require "capybara/spec/spec_helper" require "pry"

Agent