(MODULES-1570) Add java_major_version fact

Gives the major version of the Java release (ie. Java 1.7.0_71, major version is 7)

We also want to specifically return nil when java not present
This commit is contained in:
Peter Souter
2014-12-29 15:06:22 +00:00
committed by Peter Souter
parent 5168f61c26
commit cd3ac1ee46
6 changed files with 59 additions and 15 deletions

View File

@@ -23,7 +23,7 @@ describe Facter::Util::Fact do
Facter.fact(:java_version).stubs(:value).returns(nil)
end
it do
Facter.fact(:java_patch_level).value.should == "JAVA_NOT_INSTALLED"
Facter.fact(:java_patch_level).value.should be_nil
end
end
end