(MAINT) declare an exclusion filter for the tests using with_env on facter 1.6
The with_env function is not available in facter 1.6 and OpenBSD is not supported.
This commit is contained in:
@@ -1 +1,6 @@
|
||||
require 'puppetlabs_spec_helper/module_spec_helper'
|
||||
|
||||
RSpec.configure do |c|
|
||||
# declare an exclusion filter for the tests using with_env on facter 1.6, as the function is not available on 1.6
|
||||
c.filter_run_excluding :with_env => true if Facter.version =~ /^1\.6\./
|
||||
end
|
||||
|
||||
@@ -7,7 +7,7 @@ describe Facter::Util::Fact do
|
||||
|
||||
describe "java_version" do
|
||||
context 'returns java version when java present' do
|
||||
context 'on OpenBSD' do
|
||||
context 'on OpenBSD', :with_env => true do
|
||||
before do
|
||||
Facter.fact(:operatingsystem).stubs(:value).returns("OpenBSD")
|
||||
end
|
||||
@@ -41,7 +41,7 @@ Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
|
||||
end
|
||||
|
||||
context 'returns nil when java not present' do
|
||||
context 'on OpenBSD' do
|
||||
context 'on OpenBSD', :with_env => true do
|
||||
before do
|
||||
Facter.fact(:operatingsystem).stubs(:value).returns("OpenBSD")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user