From 3fe82a0f66d0f8fc71134f970bb54f2195a65d17 Mon Sep 17 00:00:00 2001 From: Sebastian Noe Date: Tue, 12 May 2026 11:15:22 +0200 Subject: [PATCH] fix: align rubocop config between local CI and GitHub Actions (#11) - Remove redundant Rails/Exit disable comments from spec/rails_helper.rb - Add Rails/Exit exclusion for spec/ in .rubocop.yml - Ensures both local (docker compose) and remote (GitHub Actions) agree Co-authored-by: Sebastian Noe --- .rubocop.yml | 4 ++++ spec/rails_helper.rb | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 0e332ff6..40ad4ec9 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -116,6 +116,10 @@ Rails/StrongParametersExpect: Rails/RedirectBackOrTo: Enabled: false +Rails/Exit: + Exclude: + - spec/**/* + Rails/UnknownEnv: Environments: - development diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 3fa496a2..74284e07 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -4,7 +4,7 @@ require 'spec_helper' ENV['RAILS_ENV'] ||= 'test' ENV['TZ'] ||= 'UTC' require_relative '../config/environment' -abort('The Rails environment is running in production mode!') if Rails.env.production? # rubocop:disable Rails/Exit +abort('The Rails environment is running in production mode!') if Rails.env.production? require 'rspec/rails' require 'capybara/cuprite' require 'capybara/rspec' @@ -42,7 +42,7 @@ Rails.root.glob('spec/support/**/*.rb').each { |f| require f } begin ActiveRecord::Migration.maintain_test_schema! rescue ActiveRecord::PendingMigrationError => e - abort e.to_s.strip # rubocop:disable Rails/Exit + abort e.to_s.strip end RSpec.configure do |config|