mirror of
https://github.com/inspec/inspec
synced 2024-12-22 02:53:13 +00:00
24 lines
458 B
Ruby
24 lines
458 B
Ruby
|
# Custom resource for Utils::FindFIles
|
||
|
class TestFindFiles < Inspec.resource(1)
|
||
|
name 'test_find_files'
|
||
|
|
||
|
desc "
|
||
|
Resource used for testing the funcitonality of Utils::FindFiles
|
||
|
"
|
||
|
|
||
|
example "
|
||
|
describe test_find_files('/some/filepath') do
|
||
|
its('results') { should include 'somefile.conf' }
|
||
|
end
|
||
|
"
|
||
|
|
||
|
require 'utils/find_files'
|
||
|
include FindFiles
|
||
|
|
||
|
attr_reader :results
|
||
|
|
||
|
def initialize(path)
|
||
|
@results = find_files(path)
|
||
|
end
|
||
|
end
|