(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:
Peter Souter
2015-01-08 08:27:56 -08:00
parent cd3ac1ee46
commit 46524ee6eb

View File

@@ -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
it do
Facter::Util::Resolution.stubs(:exec)
Facter::Util::Resolution.expects(:which).with("java").returns(false)
Facter.fact(:java_version).should be_nil
end