]> gitweb.fluxo.info Git - puppet-samba.git/commitdiff
test that Linux os's that aren't gentoo raise an
authorAdam Jahn <ajjahn@gmail.com>
Mon, 13 Apr 2015 17:34:27 +0000 (13:34 -0400)
committerAdam Jahn <ajjahn@gmail.com>
Mon, 13 Apr 2015 17:34:27 +0000 (13:34 -0400)
error

spec/classes/samba__server__service_spec.rb

index 649812487a5b988aa20f6e88c405b4729919b535..ada7f21af1edd291ca0a06074e9844f7aea61e55 100644 (file)
@@ -27,9 +27,14 @@ describe 'samba::server::service' do
     it { should contain_service('smbd') }
   end
 
-  context 'on a Gentoo os family' do
-    let(:facts) {{ :osfamily => 'Linux', :operatingsystem => 'Gentoo' }}
-    it { should contain_service('samba') }
+  context 'on Linux os family' do
+    let(:facts) {{ :osfamily => 'Linux' }}
+    it { should raise_error(/is not supported by this module./) }
+
+    context 'Gentoo' do
+      let(:facts) {{ :osfamily => 'Linux', :operatingsystem => 'Gentoo' }}
+      it { should contain_service('samba') }
+    end
   end
 
   context 'on an unsupported OS' do