summaryrefslogtreecommitdiff
path: root/spec/classes/master_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/classes/master_spec.rb')
-rw-r--r--spec/classes/master_spec.rb52
1 files changed, 52 insertions, 0 deletions
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
+