Normalizing two test declarations.

These tests both involve dynamic un-rooted classes. As such, they have
no name and thus print like #<Class:0xXXXXXXXX:...>. I switched one to
a describe instead of Class.new(Minitest::Test) and the other I
stringified the anonymous class.

Signed-off-by: Ryan Davis <zenspider@chef.io>
This commit is contained in:
Ryan Davis 2019-05-14 23:27:18 -07:00
parent f5d35494d9
commit fa7a8c9e19
2 changed files with 2 additions and 2 deletions

View file

@ -5,7 +5,7 @@ require 'helper'
require 'bundles/inspec-supermarket/target'
require 'bundles/inspec-supermarket/api'
describe Inspec::Fetcher do
describe "Inspec::Fetcher" do
it 'loads the local fetcher for this file' do
res = Inspec::Fetcher.resolve(__FILE__)
res.must_be_kind_of Fetchers::Local

View file

@ -14,7 +14,7 @@ module DslUnitTests
:resource_dsl,
].each do |plugin_type_under_test|
Class.new(Minitest::Test) do
describe plugin_type_under_test do
# Assign name to anonymous class, so test output is meaningful
Object.const_set(plugin_type_under_test.to_s.upcase + '_UnitTests', self)