diff --git a/manifests/params.pp b/manifests/params.pp index dd5a056..e7658b4 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -8,6 +8,7 @@ case $::osfamily { 'redhat': {} + 'debian': {} default: { fail("Module ${module_name} is not supported on ${::operatingsystem}") } diff --git a/spec/classes/params_spec.rb b/spec/classes/params_spec.rb index 4108250..2c092c5 100644 --- a/spec/classes/params_spec.rb +++ b/spec/classes/params_spec.rb @@ -7,17 +7,23 @@ it { should include_class('udev::params') } end + describe 'for osfamily Debian' do + let(:facts) {{ :osfamily => 'Debian' }} + + it { should include_class('udev::params') } + end + describe 'unsupported osfamily' do let :facts do { - :osfamily => 'Debian', - :operatingsystem => 'Debian', + :osfamily => 'Suse', + :operatingsystem => 'OpenSuSE', } end it 'should fail' do expect { should include_class('udev::params') }. - to raise_error(Puppet::Error, /not supported on Debian/) + to raise_error(Puppet::Error, /not supported on OpenSuSE/) end end