lib/bolt_spec/plans.rb in bolt-3.22.1 vs lib/bolt_spec/plans.rb in bolt-3.23.0

- old
+ new

@@ -101,18 +101,28 @@ Logging.init :trace, :debug, :info, :notice, :warn, :error, :fatal end # Provided as a class so expectations can be placed on it. class MockPuppetDBClient + def initialize(config) + @instance = MockPuppetDBInstance.new(config) + end + + def instance(_instance) + @instance + end + end + + class MockPuppetDBInstance attr_reader :config def initialize(config) @config = config end end def puppetdb_client - @puppetdb_client ||= MockPuppetDBClient.new(Bolt::PuppetDB::Config.new({})) + @puppetdb_client ||= MockPuppetDBClient.new({}) end def run_plan(name, params) pal = Bolt::PAL.new( Bolt::Config::Modulepath.new(config.modulepath),