mirror of
https://github.com/inspec/inspec
synced 2024-12-29 14:33:17 +00:00
9792bae00d
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
28 lines
629 B
Ruby
28 lines
629 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::Fetcher::Registry.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
|