X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fdefines%2Fconf_spec.rb;h=3158c16ef41cd842f6f73de870b560343766165e;hb=c5259f83ad20d120d502d8541c75f4ee6021fec8;hp=1296e999f89c283ce602a3b5bde5f51a99772cd9;hpb=2b536b6a200e8f4f7f7ae37ec091abd06ca4cb70;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/defines/conf_spec.rb b/spec/defines/conf_spec.rb index 1296e99..3158c16 100644 --- a/spec/defines/conf_spec.rb +++ b/spec/defines/conf_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'apt::conf', type: :define do let :pre_condition do @@ -5,11 +7,10 @@ describe 'apt::conf', type: :define do end let(:facts) do { - os: { family: 'Debian', name: 'Debian', release: { major: '7', full: '7.0' } }, + os: { family: 'Debian', name: 'Debian', release: { major: '8', full: '8.0' } }, lsbdistid: 'Debian', osfamily: 'Debian', - lsbdistcodename: 'wheezy', - puppetversion: Puppet.version, + lsbdistcodename: 'jessie', } end let :title do @@ -35,8 +36,7 @@ describe 'apt::conf', type: :define do is_expected.to contain_file(filename).with('ensure' => 'present', 'content' => %r{Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;}, 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644') + 'group' => 'root') } context 'with notify_update = true (default)' do @@ -64,7 +64,7 @@ describe 'apt::conf', type: :define do end it 'fails' do - expect { subject.call } .to raise_error(%r{pass in content}) + is_expected.to raise_error(%r{pass in content}) end end @@ -83,8 +83,7 @@ describe 'apt::conf', type: :define do it { is_expected.to contain_file(filename).with('ensure' => 'absent', 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644') + 'group' => 'root') } end end