lib/pdk/cli/new/test.rb in pdk-1.17.0 vs lib/pdk/cli/new/test.rb in pdk-1.18.0
- old
+ new
@@ -38,10 +38,11 @@
begin
generator, obj = PDK::Util::PuppetStrings.find_object(object_name)
PDK::CLI::Util.analytics_screen_view('new_test', opts)
- generator.new(PDK::Util.module_root, obj['name'], opts.merge(spec_only: true)).run
+ updates = generator.new(PDK.context, obj['name'], opts.merge(spec_only: true)).run
+ PDK::CLI::Util::UpdateManagerPrinter.print_summary(updates, tense: :past)
rescue PDK::Util::PuppetStrings::NoObjectError
raise PDK::CLI::ExitWithError, _('Unable to find anything called "%{object}" to generate unit tests for.') % { object: object_name }
rescue PDK::Util::PuppetStrings::NoGeneratorError => e
raise PDK::CLI::ExitWithError, _('PDK does not support generating unit tests for "%{object_type}" objects.') % { object_type: e.message }
end