From b3e158ef135d26b6feba172f0b9cb5169ab3bd04 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micka=C3=ABl=20Can=C3=A9vet?=
 <mickael.canevet@camptocamp.com>
Date: Thu, 3 Jul 2014 19:29:11 +0200
Subject: [PATCH] Fix unit tests

---
 spec/classes/postfix_satellite_spec.rb |  2 +-
 spec/classes/postfix_spec.rb           | 16 ++++++++--------
 spec/defines/postfix_transport_spec.rb |  6 +++---
 spec/defines/postfix_virtual_spec.rb   |  6 +++---
 4 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/spec/classes/postfix_satellite_spec.rb b/spec/classes/postfix_satellite_spec.rb
index c917b84..f540ae2 100644
--- a/spec/classes/postfix_satellite_spec.rb
+++ b/spec/classes/postfix_satellite_spec.rb
@@ -6,7 +6,7 @@ describe 'postfix::satellite' do
     :osfamily                        => 'Debian',
     :needs_postfix_class_with_params => true,
   } }
-  it { should include_class('postfix::mta') }
+  it { should contain_class('postfix::mta') }
   it { should contain_postfix__virtual('@foo.example.com').with(
     :ensure      => 'present',
     :destination => 'root'
diff --git a/spec/classes/postfix_spec.rb b/spec/classes/postfix_spec.rb
index 173b5bd..e39f000 100644
--- a/spec/classes/postfix_spec.rb
+++ b/spec/classes/postfix_spec.rb
@@ -153,7 +153,7 @@ describe 'postfix' do
       end
       context 'when enabling ldap' do
         it 'should do stuff' do
-          pending 'need to write this still'
+          skip 'need to write this still'
         end
       end
       context 'when a custom mail_user is specified' do
@@ -169,7 +169,7 @@ describe 'postfix' do
           :mailman => true
         } }
         it 'should do stuff' do
-          pending 'need to write this still'
+          skip 'need to write this still'
         end
       end
       context 'when specifying a custom mastercf_source' do
@@ -177,7 +177,7 @@ describe 'postfix' do
           :mastercf_source => 'testy'
         } }
         it 'should do stuff' do
-          pending 'need to write this still'
+          skip 'need to write this still'
         end
       end
       context 'when specifying a custom master_smtp' do
@@ -209,7 +209,7 @@ describe 'postfix' do
           should contain_postfix__config('virtual_alias_maps').with_value('hash:/etc/postfix/virtual')
           should contain_postfix__config('transport_maps').with_value('hash:/etc/postfix/transport')
         end
-        it { should include_class('postfix::mta') }
+        it { should contain_class('postfix::mta') }
         context 'and satellite is also enabled' do
           let (:params) { { :mta => true, :satellite => true, :mydestination => '1.2.3.4', :relayhost => '2.3.4.5' } }
           it 'should fail' do
@@ -219,12 +219,12 @@ describe 'postfix' do
       end
       context 'when specifying mydesitination' do
         it 'should do stuff' do
-          pending 'need to write this still'
+          skip 'need to write this still'
         end
       end
       context 'when specifying mynetworks' do
         it 'should do stuff' do
-          pending 'need to write this still'
+          skip 'need to write this still'
         end
       end
       context 'when specifying myorigin' do
@@ -235,7 +235,7 @@ describe 'postfix' do
       end
       context 'when specifying relayhost' do
         it 'should do stuff' do
-          pending 'need to write this still'
+          skip 'need to write this still'
         end
       end
       context 'when specifying a root_mail_recipient' do
@@ -263,7 +263,7 @@ describe 'postfix' do
       context 'when specifying smtp_listen' do
         let (:params) { { :smtp_listen => 'all' } }
         it 'should do stuff' do
-          pending 'need to write this still'
+          skip 'need to write this still'
         end
       end
       context 'when use_amavisd is true' do
diff --git a/spec/defines/postfix_transport_spec.rb b/spec/defines/postfix_transport_spec.rb
index cc08ab9..fb76d6e 100644
--- a/spec/defines/postfix_transport_spec.rb
+++ b/spec/defines/postfix_transport_spec.rb
@@ -84,7 +84,7 @@ describe 'postfix::transport' do
   end
 
   context 'when using default values' do
-    it { should include_class('postfix::augeas') }
+    it { should contain_class('postfix::augeas') }
     it { should contain_augeas('Postfix transport - foo').with(
       :incl    => '/etc/postfix/transport',
       :lens    => 'Postfix_Transport.lns',
@@ -104,7 +104,7 @@ describe 'postfix::transport' do
       :ensure      => 'present',
     } }
 
-    it { should include_class('postfix::augeas') }
+    it { should contain_class('postfix::augeas') }
     it { should contain_augeas('Postfix transport - foo').with(
       :incl    => '/tmp/transport',
       :lens    => 'Postfix_Transport.lns',
@@ -122,7 +122,7 @@ describe 'postfix::transport' do
       :ensure      => 'absent',
     } }
 
-    it { should include_class('postfix::augeas') }
+    it { should contain_class('postfix::augeas') }
     it { should contain_augeas('Postfix transport - foo').with(
       :incl    => '/etc/postfix/transport',
       :lens    => 'Postfix_Transport.lns',
diff --git a/spec/defines/postfix_virtual_spec.rb b/spec/defines/postfix_virtual_spec.rb
index 62c3c62..46e7ca2 100644
--- a/spec/defines/postfix_virtual_spec.rb
+++ b/spec/defines/postfix_virtual_spec.rb
@@ -83,7 +83,7 @@ describe 'postfix::virtual' do
       :destination => 'bar',
     } }
 
-    it { should include_class('postfix::augeas') }
+    it { should contain_class('postfix::augeas') }
     it { should contain_augeas('Postfix virtual - foo').with(
       :incl    => '/etc/postfix/virtual',
       :lens    => 'Postfix_Virtual.lns',
@@ -101,7 +101,7 @@ describe 'postfix::virtual' do
       :ensure      => 'present',
     } }
 
-    it { should include_class('postfix::augeas') }
+    it { should contain_class('postfix::augeas') }
     it { should contain_augeas('Postfix virtual - foo').with(
       :incl    => '/tmp/virtual',
       :lens    => 'Postfix_Virtual.lns',
@@ -118,7 +118,7 @@ describe 'postfix::virtual' do
       :ensure      => 'absent',
     } }
 
-    it { should include_class('postfix::augeas') }
+    it { should contain_class('postfix::augeas') }
     it { should contain_augeas('Postfix virtual - foo').with(
       :incl    => '/etc/postfix/virtual',
       :lens    => 'Postfix_Virtual.lns',
-- 
GitLab