inspec/test/unit/fetchers/fetchers_test.rb

22 lines
506 B
Ruby
Raw Normal View History

2016-02-21 01:02:39 +00:00
# encoding: utf-8
# author: Dominik Richter
# author: Christoph Hartmann
require 'helper'
describe Inspec::Fetcher do
it 'loads the local fetcher for this file' do
res = Inspec::Fetcher.resolve(__FILE__)
res.must_be_kind_of Fetchers::Local
end
it 'is able to handle Windows paths' do
# simulate a local windows path
file = __FILE__
file.tr!('/', '\\')
res = Inspec::Fetcher.resolve(file)
res.must_be_kind_of Fetchers::Local
res.target.must_equal __FILE__
end
2016-02-21 01:02:39 +00:00
end