mirror of
https://github.com/inspec/inspec
synced 2024-12-19 17:43:44 +00:00
476c6878b3
+ Turn off verbosity in Rakefile by default. Use `rake V=1` to turn back on. + MiniTest -> Minitest everywhere. + MiniTest::Unit::TestCase -> Minitest::Test everywhere. + Updated minitest doco urls to official and up-to-date site. + Normalize requires. Only needs "minitest/autorun" and "minitest/pride". Signed-off-by: Ryan Davis <zenspider@chef.io>
27 lines
824 B
Ruby
27 lines
824 B
Ruby
require 'minitest/autorun'
|
|
require_relative '../../../../lib/inspec'
|
|
|
|
module PluginV2BackCompat
|
|
class PluginV1TypeClassFetchers < Minitest::Test
|
|
|
|
# Note: we can't call klass.name, because that is redefined as a setter.
|
|
|
|
# cli had a base class (which was really a registry), but no class fetcher
|
|
# There was no Inspec.plugin(...)
|
|
|
|
def test_get_plugin_v1_base_for_fetchers
|
|
klass = Inspec.fetcher(1)
|
|
assert_kind_of Class, klass
|
|
assert Inspec::Plugins.const_defined? :Fetcher
|
|
assert_equal Inspec::Plugins::Fetcher, klass
|
|
end
|
|
|
|
def test_get_plugin_v1_base_for_source_readers
|
|
klass = Inspec.source_reader(1)
|
|
assert_kind_of Class, klass
|
|
assert Inspec::Plugins.const_defined? :SourceReader
|
|
assert_equal Inspec::Plugins::SourceReader, klass
|
|
end
|
|
|
|
end
|
|
end
|