Class: CI::Reporter::TestUtils::Accessor::Testcase

Inherits:
Struct
  • Object
show all
Defined in:
lib/ci/reporter/test_utils/accessor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#xmlObject

Returns the value of attribute xml

Returns:

  • (Object)

    the current value of xml



19
20
21
# File 'lib/ci/reporter/test_utils/accessor.rb', line 19

def xml
  @xml
end

Instance Method Details

#errorsObject



28
29
30
# File 'lib/ci/reporter/test_utils/accessor.rb', line 28

def errors
  xml.elements.to_a("error").map {|e| Error.new(e) }
end

#failuresObject



24
25
26
# File 'lib/ci/reporter/test_utils/accessor.rb', line 24

def failures
  xml.elements.to_a('failure').map {|f| Failure.new(f) }
end

#nameObject



20
21
22
# File 'lib/ci/reporter/test_utils/accessor.rb', line 20

def name
  xml.attributes['name']
end

#skipped?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/ci/reporter/test_utils/accessor.rb', line 32

def skipped?
  xml.elements.to_a("skipped").count == 1
end