inspec/test/unit/mock/profiles/old-examples/custom-resource/libraries/batsignal.rb
Miah Johnson d48bb56087 Every other example has the value set to 1, so I changed this for consistency.
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-10-16 10:15:49 -07:00

20 lines
343 B
Ruby

class Batsignal < Inspec.resource(1)
name 'batsignal'
example "
describe batsignal do
its('number_of_sightings)') { should eq '1' }
end
"
def number_of_sightings
local_command_call
end
private
def local_command_call
# call out to a core resource
inspec.command('echo 1').stdout.to_i
end
end