Class: Chef::Audit::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/chef/audit/runner.rb

Instance Method Summary collapse

Constructor Details

#initialize(run_context) ⇒ Runner

Returns a new instance of Runner.



26
27
28
# File 'lib/chef/audit/runner.rb', line 26

def initialize(run_context)
  @run_context = run_context
end

Instance Method Details

#failed?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/chef/audit/runner.rb', line 36

def failed?
  RSpec.world.reporter.failed_examples.size > 0
end

#num_failedObject



40
41
42
# File 'lib/chef/audit/runner.rb', line 40

def num_failed
  RSpec.world.reporter.failed_examples.size
end

#num_totalObject



44
45
46
# File 'lib/chef/audit/runner.rb', line 44

def num_total
  RSpec.world.reporter.examples.size
end

#runObject



30
31
32
33
34
# File 'lib/chef/audit/runner.rb', line 30

def run
  setup
  register_control_groups
  do_run
end