In Ruby, *
is used to represent the name of a file.
For example, /home/user/*.rb
will return all files ending with .rb
. I want to do something similar in Chef InSpec.
For example:
describe file ('home/user/*') do
it {should_not exist }
end
It should give me all the files inside /home/user
directory and check that no file exists inside this directory. In other words, I want to check if this directory is empty or not in Chef.
How can I do that?