RSpec tests for rabbitmq::repo::rhel

This commit is contained in:
Vincent Janelle 2012-08-02 16:30:55 -07:00
parent 729c30bf98
commit 75a546b705

View File

@ -0,0 +1,23 @@
require 'spec_helper'
describe 'rabbitmq::repo::rhel' do
describe 'package with params' do
let :params do
{
:key => "http://www.rabbitmq.com/rabbitmq-signing-key-public.asc",
:version => "2.8.4",
:relversion => "1",
}
end
it { should contain_exec("rpm --import #{params[:key]}").with(
'path' => ["/bin","/usr/bin","/sbin","/usr/sbin"],
) }
it { should contain_package('rabbitmq-server').with(
'provider' => 'rpm',
'ensure' => 'installed',
'source' => "http://www.rabbitmq.com/releases/rabbitmq-server/v#{params[:version]}/rabbitmq-server-#{params[:version]}-#{params[:relversion]}.noarch.rpm",
'require' => "Exec[rpm --import #{params[:key]}]",
) }
end
end