Skip to content

Commit f6b3701

Browse files
authored
Merge pull request #64 from mjankowski/config-3-0
Use ruby 3.0 in standard config
2 parents ab298f0 + 6d2f4ea commit f6b3701

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.standard.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# For available configuration options, see:
22
# https://github.com/testdouble/standard
3-
ruby_version: 2.7
3+
ruby_version: 3.0

test/standard/rails_test.rb

+10-3
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,17 @@ def test_that_it_has_a_version_number
1616
VersionAdded
1717
VersionChanged
1818
].freeze
19+
REMOVED_COPS = %w[
20+
Lint/NumberConversion
21+
Lint/RedundantSafeNavigation
22+
Style/AndOr
23+
Style/CollectionCompact
24+
Style/FormatStringToken
25+
Style/InvertibleUnlessCondition
26+
Style/SymbolProc
27+
]
1928
def test_configures_all_rails_cops
20-
expected = YAML.load_file(Pathname.new(Gem.loaded_specs["rubocop-rails"].full_gem_path).join("config/default.yml")).reject { |name, cop|
21-
["Lint/NumberConversion", "Style/AndOr", "Style/FormatStringToken", "Style/SymbolProc", "Lint/RedundantSafeNavigation", "Style/InvertibleUnlessCondition", "Style/CollectionCompact"].include?(name)
22-
}.to_h
29+
expected = YAML.load_file(Pathname.new(Gem.loaded_specs["rubocop-rails"].full_gem_path).join("config/default.yml")).except(*REMOVED_COPS).to_h
2330
actual = YAML.load_file(BASE_CONFIG)
2431
missing = (expected.keys - actual.keys).grep(/\//) # ignore groups like "Layout"
2532
extra = actual.keys - expected.keys - ["require"]

0 commit comments

Comments
 (0)