puppet-manila/spec/classes/manila_db_postgresql_spec.rb
Gael Chamoulaud d60db0c73e Spec: updates for rspec-puppet 2.x and rspec 3.x
This patch aim to update our specs test in order to work with the new
rspec-puppet release 2.0.0, in the mean time, we update rspec syntax
in order to be prepared for rspec 3.x move.

In details:

* Convert 'should' keyword to 'is_expected.to' (prepare rspec 3.x)
* Upgrade and pin rspec-puppet from 1.0.1 to 2.0.0
* Clean Gemfile (remove over-specificication of runtime deps of puppetlabs_spec_helper)

Change-Id: I062afe69fea8acb4785c537df7400d9c5d7034b4
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2015-03-15 17:24:02 +01:00

59 lines
1.2 KiB
Ruby

require 'spec_helper'
describe 'manila::db::postgresql' do
let :req_params do
{ :password => 'pw' }
end
let :pre_condition do
'include postgresql::server'
end
context 'on a RedHat osfamily' do
let :facts do
{
:osfamily => 'RedHat',
:operatingsystemrelease => '7.0',
:concat_basedir => '/var/lib/puppet/concat'
}
end
context 'with only required parameters' do
let :params do
req_params
end
it { is_expected.to contain_postgresql__server__db('manila').with(
:user => 'manila',
:password => 'md5b15a47e3dd847f86827b328466426faf'
)}
end
end
context 'on a Debian osfamily' do
let :facts do
{
:operatingsystemrelease => '7.8',
:operatingsystem => 'Debian',
:osfamily => 'Debian',
:concat_basedir => '/var/lib/puppet/concat'
}
end
context 'with only required parameters' do
let :params do
req_params
end
it { is_expected.to contain_postgresql__server__db('manila').with(
:user => 'manila',
:password => 'md5b15a47e3dd847f86827b328466426faf'
)}
end
end
end