From c1dd2a583a1e81f0abb8b26f0aa0632d449e04a0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 31 Oct 2025 13:04:23 +0000 Subject: [PATCH 1/2] Bump rubocop-rspec from 3.4.0 to 3.7.0 We're changing the `.rubocop.yml` file because we were getting a warning: ``` rubocop-rspec extension supports plugin, specify `plugins: rubocop-rspec` instead of `require: rubocop-rspec` in .rubocop.yml. For more information, see https://docs.rubocop.org/rubocop/plugin_migration_guide.html. ``` Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from 3.4.0 to 3.7.0. - [Release notes](https://github.com/rubocop/rubocop-rspec/releases) - [Changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rspec/compare/v3.4.0...v3.7.0) --- updated-dependencies: - dependency-name: rubocop-rspec dependency-version: 3.7.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .rubocop.yml | 2 +- Gemfile | 2 +- Gemfile.lock | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index c5f130418..75bbfbb71 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,10 +1,10 @@ plugins: - rubocop-factory_bot + - rubocop-rspec require: - rubocop-capybara - rubocop-performance - rubocop-rails - - rubocop-rspec - rubocop-rspec_rails AllCops: diff --git a/Gemfile b/Gemfile index dad6dd966..f342fa622 100644 --- a/Gemfile +++ b/Gemfile @@ -108,7 +108,7 @@ group :development do gem "rubocop-factory_bot", "~> 2.27.1", require: false gem "rubocop-performance", "~> 1.23.1", require: false gem "rubocop-rails", "~> 2.29.1", require: false - gem "rubocop-rspec", "~> 3.4.0", require: false + gem "rubocop-rspec", "~> 3.7.0", require: false gem "rubocop-rspec_rails", "~> 2.30.0", require: false gem "rvm1-capistrano3", "~> 1.4.0", require: false gem "web-console", "~> 4.2.1" diff --git a/Gemfile.lock b/Gemfile.lock index 6d6ef77ea..fa7ae8c7a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -652,8 +652,9 @@ GEM rack (>= 1.1) rubocop (>= 1.52.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rspec (3.4.0) - rubocop (~> 1.61) + rubocop-rspec (3.7.0) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) rubocop-rspec_rails (2.30.0) rubocop (~> 1.61) rubocop-rspec (~> 3, >= 3.0.1) @@ -889,7 +890,7 @@ DEPENDENCIES rubocop-factory_bot (~> 2.27.1) rubocop-performance (~> 1.23.1) rubocop-rails (~> 2.29.1) - rubocop-rspec (~> 3.4.0) + rubocop-rspec (~> 3.7.0) rubocop-rspec_rails (~> 2.30.0) rvm1-capistrano3 (~> 1.4.0) sassc-embedded (~> 1.77.5) From 4ec2e87c2c7f238196b40884ae04780d8cf2c3b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 31 Oct 2025 14:14:51 +0100 Subject: [PATCH 2/2] Add and apply RSpec/IncludeExamples rubocop rule This rule was added in rubocop-rspec 3.6. We were already following it most of the time. --- .rubocop.yml | 3 +++ spec/system/legislation/processes_spec.rb | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 75bbfbb71..1aca55702 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -624,6 +624,9 @@ RSpec/Focus: RSpec/HookArgument: Enabled: true +RSpec/IncludeExamples: + Enabled: true + RSpec/InstanceVariable: Enabled: true Exclude: diff --git a/spec/system/legislation/processes_spec.rb b/spec/system/legislation/processes_spec.rb index 750760411..260a35bd3 100644 --- a/spec/system/legislation/processes_spec.rb +++ b/spec/system/legislation/processes_spec.rb @@ -146,7 +146,7 @@ describe "Legislation" do context "process page" do context "show" do - include_examples "not published permissions", :legislation_process_path + it_behaves_like "not published permissions", :legislation_process_path scenario "show view has document present on all phases" do process = create(:legislation_process) @@ -311,7 +311,7 @@ describe "Legislation" do expect(page).not_to have_content("This phase is not open yet") end - include_examples "not published permissions", :debate_legislation_process_path + it_behaves_like "not published permissions", :debate_legislation_process_path end context "draft publication phase" do @@ -331,7 +331,7 @@ describe "Legislation" do expect(page).to have_content("Nothing published yet") end - include_examples "not published permissions", :draft_publication_legislation_process_path + it_behaves_like "not published permissions", :draft_publication_legislation_process_path end context "allegations phase" do @@ -355,7 +355,7 @@ describe "Legislation" do expect(page).to have_content("Nothing published yet") end - include_examples "not published permissions", :allegations_legislation_process_path + it_behaves_like "not published permissions", :allegations_legislation_process_path end context "final version publication phase" do @@ -375,7 +375,7 @@ describe "Legislation" do expect(page).to have_content("Nothing published yet") end - include_examples "not published permissions", :result_publication_legislation_process_path + it_behaves_like "not published permissions", :result_publication_legislation_process_path end context "proposals phase" do @@ -395,7 +395,7 @@ describe "Legislation" do expect(page).to have_content("There are no proposals") end - include_examples "not published permissions", :legislation_process_proposals_path + it_behaves_like "not published permissions", :legislation_process_proposals_path end context "Milestones" do