23. example
describe
'acme'
do
it
'should
declare
itself'
do
should
contain_class('acme')
end
end
www.nedap.com
Sunday, April 7, 13
24. example
context
‘on
Debian’
do
let
:facts
do
{
:osfamily
=>
‘Debian’
}
end
let
:params
do
{
:ver
=>
‘1.2’
}
end
it
‘should
install
mysql’
do
should
contain_package(‘mysql’).with_ensure(params[:ver]})
end
it
‘should
not
install
redis’
do
should_not
contain_package(‘redis’).with_ensure(‘present’)
end
end
www.nedap.com
Sunday, April 7, 13