Class: TinyTest::SuiteResult
- Inherits:
-
Object
- Object
- TinyTest::SuiteResult
- Defined in:
- lib/tinytest.rb
Constant Summary collapse
- SUCCESS_CHAR =
'.'
Instance Attribute Summary collapse
-
#benchmark ⇒ Object
readonly
Returns the value of attribute benchmark.
-
#char ⇒ Object
readonly
Returns the value of attribute char.
-
#report ⇒ Object
readonly
Returns the value of attribute report.
-
#suite ⇒ Object
readonly
Returns the value of attribute suite.
Instance Method Summary collapse
-
#initialize(suite, benchmark, report = nil) ⇒ SuiteResult
constructor
If report was ommited, it means it’s succeeded result.
- #inspect ⇒ Object
-
#success? ⇒ Boolean
Self is succeeded result or not.
Constructor Details
#initialize(suite, benchmark, report = nil) ⇒ SuiteResult
If report was ommited, it means it’s succeeded result.
287 288 289 290 291 292 293 |
# File 'lib/tinytest.rb', line 287 def initialize(suite, benchmark, report = nil) @suite = suite @benchmark = benchmark @report = report @char = @report ? @report[0, 1] : SUCCESS_CHAR @success_p = !@report end |
Instance Attribute Details
#benchmark ⇒ Object (readonly)
Returns the value of attribute benchmark.
296 297 298 |
# File 'lib/tinytest.rb', line 296 def benchmark @benchmark end |
#char ⇒ Object (readonly)
Returns the value of attribute char.
298 299 300 |
# File 'lib/tinytest.rb', line 298 def char @char end |
#report ⇒ Object (readonly)
Returns the value of attribute report.
297 298 299 |
# File 'lib/tinytest.rb', line 297 def report @report end |
#suite ⇒ Object (readonly)
Returns the value of attribute suite.
295 296 297 |
# File 'lib/tinytest.rb', line 295 def suite @suite end |
Instance Method Details
#inspect ⇒ Object
300 301 302 |
# File 'lib/tinytest.rb', line 300 def inspect super.split(/\s+/).first << "[#{char}]>" end |
#success? ⇒ Boolean
Self is succeeded result or not.
305 306 307 |
# File 'lib/tinytest.rb', line 305 def success? @success_p end |