Skip to content

Commit 65b48a3

Browse files
committed
Add weird dir to viable Dir requests?
1 parent 26317c3 commit 65b48a3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spec/unit/facter/loginctl_linger_users_spec.rb

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
describe 'loginctl_linger_users' do
1111
context 'returns root when nothing is present' do
1212
before do
13+
allow(Dir).to receive(:exist?).with('/home/runner/.facter/facts.d').and_return(false)
1314
allow(Dir).to receive(:exist?).with('/var/lib/systemd/linger').and_return(false)
1415
end
1516

@@ -20,6 +21,7 @@
2021

2122
context 'returns list with root others are present' do
2223
before do
24+
allow(Dir).to receive(:exist?).with('/home/runner/.facter/facts.d').and_return(false)
2325
allow(Dir).to receive(:exist?).with('/var/lib/systemd/linger').and_return(true)
2426
allow(Dir).to receive(:entries).with('/var/lib/systemd/linger').and_return(%w[. .. abc test])
2527
end

0 commit comments

Comments
 (0)