inspec/test/unit/fetchers/mock_test.rb
Miah Johnson 659b4b373a Remove # encoding: utf8 magic comments
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-07 16:06:23 -07:00

27 lines
545 B
Ruby

# author: Dominik Richter
# author: Christoph Hartmann
require 'helper'
describe Fetchers::Mock do
let(:fetcher) { Fetchers::Mock }
it 'registers with the fetchers registry' do
reg = Inspec::Fetcher.registry
_(reg['mock']).must_equal fetcher
end
it 'wont load nil' do
fetcher.resolve(nil).must_be :nil?
end
it 'wont load a string' do
fetcher.resolve(rand.to_s).must_be :nil?
end
describe 'applied to a map' do
it 'must be resolved' do
fetcher.resolve({}).must_be_kind_of fetcher
end
end
end