add unit tests

This commit is contained in:
Christoph Hartmann 2016-02-22 18:24:16 +01:00
parent 0c02a30dc5
commit ee7adc24ec
2 changed files with 4 additions and 1 deletions

View file

@ -48,6 +48,9 @@ describe Inspec::Plugins::RelFetcher do
# extract folder structure buildup
%w{/a /a/b /a/b/c} => %w{c},
%w{/a /a/b /a/b/c/d/e} => %w{e},
# ignore pax_global_header, which are commonly seen in github tars and are not
# ignored by all tar streaming tools, its not extracted by GNU tar since 1.14
%w{/pax_global_header /a/b} => %w{b},
}.each do |ins, outs|
describe 'empty profile' do
let(:in_files) { ins }

View file

@ -12,7 +12,7 @@ describe Fetchers::Tar do
_(reg['tar']).must_equal fetcher
end
describe 'applied to a zipped archive' do
describe 'applied to a tar archive' do
let(:target) { MockLoader.profile_tgz('complete-profile') }
let(:res) { fetcher.resolve(target) }