From 526a2a98eaf5776d57299c7fd8f93e7ab7d7e9eb Mon Sep 17 00:00:00 2001 From: Thomas Walpole Date: Wed, 18 Apr 2018 13:45:35 -0700 Subject: [PATCH] Fix spec files naming and add missing pragmas --- Gemfile | 2 ++ Rakefile | 2 ++ lib/capybara/minitest/spec.rb | 2 ++ lib/capybara/queries/match_query.rb | 2 ++ lib/capybara/rspec/compound.rb | 2 ++ lib/capybara/selector/css.rb | 2 ++ .../{assert_current_path.rb => assert_current_path_spec.rb} | 0 .../session/{assert_selector.rb => assert_selector_spec.rb} | 0 .../spec/session/{assert_text.rb => assert_text_spec.rb} | 0 .../spec/session/{assert_title.rb => assert_title_spec.rb} | 0 .../{assert_match_selector.rb => assert_match_selector_spec.rb} | 2 ++ lib/capybara/spec/session/element/match_css_spec.rb | 2 ++ lib/capybara/spec/session/element/match_xpath_spec.rb | 2 ++ lib/capybara/spec/session/element/matches_selector_spec.rb | 2 ++ lib/capybara/spec/session/has_none_selectors_spec.rb | 2 ++ lib/capybara/spec/session/{headers.rb => headers_spec.rb} | 0 .../spec/session/{response_code.rb => response_code_spec.rb} | 0 lib/capybara/spec/session/selectors_spec.rb | 2 ++ 18 files changed, 24 insertions(+) rename lib/capybara/spec/session/{assert_current_path.rb => assert_current_path_spec.rb} (100%) rename lib/capybara/spec/session/{assert_selector.rb => assert_selector_spec.rb} (100%) rename lib/capybara/spec/session/{assert_text.rb => assert_text_spec.rb} (100%) rename lib/capybara/spec/session/{assert_title.rb => assert_title_spec.rb} (100%) rename lib/capybara/spec/session/element/{assert_match_selector.rb => assert_match_selector_spec.rb} (97%) rename lib/capybara/spec/session/{headers.rb => headers_spec.rb} (100%) rename lib/capybara/spec/session/{response_code.rb => response_code_spec.rb} (100%) diff --git a/Gemfile b/Gemfile index f36e73930..324427247 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source 'https://rubygems.org' gem 'bundler', '~> 1.1' diff --git a/Rakefile b/Rakefile index 6200270b2..4ac166e70 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rubygems' require 'rspec/core/rake_task' require 'cucumber/rake/task' diff --git a/lib/capybara/minitest/spec.rb b/lib/capybara/minitest/spec.rb index b5070d051..8076e2502 100644 --- a/lib/capybara/minitest/spec.rb +++ b/lib/capybara/minitest/spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'minitest/spec' module Capybara diff --git a/lib/capybara/queries/match_query.rb b/lib/capybara/queries/match_query.rb index ea35a0fbd..330f0e748 100644 --- a/lib/capybara/queries/match_query.rb +++ b/lib/capybara/queries/match_query.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Capybara module Queries class MatchQuery < Capybara::Queries::SelectorQuery diff --git a/lib/capybara/rspec/compound.rb b/lib/capybara/rspec/compound.rb index 0bd6669f0..4dbd4c91c 100644 --- a/lib/capybara/rspec/compound.rb +++ b/lib/capybara/rspec/compound.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Capybara module RSpecMatchers module Compound diff --git a/lib/capybara/selector/css.rb b/lib/capybara/selector/css.rb index 147e7180d..22437c6cd 100644 --- a/lib/capybara/selector/css.rb +++ b/lib/capybara/selector/css.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Capybara class Selector class CSS diff --git a/lib/capybara/spec/session/assert_current_path.rb b/lib/capybara/spec/session/assert_current_path_spec.rb similarity index 100% rename from lib/capybara/spec/session/assert_current_path.rb rename to lib/capybara/spec/session/assert_current_path_spec.rb diff --git a/lib/capybara/spec/session/assert_selector.rb b/lib/capybara/spec/session/assert_selector_spec.rb similarity index 100% rename from lib/capybara/spec/session/assert_selector.rb rename to lib/capybara/spec/session/assert_selector_spec.rb diff --git a/lib/capybara/spec/session/assert_text.rb b/lib/capybara/spec/session/assert_text_spec.rb similarity index 100% rename from lib/capybara/spec/session/assert_text.rb rename to lib/capybara/spec/session/assert_text_spec.rb diff --git a/lib/capybara/spec/session/assert_title.rb b/lib/capybara/spec/session/assert_title_spec.rb similarity index 100% rename from lib/capybara/spec/session/assert_title.rb rename to lib/capybara/spec/session/assert_title_spec.rb diff --git a/lib/capybara/spec/session/element/assert_match_selector.rb b/lib/capybara/spec/session/element/assert_match_selector_spec.rb similarity index 97% rename from lib/capybara/spec/session/element/assert_match_selector.rb rename to lib/capybara/spec/session/element/assert_match_selector_spec.rb index 5aa11c3f2..b790fda67 100644 --- a/lib/capybara/spec/session/element/assert_match_selector.rb +++ b/lib/capybara/spec/session/element/assert_match_selector_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Capybara::SpecHelper.spec '#assert_matches_selector' do before do @session.visit('/with_html') diff --git a/lib/capybara/spec/session/element/match_css_spec.rb b/lib/capybara/spec/session/element/match_css_spec.rb index 45d5fbe00..f350f9393 100644 --- a/lib/capybara/spec/session/element/match_css_spec.rb +++ b/lib/capybara/spec/session/element/match_css_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Capybara::SpecHelper.spec '#match_css?' do before do @session.visit('/with_html') diff --git a/lib/capybara/spec/session/element/match_xpath_spec.rb b/lib/capybara/spec/session/element/match_xpath_spec.rb index af606b973..d1aa9e21a 100644 --- a/lib/capybara/spec/session/element/match_xpath_spec.rb +++ b/lib/capybara/spec/session/element/match_xpath_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Capybara::SpecHelper.spec '#match_xpath?' do before do @session.visit('/with_html') diff --git a/lib/capybara/spec/session/element/matches_selector_spec.rb b/lib/capybara/spec/session/element/matches_selector_spec.rb index ffa04abd1..620f31948 100644 --- a/lib/capybara/spec/session/element/matches_selector_spec.rb +++ b/lib/capybara/spec/session/element/matches_selector_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Capybara::SpecHelper.spec '#match_selector?' do before do @session.visit('/with_html') diff --git a/lib/capybara/spec/session/has_none_selectors_spec.rb b/lib/capybara/spec/session/has_none_selectors_spec.rb index 1434d62a0..12fcfe75d 100644 --- a/lib/capybara/spec/session/has_none_selectors_spec.rb +++ b/lib/capybara/spec/session/has_none_selectors_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Capybara::SpecHelper.spec '#have_none_of_selectors' do before do @session.visit('/with_html') diff --git a/lib/capybara/spec/session/headers.rb b/lib/capybara/spec/session/headers_spec.rb similarity index 100% rename from lib/capybara/spec/session/headers.rb rename to lib/capybara/spec/session/headers_spec.rb diff --git a/lib/capybara/spec/session/response_code.rb b/lib/capybara/spec/session/response_code_spec.rb similarity index 100% rename from lib/capybara/spec/session/response_code.rb rename to lib/capybara/spec/session/response_code_spec.rb diff --git a/lib/capybara/spec/session/selectors_spec.rb b/lib/capybara/spec/session/selectors_spec.rb index 9c213432c..83e661cfa 100644 --- a/lib/capybara/spec/session/selectors_spec.rb +++ b/lib/capybara/spec/session/selectors_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Capybara::SpecHelper.spec Capybara::Selector do before do @session.visit('/form')