(MODULES-1570) Stub exec for older Facter
Otherwise this spec will fail with
```
Mocha::ExpectationError:
unexpected invocation: Facter::Util::Resolution.which('uname')
```
This commit is contained in:
@@ -21,6 +21,7 @@ Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
|
|||||||
|
|
||||||
context 'returns nil when java not present' do
|
context 'returns nil when java not present' do
|
||||||
it do
|
it do
|
||||||
|
Facter::Util::Resolution.stubs(:exec)
|
||||||
Facter::Util::Resolution.expects(:which).with("java").returns(false)
|
Facter::Util::Resolution.expects(:which).with("java").returns(false)
|
||||||
Facter.fact(:java_version).should be_nil
|
Facter.fact(:java_version).should be_nil
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user