Skip to content

Commit 16fe1a7

Browse files
committed
Fix rubocop target version, io helpers, helper usage
1 parent 070c7a0 commit 16fe1a7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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)