diff --git a/.standard.yml b/.standard.yml index 3741b18..e9efa16 100644 --- a/.standard.yml +++ b/.standard.yml @@ -1,3 +1,3 @@ # For available configuration options, see: # https://github.com/testdouble/standard -ruby_version: 2.7 +ruby_version: 3.0 diff --git a/test/standard/rails_test.rb b/test/standard/rails_test.rb index cb4125c..8c480c8 100644 --- a/test/standard/rails_test.rb +++ b/test/standard/rails_test.rb @@ -16,10 +16,17 @@ def test_that_it_has_a_version_number VersionAdded VersionChanged ].freeze + REMOVED_COPS = %w[ + Lint/NumberConversion + Lint/RedundantSafeNavigation + Style/AndOr + Style/CollectionCompact + Style/FormatStringToken + Style/InvertibleUnlessCondition + Style/SymbolProc + ] def test_configures_all_rails_cops - expected = YAML.load_file(Pathname.new(Gem.loaded_specs["rubocop-rails"].full_gem_path).join("config/default.yml")).reject { |name, cop| - ["Lint/NumberConversion", "Style/AndOr", "Style/FormatStringToken", "Style/SymbolProc", "Lint/RedundantSafeNavigation", "Style/InvertibleUnlessCondition", "Style/CollectionCompact"].include?(name) - }.to_h + expected = YAML.load_file(Pathname.new(Gem.loaded_specs["rubocop-rails"].full_gem_path).join("config/default.yml")).except(*REMOVED_COPS).to_h actual = YAML.load_file(BASE_CONFIG) missing = (expected.keys - actual.keys).grep(/\//) # ignore groups like "Layout" extra = actual.keys - expected.keys - ["require"]