Skip to content

Commit 9357573

Browse files
committed
Fix rubocop target version, io helpers, helper usage
1 parent 22d182a commit 9357573

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ AllCops:
1212
NewCops: enable
1313
Exclude:
1414
- vendor/bundle/**/**
15-
TargetRubyVersion: 2.6
15+
TargetRubyVersion: 3.2
1616

1717
Metrics/ParameterLists:
1818
Enabled: false

spec/integration/plugin_helper_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
RSpec.describe CodeTeams::Plugin, 'helper integration' do
22
before do
33
CodeTeams.bust_caches!
4-
write_team_yml(extra_data: { foo: 'foo', bar: 'bar' })
4+
write_team_yml(extra_data: { 'foo' => 'foo', 'bar' => 'bar' })
55
end
66

77
let(:team) { CodeTeams.find('My Team') }
@@ -25,7 +25,7 @@ def test_plugin
2525
end
2626

2727
it 'supports nested data' do
28-
write_team_yml(extra_data: { foo: { bar: 'bar' } })
28+
write_team_yml(extra_data: { 'foo' => { 'bar' => 'bar' } })
2929
expect(team.test_plugin.foo['bar']).to eq('bar')
3030
end
3131

spec/support/io_helpers.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module IOHelpers
22
def write_team_yml(extra_data: false)
3-
write_file('config/teams/my_team.yml', <<~YML.strip)
4-
name: My Team
5-
extra_data: #{extra_data}
6-
YML
3+
write_file('config/teams/my_team.yml', YAML.dump({
4+
name: 'My Team',
5+
extra_data: extra_data
6+
}.transform_keys(&:to_s)))
77
end
88

99
def write_file(path, content = '')

0 commit comments

Comments
 (0)