mirror of
https://github.com/inspec/inspec
synced 2024-11-23 21:23:29 +00:00
24 lines
455 B
Ruby
24 lines
455 B
Ruby
|
# encoding: utf-8
|
||
|
# author: Stephan Renatus
|
||
|
|
||
|
require 'helper'
|
||
|
|
||
|
describe FindFiles do
|
||
|
let (:findfiles) do
|
||
|
class FindFilesTest
|
||
|
include FindFiles
|
||
|
def inspec
|
||
|
Inspec::Backend.create(backend: :mock)
|
||
|
end
|
||
|
end
|
||
|
FindFilesTest.new
|
||
|
end
|
||
|
|
||
|
describe '#find_files' do
|
||
|
it 'returns an array (of findings)' do
|
||
|
files = findfiles.find_files('/no/such/mock', type: 'f', depth: 1)
|
||
|
files.must_equal([])
|
||
|
end
|
||
|
end
|
||
|
end
|