inspec/test/unit/fetchers/mock_test.rb
Ryan Davis 07dc5e3192 First pass at cleaning deprecations for old minitest/spec-style tests.
3 files left to go, and they're behaving oddly so I'm leaving them out
in this pass. Looks like 21 deprecations left.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-10-03 13:45:19 -07:00

25 lines
522 B
Ruby

require "helper"
require "fetchers/mock"
describe Fetchers::Mock do
let(:fetcher) { Fetchers::Mock }
it "registers with the fetchers registry" do
reg = Inspec::Fetcher.registry
_(reg["mock"]).must_equal fetcher
end
it "wont load nil" do
_(fetcher.resolve(nil)).must_be :nil?
end
it "wont load a string" do
_(fetcher.resolve(rand.to_s)).must_be :nil?
end
describe "applied to a map" do
it "must be resolved" do
_(fetcher.resolve({})).must_be_kind_of fetcher
end
end
end