inspec/test/unit/mock/profiles/old-examples/custom-resource/libraries/batsignal.rb
devoptimist 2d49f39adc moved example tests into their own sub dir, and reused examples_path variable
Signed-off-by: devoptimist <sbrown@chef.io>
2019-03-18 15:15:32 +00:00

20 lines
343 B
Ruby

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