We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98373f1 commit ac82828Copy full SHA for ac82828
spec/fixtures/lsuser/root
@@ -0,0 +1,2 @@
1
+#name:home
2
+root:/root
spec/unit/facter/root_home_spec.rb
@@ -49,4 +49,17 @@
49
end
50
51
52
+ context "aix" do
53
+ before do
54
+ Facter.fact(:kernel).stubs(:value).returns("AIX")
55
+ Facter.fact(:osfamily).stubs(:value).returns("AIX")
56
+ end
57
+ let(:expected_root_home) { "/root" }
58
+ sample_lsuser = File.read(fixtures('lsuser','root'))
59
+
60
+ it "should return /root" do
61
+ Facter::Util::Resolution.stubs(:exec).with("lsuser -C -a home root").returns(sample_lsuser)
62
+ expect(Facter.fact(:root_home).value).to eq(expected_root_home)
63
64
65
0 commit comments