From 8ca75f6d074b83ee48d9ce713cdb3e28e57d2cf8 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 28 Jan 2016 00:55:26 +0100 Subject: update module to make it work with all the new features of trocla 0.2.2 --- spec/classes/master_spec.rb | 52 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 spec/classes/master_spec.rb (limited to 'spec/classes/master_spec.rb') diff --git a/spec/classes/master_spec.rb b/spec/classes/master_spec.rb new file mode 100644 index 0000000..ad99c86 --- /dev/null +++ b/spec/classes/master_spec.rb @@ -0,0 +1,52 @@ +require File.expand_path(File.join(File.dirname(__FILE__),'../spec_helper')) + +describe 'trocla::master', :type => 'class' do + context 'with default params' do + context 'on RedHat' do + let(:facts) { + { + :osfamily => 'RedHat', + } + } + it { should contain_package('trocla').with( + :name => 'rubygem-trocla', + :ensure => 'installed' + )} + it { should compile.with_all_deps } + end + context 'on Debian' do + let(:facts) { + { + :osfamily => 'Debian', + } + } + it { should contain_package('trocla').with( + :ensure => 'installed' + )} + it { should compile.with_all_deps } + end + end + context 'with gem provider' do + let(:params){ + { + :provider => 'gem' + } + } + it { should contain_package('trocla').with( + :ensure => 'installed', + :provider => 'gem' + )} + + it { should compile.with_all_deps } + context 'on RedHat' do + it { should contain_package('trocla').with( + :name => 'trocla', + :ensure => 'installed', + :provider => 'gem' + )} + + it { should compile.with_all_deps } + end + end +end + -- cgit v1.2.3