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.



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

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.



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

def elapsed_time
  @elapsed_time
end

#testObject (readonly)

Returns the value of attribute test.



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

def test
  @test
end

Instance Method Details

#locationObject



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

def location
  []
end

#messageObject



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

def message
  nil
end

#status_nameObject



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

def status_name
  "success"
end

#test_case_nameObject



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

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

#test_nameObject



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

def test_name
  @test.name
end