Class: Guard::Unity::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/guard/unity/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Parser

Returns a new instance of Parser.



9
10
11
12
# File 'lib/guard/unity/parser.rb', line 9

def initialize(options={})
  @options  = options
  @doc      = nil
end

Instance Attribute Details

#docObject

Returns the value of attribute doc.



7
8
9
# File 'lib/guard/unity/parser.rb', line 7

def doc
  @doc
end

#optionsObject

Returns the value of attribute options.



7
8
9
# File 'lib/guard/unity/parser.rb', line 7

def options
  @options
end

Instance Method Details

#parseObject



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/guard/unity/parser.rb', line 14

def parse()
  {
      tests:          _get('total'),
      failures:       _get('failures'),
      errors:         _get('errors'),
      ignored:        _get('ignored'),
      not_run:        _get('not-run'),
      inconclusive:   _get('inconclusive'),
      invalid:        _get('invalid'),
      skipped:        _get('skipped'),
      test_cases:     _testCases
  }
end