Class: TestCase
- Inherits:
-
Object
- Object
- TestCase
- Defined in:
- lib/ui-auto-monkey/tuneup/test_runner/xunit_output.rb
Instance Attribute Summary collapse
-
#messages ⇒ Object
Returns the value of attribute messages.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #<<(message) ⇒ Object
- #fail! ⇒ Object
- #failed? ⇒ Boolean
-
#initialize(name) ⇒ TestCase
constructor
A new instance of TestCase.
- #pass! ⇒ Object
- #time ⇒ Object
Constructor Details
#initialize(name) ⇒ TestCase
Returns a new instance of TestCase.
26 27 28 29 30 31 32 |
# File 'lib/ui-auto-monkey/tuneup/test_runner/xunit_output.rb', line 26 def initialize(name) @name = name @messages = [] @failed = true @start = Time.now @finish = nil end |
Instance Attribute Details
#messages ⇒ Object
Returns the value of attribute messages.
24 25 26 |
# File 'lib/ui-auto-monkey/tuneup/test_runner/xunit_output.rb', line 24 def @messages end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
23 24 25 |
# File 'lib/ui-auto-monkey/tuneup/test_runner/xunit_output.rb', line 23 def name @name end |
Instance Method Details
#<<(message) ⇒ Object
34 35 36 |
# File 'lib/ui-auto-monkey/tuneup/test_runner/xunit_output.rb', line 34 def <<() @messages << end |
#fail! ⇒ Object
43 44 45 |
# File 'lib/ui-auto-monkey/tuneup/test_runner/xunit_output.rb', line 43 def fail! @finish = Time.now end |
#failed? ⇒ Boolean
47 48 49 |
# File 'lib/ui-auto-monkey/tuneup/test_runner/xunit_output.rb', line 47 def failed? @failed end |
#pass! ⇒ Object
38 39 40 41 |
# File 'lib/ui-auto-monkey/tuneup/test_runner/xunit_output.rb', line 38 def pass! @failed = false; @finish = Time.now end |
#time ⇒ Object
51 52 53 54 |
# File 'lib/ui-auto-monkey/tuneup/test_runner/xunit_output.rb', line 51 def time return 0 if @finish.nil? @finish - @start end |