diff options
author | Adam Jahn <ajjahn@gmail.com> | 2015-04-13 13:34:27 -0400 |
---|---|---|
committer | Adam Jahn <ajjahn@gmail.com> | 2015-04-13 13:34:27 -0400 |
commit | 0169b9ab3c1722a23af563a38ea3165042592f63 (patch) | |
tree | 57fcf7f51d0525e9c1886587fd92b5e9aa81f0a9 | |
parent | b4e4a92ff4da6e34a8707ffb49c8ccf6ce316d2b (diff) | |
download | puppet-samba-0169b9ab3c1722a23af563a38ea3165042592f63.tar.gz puppet-samba-0169b9ab3c1722a23af563a38ea3165042592f63.tar.bz2 |
test that Linux os's that aren't gentoo raise an
error
-rw-r--r-- | spec/classes/samba__server__service_spec.rb | 11 |
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 |