Merge pull request #393 from mcanevet/dev/rspec_puppet_1_0
Fix unit tests with rspec-puppet 1.0
This commit is contained in:
commit
a4661607d1
2 changed files with 13 additions and 9 deletions
2
Gemfile
2
Gemfile
|
@ -3,7 +3,7 @@ source ENV['GEM_SOURCE'] || "https://rubygems.org"
|
|||
group :development, :test do
|
||||
gem 'rake'
|
||||
gem 'puppetlabs_spec_helper', :require => false
|
||||
gem 'rspec-puppet', '< 1.0'
|
||||
gem 'rspec-puppet', '~> 1.0'
|
||||
gem 'puppet-lint', '~> 0.3.2'
|
||||
gem 'beaker', :require => false
|
||||
gem 'beaker-rspec', :require => false
|
||||
|
|
|
@ -28,8 +28,9 @@ describe 'postgresql::server::pg_hba_rule', :type => :define do
|
|||
}
|
||||
end
|
||||
it do
|
||||
content = param('concat::fragment', 'pg_hba_rule_test', 'content')
|
||||
content.should =~ /host\s+all\s+all\s+1\.1\.1\.1\/24\s+md5/
|
||||
should contain_concat__fragment('pg_hba_rule_test').with({
|
||||
:content => /host\s+all\s+all\s+1\.1\.1\.1\/24\s+md5/
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -44,8 +45,9 @@ describe 'postgresql::server::pg_hba_rule', :type => :define do
|
|||
}
|
||||
end
|
||||
it do
|
||||
content = param('concat::fragment', 'pg_hba_rule_test', 'content')
|
||||
content.should =~ /local\s+all\s+all\s+ident/
|
||||
should contain_concat__fragment('pg_hba_rule_test').with({
|
||||
:content => /local\s+all\s+all\s+ident/
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -62,8 +64,9 @@ describe 'postgresql::server::pg_hba_rule', :type => :define do
|
|||
}
|
||||
end
|
||||
it do
|
||||
content = param('concat::fragment', 'pg_hba_rule_test', 'content')
|
||||
content.should =~ /host\s+all\s+all\s+0\.0\.0\.0\/0\s+ldap\s+foo=bar/
|
||||
should contain_concat__fragment('pg_hba_rule_test').with({
|
||||
:content => /host\s+all\s+all\s+0\.0\.0\.0\/0\s+ldap\s+foo=bar/
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -152,8 +155,9 @@ describe 'postgresql::server::pg_hba_rule', :type => :define do
|
|||
end
|
||||
|
||||
it do
|
||||
content = param('concat::fragment', 'pg_hba_rule_test', 'content')
|
||||
content.should =~ /local\s+all\s+all\s+0\.0\.0\.0\/0\s+peer/
|
||||
should contain_concat__fragment('pg_hba_rule_test').with({
|
||||
:content => /local\s+all\s+all\s+0\.0\.0\.0\/0\s+peer/
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue