mirror of
https://github.com/inspec/inspec
synced 2024-11-26 22:50:36 +00:00
Save off supports[:os] and restore it after each test.
This fixes some other tests that require supports[:os] to be correct. Signed-off-by: Ryan Davis <zenspider@chef.io>
This commit is contained in:
parent
6296fdc688
commit
6e821e787e
1 changed files with 5 additions and 0 deletions
|
@ -57,10 +57,15 @@ describe Inspec::Plugins::Resource do
|
|||
|
||||
describe "supported platform" do
|
||||
def supports_meta(supports)
|
||||
@old = Inspec::Resource.supports[:os]
|
||||
Inspec::Resource.supports[:os] = supports
|
||||
load_resource("os")
|
||||
end
|
||||
|
||||
after do
|
||||
Inspec::Resource.supports[:os] = @old
|
||||
end
|
||||
|
||||
it "loads a profile which supports multiple families" do
|
||||
m = supports_meta([
|
||||
{ os_family: "windows" },
|
||||
|
|
Loading…
Reference in a new issue