inspec/test/unit/fetchers/mock_test.rb
Clinton Wolfe 7807c3fa01 Re-namespace core Fetchers
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-11-18 13:20:35 -05:00

25 lines
549 B
Ruby

require "helper"
require "inspec/fetchers/mock"
describe Inspec::Fetcher::Mock do
let(:fetcher) { Inspec::Fetcher::Mock }
it "registers with the fetchers registry" do
reg = Inspec::FetcherSystem.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