inspec/lib/plugins/inspec-plugin-manager-cli/test/unit/plugin_def_test.rb
Clinton Wolfe 0ced18841f
CLI Plugin Manager SubCommand (#3414)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-09-25 10:29:18 -04:00

20 lines
940 B
Ruby

require_relative '../../../shared/core_plugin_test_helper.rb'
#-----------------------------------------------------------------------#
# Plugin Definition
#-----------------------------------------------------------------------#
class PluginManagerCliDefinitionTests < MiniTest::Test
include CorePluginUnitHelper
def test_plugin_registered
loader = Inspec::Plugin::V2::Loader.new
loader.load_all # We want to ensure it is auto-loaded
assert registry.known_plugin?(:'inspec-plugin-manager-cli'), 'inspec-plugin-manager-cli should be registered'
assert registry.loaded_plugin?(:'inspec-plugin-manager-cli'), 'inspec-plugin-manager-cli should be loaded'
status = registry[:'inspec-plugin-manager-cli']
assert_equal 2, status.api_generation, 'inspec-plugin-manager-cli should be v2'
assert_includes status.plugin_types, :cli_command, 'inspec-plugin-manager-cli should have cli_command activators'
end
end