X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fclasses%2Fparams_spec.rb;h=65759fad1d3e8929226a3843deeb1f868fc60ac6;hb=351c8d5941f6bd02304df6b4185dea8c8104aefa;hp=d85e849d5ae31a370ccce001f274f449608f32f9;hpb=256a63b407a8884d1148a4a3cbb0349bca8a48eb;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/classes/params_spec.rb b/spec/classes/params_spec.rb index d85e849..65759fa 100644 --- a/spec/classes/params_spec.rb +++ b/spec/classes/params_spec.rb @@ -3,35 +3,35 @@ describe 'apt::params', :type => :class do let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian' } } let (:title) { 'my_package' } - it { should contain_apt__params } + it { is_expected.to contain_apt__params } # There are 4 resources in this class currently # there should not be any more resources because it is a params class # The resources are class[apt::params], class[main], class[settings], stage[main] it "Should not contain any resources" do - subject.resources.size.should == 4 + expect(subject.resources.size).to eq(4) end describe "With unknown lsbdistid" do - let(:facts) { { :lsbdistid => 'CentOS' } } + let(:facts) { { :lsbdistid => 'CentOS', :osfamily => 'Debian' } } let (:title) { 'my_package' } it do expect { - should compile + is_expected.to compile }.to raise_error(Puppet::Error, /Unsupported lsbdistid/) end end describe "With lsb-release not installed" do - let(:facts) { { :lsbdistid => '' } } + let(:facts) { { :lsbdistid => '', :osfamily => 'Debian' } } let (:title) { 'my_package' } it do expect { - should compile + is_expected.to compile }.to raise_error(Puppet::Error, /Unable to determine lsbdistid, is lsb-release installed/) end end