(maint) Move stubs for apt update fact
[puppet-modules/puppetlabs-apt.git] / spec / unit / facter / apt_update_last_success_spec.rb
index 08774cd012eb47bde480ec264970dc999c77656e..14bc3ab3bd35a706ed2b84d742bbfcf2d4e7626f 100644 (file)
@@ -5,23 +5,19 @@ 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
-      should == -1
+      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
-      should == 1407660561
+      is_expected.to eq(1407660561)
     end
   end