inspec/test/unit/fetchers/local_test.rb

29 lines
629 B
Ruby
Raw Normal View History

require "helper"
require "inspec/fetcher"
2016-02-21 01:02:39 +00:00
describe Inspec::Fetcher::Local do
let(:fetcher) { Inspec::Fetcher::Local }
2016-02-21 01:02:39 +00:00
it "registers with the fetchers registry" do
reg = Inspec::Fetcher::Registry.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