Skip to content

Commit 6c324f0

Browse files
committed
Fixed RuboCop linter warnings
1 parent 52cfed1 commit 6c324f0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

spec/defines/plugin_spec.rb

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,30 @@
1515

1616
context 'with defaults for all parameters' do
1717
it { is_expected.to compile.with_all_deps }
18-
it { is_expected.to contain_exec('plugin install foo/plugin:latest').with_command(%r{docker plugin install}).with_unless(%r{docker ls --format='{{.PluginReference}}' | grep -w foo/plugin:latest}) }
18+
it { is_expected.to contain_exec('plugin install foo/plugin:latest').with_command(%r{docker plugin install}) }
19+
it { is_expected.to contain_exec('plugin install foo/plugin:latest').with_unless(%r{docker ls --format='{{.PluginReference}}' | grep -w foo/plugin:latest}) }
1920
end
2021

2122
context 'with enabled => false' do
2223
let(:params) { { 'enabled' => false } }
2324

2425
it { is_expected.to compile.with_all_deps }
25-
it { is_expected.to contain_exec('disable foo/plugin:latest').with_command(%r{docker plugin disable}).with_unless(%r{docker ls --format='{{.PluginReference}}' | grep -w foo/plugin:latest}) }
26+
it { is_expected.to contain_exec('disable foo/plugin:latest').with_command(%r{docker plugin disable}) }
27+
it { is_expected.to contain_exec('disable foo/plugin:latest').with_unless(%r{docker ls --format='{{.PluginReference}}' | grep -w foo/plugin:latest}) }
2628
end
2729

2830
context 'with ensure => absent' do
2931
let(:params) { { 'ensure' => 'absent' } }
3032

3133
it { is_expected.to compile.with_all_deps }
32-
it { is_expected.to contain_exec('plugin remove foo/plugin:latest').with_command(%r{docker plugin rm}).with_onlyif(%r{docker ls --format='{{.PluginReference}}' | grep -w foo/plugin:latest}) }
34+
it { is_expected.to contain_exec('plugin remove foo/plugin:latest').with_command(%r{docker plugin rm}) }
35+
it { is_expected.to contain_exec('plugin remove foo/plugin:latest').with_onlyif(%r{docker ls --format='{{.PluginReference}}' | grep -w foo/plugin:latest}) }
3336
end
3437

3538
context 'with alias => foo-plugin' do
3639
let(:params) { { 'plugin_alias' => 'foo-plugin' } }
3740

38-
it { is_expected.to contain_exec('plugin install foo/plugin:latest').with_command(%r{docker plugin install}).with_unless(%r{docker ls --format='{{.PluginReference}}' | grep -w foo/plugin:latest}) }
41+
it { is_expected.to contain_exec('plugin install foo/plugin:latest').with_command(%r{docker plugin install}) }
42+
it { is_expected.to contain_exec('plugin install foo/plugin:latest').with_unless(%r{docker ls --format='{{.PluginReference}}' | grep -w foo/plugin:latest}) }
3943
end
40-
4144
end

0 commit comments

Comments
 (0)