inspec/test/unit/fetchers/local_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

28 lines
625 B
Ruby

require "helper"
require "inspec/fetcher"
describe Inspec::Fetcher::Local do
let(:fetcher) { Inspec::Fetcher::Local }
it "registers with the fetchers registry" do
reg = Inspec::FetcherSystem.registry
_(reg["local"]).must_equal fetcher
end
describe "applied to this file" do
let(:res) { fetcher.resolve(__FILE__) }
it "must be resolved" do
_(res).must_be_kind_of fetcher
end
end
describe "applied to this folder" do
let(:path) { File.dirname(__FILE__) }
let(:res) { fetcher.resolve(path) }
it "must be resolved" do
_(res).must_be_kind_of fetcher
end
end
end