Skip to content

Commit

Permalink
Merge pull request #166 from vrtdev/bugfix/rubocop_rspec_warnings
Browse files Browse the repository at this point in the history
Update to new is_expected.to syntax in favor of should
  • Loading branch information
crayfishx committed Oct 28, 2016
2 parents 23c2c2e + e4c1d30 commit 235417d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion spec/acceptance/hiera_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class { 'hiera':
end
describe file(hierayaml), node: master do
its(:content) do
should match <<-EOS
is_expected.to match <<-EOS
# managed by puppet
---
:backends:
Expand Down
46 changes: 23 additions & 23 deletions spec/classes/hiera_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
end
describe 'default params' do
it { should compile.with_all_deps }
it { is_expected.to compile.with_all_deps }
end
describe 'other params' do
let(:params) do
Expand All @@ -21,9 +21,9 @@
merge_behavior: 'deeper'
}
end
it { should contain_class('hiera::eyaml') }
it { should contain_class('hiera::deep_merge') }
it { should contain_package('hiera') }
it { is_expected.to contain_class('hiera::eyaml') }
it { is_expected.to contain_class('hiera::deep_merge') }
it { is_expected.to contain_package('hiera') }
end
describe 'param manage_package => false' do
let(:params) do
Expand All @@ -35,10 +35,10 @@
}
end
it { is_expected.to compile }
it { should_not contain_hiera__install('eyaml') }
it { should_not contain_hiera__install('ruby_gpg') }
it { should_not contain_hiera__install('hiera-eyaml-gpg') }
it { should contain_exec('createkeys').that_requires('File[/etc/keys]') }
it { is_expected.not_to contain_hiera__install('eyaml') }
it { is_expected.not_to contain_hiera__install('ruby_gpg') }
it { is_expected.not_to contain_hiera__install('hiera-eyaml-gpg') }
it { is_expected.to contain_exec('createkeys').that_requires('File[/etc/keys]') }
end
describe 'param manage_package => true and create_keys => true' do
let(:params) do
Expand All @@ -48,7 +48,7 @@
keysdir: '/etc/keys'
}
end
it { should contain_exec('createkeys').that_requires('Hiera::Install[eyaml]').that_requires('File[/etc/keys]') }
it { is_expected.to contain_exec('createkeys').that_requires('Hiera::Install[eyaml]').that_requires('File[/etc/keys]') }
end
describe 'hiera.yaml template' do
describe ':hierarchy: section' do
Expand Down Expand Up @@ -282,7 +282,7 @@
}
end
describe 'default params' do
it { should compile.with_all_deps }
it { is_expected.to compile.with_all_deps }
end
describe 'other params' do
let(:params) do
Expand All @@ -291,8 +291,8 @@
merge_behavior: 'deeper'
}
end
it { should contain_class('hiera::eyaml') }
it { should contain_class('hiera::deep_merge') }
it { is_expected.to contain_class('hiera::eyaml') }
it { is_expected.to contain_class('hiera::deep_merge') }
end
end
elsif Puppet.version =~ %r{^4}
Expand All @@ -306,7 +306,7 @@
}
end
describe 'default params' do
it { should compile.with_all_deps }
it { is_expected.to compile.with_all_deps }
end
describe 'other params' do
let(:params) do
Expand All @@ -315,8 +315,8 @@
merge_behavior: 'deeper'
}
end
it { should contain_class('hiera::eyaml') }
it { should contain_class('hiera::deep_merge') }
it { is_expected.to contain_class('hiera::eyaml') }
it { is_expected.to contain_class('hiera::deep_merge') }
end
describe 'param manage_package => false' do
let(:params) do
Expand All @@ -328,10 +328,10 @@
}
end
it { is_expected.to compile }
it { should_not contain_hiera__install('eyaml') }
it { should_not contain_hiera__install('ruby_gpg') }
it { should_not contain_hiera__install('hiera-eyaml-gpg') }
it { should contain_exec('createkeys').that_requires('File[/etc/keys]') }
it { is_expected.not_to contain_hiera__install('eyaml') }
it { is_expected.not_to contain_hiera__install('ruby_gpg') }
it { is_expected.not_to contain_hiera__install('hiera-eyaml-gpg') }
it { is_expected.to contain_exec('createkeys').that_requires('File[/etc/keys]') }
end
describe 'param manage_package => true and create_keys => true' do
let(:params) do
Expand All @@ -341,7 +341,7 @@
keysdir: '/etc/keys'
}
end
it { should contain_exec('createkeys').that_requires('Hiera::Install[eyaml]').that_requires('File[/etc/keys]') }
it { is_expected.to contain_exec('createkeys').that_requires('Hiera::Install[eyaml]').that_requires('File[/etc/keys]') }
end
describe 'other_backends' do
let(:params) do
Expand Down Expand Up @@ -517,7 +517,7 @@
}
end
describe 'default params' do
it { should compile.with_all_deps }
it { is_expected.to compile.with_all_deps }
end
describe 'other params' do
let(:params) do
Expand All @@ -526,8 +526,8 @@
merge_behavior: 'deeper'
}
end
it { should contain_class('hiera::eyaml') }
it { should contain_class('hiera::deep_merge') }
it { is_expected.to contain_class('hiera::eyaml') }
it { is_expected.to contain_class('hiera::deep_merge') }
end
end
end
Expand Down

0 comments on commit 235417d

Please sign in to comment.