aboutsummaryrefslogtreecommitdiff
path: root/spec/classes/samba__server__service_spec.rb
diff options
context:
space:
mode:
authorAdam Jahn <ajjahn@gmail.com>2015-04-13 13:34:27 -0400
committerAdam Jahn <ajjahn@gmail.com>2015-04-13 13:34:27 -0400
commit0169b9ab3c1722a23af563a38ea3165042592f63 (patch)
tree57fcf7f51d0525e9c1886587fd92b5e9aa81f0a9 /spec/classes/samba__server__service_spec.rb
parentb4e4a92ff4da6e34a8707ffb49c8ccf6ce316d2b (diff)
downloadpuppet-samba-0169b9ab3c1722a23af563a38ea3165042592f63.tar.gz
puppet-samba-0169b9ab3c1722a23af563a38ea3165042592f63.tar.bz2
test that Linux os's that aren't gentoo raise an
error
Diffstat (limited to 'spec/classes/samba__server__service_spec.rb')
-rw-r--r--spec/classes/samba__server__service_spec.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/classes/samba__server__service_spec.rb b/spec/classes/samba__server__service_spec.rb
index 6498124..ada7f21 100644
--- a/spec/classes/samba__server__service_spec.rb
+++ b/spec/classes/samba__server__service_spec.rb
@@ -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