From: Hunter Haugen Date: Wed, 12 Apr 2017 03:38:37 +0000 (-0700) Subject: (maint) Move stubs for apt update fact X-Git-Tag: 3.0.0~2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=8dd9f23de65c77dd0f579b4dd91b810810f62cb5;p=puppet-modules%2Fpuppetlabs-apt.git (maint) Move stubs for apt update fact I can't reproduce this, so just a guess. --- diff --git a/spec/unit/facter/apt_update_last_success_spec.rb b/spec/unit/facter/apt_update_last_success_spec.rb index cb32a5e..14bc3ab 100644 --- a/spec/unit/facter/apt_update_last_success_spec.rb +++ b/spec/unit/facter/apt_update_last_success_spec.rb @@ -5,22 +5,18 @@ describe 'apt_update_last_success fact' do after(:each) { Facter.clear } describe 'on Debian based distro which has not yet created the update-success-stamp file' do - before { + it 'should have a value of -1' do Facter.fact(:osfamily).stubs(:value).returns 'Debian' File.stubs(:exists?).returns false - } - it 'should have a value of -1' do is_expected.to eq(-1) end end describe 'on Debian based distro which has created the update-success-stamp' do - before { + it 'should have the value of the mtime of the file' do Facter.fact(:osfamily).stubs(:value).returns 'Debian' File.stubs(:exists?).returns true File.stubs(:mtime).returns 1407660561 - } - it 'should have the value of the mtime of the file' do is_expected.to eq(1407660561) end end