Skip to content

Commit

Permalink
rubocop: autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Aug 21, 2020
1 parent 980224d commit 912fe96
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions spec/classes/snmp_init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,7 @@
describe 'ensure => badvalue' do
let(:params) { { ensure: 'badvalue' } }

it 'fails' do
expect do
is_expected.to raise_error(Puppet::Error, %r{ensure parameter must be present or absent})
end
end
it { is_expected.to compile.and_raise_error(%r{expects a match for}) }
end

describe 'autoupgrade => true' do
Expand All @@ -189,21 +185,13 @@
describe 'autoupgrade => badvalue' do
let(:params) { { autoupgrade: 'badvalue' } }

it 'fails' do
expect do
is_expected.to raise_error(Puppet::Error, %r{"badvalue" is not a boolean.})
end
end
it { is_expected.to compile.and_raise_error(%r{expects a Boolean value, got String}) }
end

describe 'service_ensure => badvalue' do
let(:params) { { service_ensure: 'badvalue' } }

it 'fails' do
expect do
is_expected.to raise_error(Puppet::Error, %r{service_ensure parameter must be running or stopped})
end
end
it { is_expected.to compile.and_raise_error(%r{expects a match for Stdlib::Ensure::Service}) }
end

describe 'service_config_perms => "0123"' do
Expand Down

0 comments on commit 912fe96

Please sign in to comment.