From f4f1decf329230a6bb32fad3f9f1f0431909380d Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Sat, 15 Apr 2017 17:32:38 +0200 Subject: [PATCH] rubocop: autofixes --- spec/defines/config_spec.rb | 1 + spec/defines/gpgkey_spec.rb | 1 + spec/defines/group_spec.rb | 1 + spec/defines/plugin_spec.rb | 3 +++ 4 files changed, 6 insertions(+) diff --git a/spec/defines/config_spec.rb b/spec/defines/config_spec.rb index 1795c528..a179b698 100644 --- a/spec/defines/config_spec.rb +++ b/spec/defines/config_spec.rb @@ -3,6 +3,7 @@ describe 'yum::config' do context 'with no parameters' do let(:title) { 'assumeyes' } + it { is_expected.to raise_error(Puppet::PreformattedError, %r{expects a value for parameter 'ensure'}) } end diff --git a/spec/defines/gpgkey_spec.rb b/spec/defines/gpgkey_spec.rb index 246005bc..3e3e1f62 100644 --- a/spec/defines/gpgkey_spec.rb +++ b/spec/defines/gpgkey_spec.rb @@ -3,6 +3,7 @@ describe 'yum::gpgkey' do context 'with no parameters' do let(:title) { '/test-key' } + it { is_expected.to raise_error(Puppet::PreformattedError, %r{Missing params: \$content or \$source must be specified}) } end diff --git a/spec/defines/group_spec.rb b/spec/defines/group_spec.rb index 6d2512f2..ea435259 100644 --- a/spec/defines/group_spec.rb +++ b/spec/defines/group_spec.rb @@ -3,6 +3,7 @@ describe 'yum::group' do context 'with no parameters' do let(:title) { 'Core' } + it { is_expected.to compile.with_all_deps } it { is_expected.to contain_exec("yum-groupinstall-#{title}").with_command("yum -y groupinstall 'Core'") } end diff --git a/spec/defines/plugin_spec.rb b/spec/defines/plugin_spec.rb index fdf64d15..bb2e6f71 100644 --- a/spec/defines/plugin_spec.rb +++ b/spec/defines/plugin_spec.rb @@ -8,6 +8,7 @@ context 'with no parameters' do let(:title) { 'fastestmirror' } + it { is_expected.to compile.with_all_deps } it { is_expected.to contain_package("#{prefix}-#{title}").with_ensure('present') } end @@ -15,6 +16,7 @@ context 'when explicitly set to install' do let(:title) { 'fastestmirror' } let(:params) { { ensure: 'present' } } + it { is_expected.to compile.with_all_deps } it { is_expected.to contain_package("#{prefix}-#{title}").with_ensure('present') } end @@ -22,6 +24,7 @@ context 'when explicitly set to remove' do let(:title) { 'fastestmirror' } let(:params) { { ensure: 'absent' } } + it { is_expected.to compile.with_all_deps } it { is_expected.to contain_package("#{prefix}-#{title}").with_ensure('absent') } end