Fixed resolver_test.rb by making Inspec::Config.cached a lazy accessor.

Signed-off-by: Ryan Davis <zenspider@chef.io>
This commit is contained in:
Ryan Davis 2020-01-03 17:13:18 -08:00
parent 885e4f6c71
commit 0e77af3a77

View file

@ -44,7 +44,7 @@ module Inspec
# Use this to get a cached version of the config. This prevents you from # Use this to get a cached version of the config. This prevents you from
# being required to pass it around everywhere. # being required to pass it around everywhere.
def self.cached def self.cached
@cached_config @cached_config ||= {}
end end
def self.cached=(cfg) def self.cached=(cfg)