Update rspec-puppet tests for 2.0
This patch replaces `subject` with `catalogue` for the raise_error matchers because `subject` no longer contains Puppet errors. We also unpin rspec-puppet.
This commit is contained in:
parent
b0f2a8f765
commit
e049fbc464
3 changed files with 4 additions and 5 deletions
1
Gemfile
1
Gemfile
|
@ -3,7 +3,6 @@ source ENV['GEM_SOURCE'] || "https://rubygems.org"
|
|||
group :development, :unit_tests do
|
||||
gem 'rake', :require => false
|
||||
gem 'rspec-core', '3.1.7', :require => false
|
||||
gem 'rspec-puppet', '~> 1.0', :require => false
|
||||
gem 'puppetlabs_spec_helper', :require => false
|
||||
gem 'puppet-lint', :require => false
|
||||
gem 'simplecov', :require => false
|
||||
|
|
|
@ -110,7 +110,7 @@ describe 'postgresql::server::pg_hba_rule', :type => :define do
|
|||
}
|
||||
end
|
||||
it 'should fail parsing when type is not valid' do
|
||||
expect {subject}.to raise_error(Puppet::Error,
|
||||
expect { catalogue }.to raise_error(Puppet::Error,
|
||||
/The type you specified \[invalid\] must be one of/)
|
||||
end
|
||||
end
|
||||
|
@ -134,7 +134,7 @@ describe 'postgresql::server::pg_hba_rule', :type => :define do
|
|||
end
|
||||
|
||||
it 'should fail parsing when auth_method is not valid' do
|
||||
expect {subject}.to raise_error(Puppet::Error,
|
||||
expect { catalogue }.to raise_error(Puppet::Error,
|
||||
/The auth_method you specified \[invalid\] must be one of/)
|
||||
end
|
||||
end
|
||||
|
@ -161,7 +161,7 @@ describe 'postgresql::server::pg_hba_rule', :type => :define do
|
|||
end
|
||||
|
||||
it 'should fail parsing when auth_method is not valid' do
|
||||
expect {subject}.to raise_error(Puppet::Error,
|
||||
expect { catalogue }.to raise_error(Puppet::Error,
|
||||
/The auth_method you specified \[peer\] must be one of: trust, reject, md5, sha1, password, gss, sspi, krb5, ident, ldap, radius, cert, pam/)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -59,7 +59,7 @@ describe 'postgresql::server::pg_ident_rule', :type => :define do
|
|||
}
|
||||
end
|
||||
it 'should fail because $manage_pg_ident_conf is false' do
|
||||
expect {subject}.to raise_error(Puppet::Error,
|
||||
expect { catalogue }.to raise_error(Puppet::Error,
|
||||
/postgresql::server::manage_pg_ident_conf has been disabled/)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue