Class: Test::Unit::Success

Inherits:
Object
  • Object
show all
Includes:
XMLReportable
Defined in:
lib/test-unit-ext/xml-report.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from XMLReportable

#to_xml

Constructor Details

#initialize(test, elapsed_time) ⇒ Success

Returns a new instance of Success.



76
77
78
79
# File 'lib/test-unit-ext/xml-report.rb', line 76

def initialize(test, elapsed_time)
  @test = test
  @elapsed_time = elapsed_time
end

Instance Attribute Details

#elapsed_timeObject (readonly)

Returns the value of attribute elapsed_time.



75
76
77
# File 'lib/test-unit-ext/xml-report.rb', line 75

def elapsed_time
  @elapsed_time
end

#testObject (readonly)

Returns the value of attribute test.



75
76
77
# File 'lib/test-unit-ext/xml-report.rb', line 75

def test
  @test
end

Instance Method Details

#locationObject



85
86
87
# File 'lib/test-unit-ext/xml-report.rb', line 85

def location
  []
end

#messageObject



81
82
83
# File 'lib/test-unit-ext/xml-report.rb', line 81

def message
  nil
end

#status_nameObject



98
99
100
# File 'lib/test-unit-ext/xml-report.rb', line 98

def status_name
  "success"
end

#test_case_nameObject



93
94
95
96
# File 'lib/test-unit-ext/xml-report.rb', line 93

def test_case_name
  /\((.*)\)\z/ =~ test_name
  $1
end

#test_nameObject



89
90
91
# File 'lib/test-unit-ext/xml-report.rb', line 89

def test_name
  @test.name
end