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


28
29
30
# File 'lib/chef/audit/runner.rb', line 28

def initialize(run_context)
  @run_context = run_context
end

Instance Method Details

#exclusion_patternObject


50
51
52
# File 'lib/chef/audit/runner.rb', line 50

def exclusion_pattern
  Regexp.new(".+[\\\/]lib[\\\/]chef[\\\/]")
end

#failed?Boolean


38
39
40
# File 'lib/chef/audit/runner.rb', line 38

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

#num_failedObject


42
43
44
# File 'lib/chef/audit/runner.rb', line 42

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

#num_totalObject


46
47
48
# File 'lib/chef/audit/runner.rb', line 46

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

#runObject


32
33
34
35
36
# File 'lib/chef/audit/runner.rb', line 32

def run
  setup
  register_control_groups
  do_run
end