Skip to content
This repository was archived by the owner on Nov 24, 2023. It is now read-only.

Commit a3e0d31

Browse files
committed
Fix convetion rubcop errors
1 parent 2033b42 commit a3e0d31

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

spec/classes/github_actions_runner_spec.rb

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,31 @@
1111
},
1212
}
1313
end
14-
15-
it { is_expected.to compile.and_raise_error(/Either 'org_name' or 'enterprise_name' is required to create runner instances/) }
1614

17-
let(:params) do
18-
{
19-
'org_name' => 'github_org',
20-
'instances' => {
21-
'first_runner' => {
22-
'labels' => ['test_label1', 'test_label2'],
23-
'repo_name' => 'test_repo',
24-
},
25-
},
26-
}
15+
context 'is expected compile and raise error' do
16+
it do
17+
is_expected.to compile.and_raise_error(%r{Either 'org_name' or 'enterprise_name' is required to create runner instances})
18+
end
2719
end
2820

29-
it { is_expected.to compile.with_all_deps }
30-
it { is_expected.to contain_class('github_actions_runner') }
21+
context 'is expected compile' do
22+
let(:params) do
23+
super().merge(
24+
'org_name' => 'github_org',
25+
'instances' => {
26+
'first_runner' => {
27+
'labels' => ['test_label1', 'test_label2'],
28+
'repo_name' => 'test_repo',
29+
},
30+
},
31+
)
32+
end
33+
34+
it do
35+
it { is_expected.to compile.with_all_deps }
36+
it { is_expected.to contain_class('github_actions_runner') }
37+
end
38+
end
3139

3240
context 'is expected to create a github_actions_runner root directory' do
3341
it do

0 commit comments

Comments
 (0)