Skip to content

Commit

Permalink
fixed broken test for debian, added ubuntu/solaris
Browse files Browse the repository at this point in the history
  • Loading branch information
kitchen committed Nov 20, 2013
1 parent b70a999 commit 106167c
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions spec/classes/params_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,41 @@
end
end

describe 'for osfamily debian' do
let :facts do
{
:osfamily => 'Debian'
}
end

describe 'for operatingsystem ubuntu' do
before { facts[:operatingsystem] = 'Ubuntu' }

it { should include_class('ganglia::params') }
end

describe 'for operatingsystem debian' do
before { facts[:operatingsystem] = 'Debian' }

it 'should fail' do
expect { should include_class('ganglia::params') }.
to raise_error(Puppet::Error, /not supported on .*Debian\/Debian/)
end
end
end


describe 'unsupported osfamily' do
let :facts do
{
:osfamily => 'Debian',
:operatingsystem => 'Debian',
:osfamily => 'Solaris',
:operatingsystem => 'Solaris',
}
end

it 'should fail' do
expect { should include_class('ganglia::params') }.
to raise_error(Puppet::Error, /not supported on Debian/)
to raise_error(Puppet::Error, /not supported on Solaris/)
end
end

Expand Down

0 comments on commit 106167c

Please sign in to comment.