Skip to content

Commit 4ec8a0e

Browse files
committed
fix linux user spec
1 parent 71d0d03 commit 4ec8a0e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/msf/core/post/linux/user.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module Msf
44
class Post
55
module Linux
66
module User
7+
include ::Msf::Post::Common
78
#
89
# Returns a string of the user's home directory
910
#

spec/lib/msf/core/post/linux/user_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@
1313

1414
context 'when the user exists' do
1515
it 'returns the home directory path from /etc/passwd' do
16-
expect(tester).to receive(:cmd_exec)
16+
expect(subject).to receive(:cmd_exec)
1717
.with(expected_command)
1818
.and_return("/home/testuser\n")
1919

20-
result = tester.get_home_dir(user)
20+
result = subject.get_home_dir(user)
2121
expect(result).to eq('/home/testuser')
2222
end
2323
end
2424

2525
context 'when the user does not exist in /etc/passwd' do
2626
it 'returns an empty string' do
27-
expect(tester).to receive(:cmd_exec)
27+
expect(subject).to receive(:cmd_exec)
2828
.with(expected_command)
2929
.and_return("\n")
3030

31-
result = tester.get_home_dir(user)
31+
result = subject.get_home_dir(user)
3232
expect(result).to eq('')
3333
end
3434
end

0 commit comments

Comments
 (0)