(CONT-773) Rubocop Auto Fixes 11-15
[puppet-modules/puppetlabs-apt.git] / spec / unit / facter / apt_reboot_required_spec.rb
index b15cb4c6076499b68fceb116776de086eb5af6bb..f92282278494603a5e7cbcb3f77c0c3a7f26f3ba 100644 (file)
@@ -1,9 +1,11 @@
+# frozen_string_literal: true
+
 require 'spec_helper'
 
 describe 'apt_reboot_required fact' do
   subject { Facter.fact(:apt_reboot_required).value }
 
-  after(:each) { Facter.clear }
+  before(:each) { Facter.clear }
 
   describe 'if a reboot is required' do
     before(:each) do
@@ -11,6 +13,7 @@ describe 'apt_reboot_required fact' do
       allow(File).to receive(:file?).and_return(true)
       allow(File).to receive(:file?).once.with('/var/run/reboot-required').and_return(true)
     end
+
     it { is_expected.to eq true }
   end
 
@@ -20,6 +23,7 @@ describe 'apt_reboot_required fact' do
       allow(File).to receive(:file?).and_return(true)
       allow(File).to receive(:file?).once.with('/var/run/reboot-required').and_return(false)
     end
+
     it { is_expected.to eq false }
   end
 end