mirror of
https://github.com/inspec/inspec
synced 2024-12-20 01:54:08 +00:00
fae4230a41
This was the next most expensive require in the analysis. Also rearranged the way that ui handled tables to be lazy. ``` % SLOW=1 time rake test:functional before: Finished in 681.514579s, 0.5136 runs/s, 2.9919 assertions/s. after : Finished in 642.655918s, 0.5446 runs/s, 3.1728 assertions/s. ``` Signed-off-by: Ryan Davis <zenspider@chef.io>
28 lines
605 B
Ruby
28 lines
605 B
Ruby
require "helper"
|
|
require "inspec/fetcher"
|
|
|
|
describe Fetchers::Local do
|
|
let(:fetcher) { Fetchers::Local }
|
|
|
|
it "registers with the fetchers registry" do
|
|
reg = Inspec::Fetcher.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
|