mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +00:00
Mock missing_file
in NGINX resource tests
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
This commit is contained in:
parent
62cfcf0ebe
commit
3b8da7957d
2 changed files with 2 additions and 1 deletions
|
@ -198,6 +198,7 @@ class MockLoader
|
|||
'/fakepath/fakefile' => emptyfile.call,
|
||||
'C:/fakepath/fakefile' => emptyfile.call,
|
||||
'/etc/cron.d/crondotd' => mockfile.call('crondotd'),
|
||||
'/missing_file' => emptyfile.call,
|
||||
}
|
||||
|
||||
# create all mock commands
|
||||
|
|
|
@ -13,7 +13,7 @@ describe 'Inspec::Resources::NginxConf' do
|
|||
let(:nginx_conf) { MockLoader.new(:ubuntu1404).load_resource('nginx_conf') }
|
||||
|
||||
it 'doesnt fail with a missing file' do
|
||||
nginx_conf = MockLoader.new(:ubuntu1404).load_resource('nginx_conf', '/....missing_file')
|
||||
nginx_conf = MockLoader.new(:ubuntu1404).load_resource('nginx_conf', '/missing_file')
|
||||
_(nginx_conf.params).must_equal({})
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue