Skip to content

Commit

Permalink
Merge pull request #64 from mjankowski/config-3-0
Browse files Browse the repository at this point in the history
Use ruby 3.0 in standard config
  • Loading branch information
searls authored Nov 5, 2024
2 parents ab298f0 + 6d2f4ea commit f6b3701
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .standard.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# For available configuration options, see:
# https://github.com/testdouble/standard
ruby_version: 2.7
ruby_version: 3.0
13 changes: 10 additions & 3 deletions test/standard/rails_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit f6b3701

Please sign in to comment.