inspec/test/unit/utils/find_files_test.rb

24 lines
458 B
Ruby
Raw Normal View History

# 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
2015-12-04 13:27:32 +00:00
files = findfiles.find_files('/no/such/mock', type: 'file', depth: 1)
files.must_equal([])
end
end
end