mirror of
https://github.com/inspec/inspec
synced 2024-12-18 00:53:22 +00:00
a5309ea392
Signed-off-by: Ryan Davis <zenspider@chef.io>
37 lines
646 B
Ruby
37 lines
646 B
Ruby
module Inspec
|
|
class RunnerMock
|
|
attr_reader :tests, :profiles
|
|
attr_writer :backend
|
|
def initialize
|
|
reset
|
|
end
|
|
|
|
def reset
|
|
@tests = []
|
|
@profiles = []
|
|
end
|
|
|
|
def add_profile(profile)
|
|
@profiles.push(profile)
|
|
end
|
|
|
|
def add_test(example, _rule)
|
|
@tests.push(example)
|
|
end
|
|
|
|
def example_group(*in_args, &in_block)
|
|
Class.new do
|
|
define_method :args do
|
|
in_args
|
|
end
|
|
define_method :block do
|
|
in_block
|
|
end
|
|
end
|
|
end
|
|
|
|
def run(_with = nil)
|
|
puts "uhm.... nothing or something... dunno, ask your admin"
|
|
end
|
|
end
|
|
end
|