inspec/test/unit/fetchers/local_test.rb

29 lines
605 B
Ruby
Raw Normal View History

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