Class: Inspec::RunnerMock
- Inherits:
-
Object
- Object
- Inspec::RunnerMock
- Defined in:
- lib/inspec/runner_mock.rb
Instance Attribute Summary collapse
-
#profiles ⇒ Object
readonly
Returns the value of attribute profiles.
-
#tests ⇒ Object
readonly
Returns the value of attribute tests.
Instance Method Summary collapse
- #add_profile(profile) ⇒ Object
- #add_test(example, _rule_id, _rule) ⇒ Object
- #example_group(*in_args, &in_block) ⇒ Object
-
#initialize ⇒ RunnerMock
constructor
A new instance of RunnerMock.
- #run(_with = nil) ⇒ Object
Constructor Details
#initialize ⇒ RunnerMock
Returns a new instance of RunnerMock.
8 9 10 11 |
# File 'lib/inspec/runner_mock.rb', line 8 def initialize @tests = [] @profiles = [] end |
Instance Attribute Details
#profiles ⇒ Object (readonly)
Returns the value of attribute profiles.
7 8 9 |
# File 'lib/inspec/runner_mock.rb', line 7 def profiles @profiles end |
#tests ⇒ Object (readonly)
Returns the value of attribute tests.
7 8 9 |
# File 'lib/inspec/runner_mock.rb', line 7 def tests @tests end |
Instance Method Details
#add_profile(profile) ⇒ Object
13 14 15 |
# File 'lib/inspec/runner_mock.rb', line 13 def add_profile(profile) @profiles.push(profile) end |
#add_test(example, _rule_id, _rule) ⇒ Object
17 18 19 |
# File 'lib/inspec/runner_mock.rb', line 17 def add_test(example, _rule_id, _rule) @tests.push(example) end |
#example_group(*in_args, &in_block) ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/inspec/runner_mock.rb', line 21 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 |
#run(_with = nil) ⇒ Object
32 33 34 |
# File 'lib/inspec/runner_mock.rb', line 32 def run(_with = nil) puts 'uhm.... nothing or something... dunno, ask your admin' end |