Class: JunitModel::TestGroup

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/junit_model/models.rb

Overview

A TestGroup is the top level object in a Junit tree.

Instance Method Summary collapse

Instance Method Details

#failures_countObject Also known as: failure_count



10
11
12
# File 'lib/junit_model/models.rb', line 10

def failures_count
  failures.to_i
end

#passed?Boolean Also known as: passed

Returns:

  • (Boolean)


14
15
16
# File 'lib/junit_model/models.rb', line 14

def passed?
  failures_count == 0
end

#test_countObject



6
7
8
# File 'lib/junit_model/models.rb', line 6

def test_count
  tests.to_i
end

#to_xmlObject



18
19
20
# File 'lib/junit_model/models.rb', line 18

def to_xml
  XMLBuilder.xml_for_result(self)
end