From 0169b9ab3c1722a23af563a38ea3165042592f63 Mon Sep 17 00:00:00 2001 From: Adam Jahn Date: Mon, 13 Apr 2015 13:34:27 -0400 Subject: test that Linux os's that aren't gentoo raise an error --- spec/classes/samba__server__service_spec.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'spec/classes') 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 -- cgit v1.2.3