(FM-7795) Cleanup java tests (#350)

* Add idempotent_apply function

* Remove unsupported OS specific code

* Remove outdated comments

* Improve unit test coverage

* Fix typo
This commit is contained in:
Eimhin Laverty
2019-02-26 12:22:27 +00:00
committed by Helen
parent 5509042cd1
commit 7cd34dd291
6 changed files with 54 additions and 126 deletions

View File

@@ -47,7 +47,7 @@ describe 'java_default_home' do
context 'when java not present, return nil' do
it do
allow(Facter::Util::Resolution).to receive(:exec) # Catch all other calls
expect(Facter::Util::Resolution).to receive(:which).with('java').at_least(1).and_return(false)
expect(Facter::Util::Resolution).to receive(:which).with('java').at_least(1).and_return(nil)
expect(Facter.value(:java_default_home)).to be_nil
end
end