Class: DTR::TestReport
- Inherits:
-
Object
- Object
- DTR::TestReport
- Defined in:
- lib/dtr/base.rb
Instance Attribute Summary collapse
-
#assertions ⇒ Object
readonly
Returns the value of attribute assertions.
-
#client_name ⇒ Object
readonly
Returns the value of attribute client_name.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#exit_code ⇒ Object
readonly
Returns the value of attribute exit_code.
-
#failures ⇒ Object
readonly
Returns the value of attribute failures.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
-
#test ⇒ Object
readonly
Returns the value of attribute test.
-
#tests ⇒ Object
readonly
Returns the value of attribute tests.
Instance Method Summary collapse
- #==(another) ⇒ Object
- #error? ⇒ Boolean
- #failed? ⇒ Boolean
-
#initialize(test, execution_result, tests, assertions, failures, errors) ⇒ TestReport
constructor
A new instance of TestReport.
- #succeeded? ⇒ Boolean
- #successes ⇒ Object
Constructor Details
#initialize(test, execution_result, tests, assertions, failures, errors) ⇒ TestReport
Returns a new instance of TestReport.
249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/dtr/base.rb', line 249 def initialize(test, execution_result, tests, assertions, failures, errors) @test = test @client_name = execution_result[:client_name] @stdout = execution_result[:stdout] @stderr = execution_result[:stderr] @exit_code = execution_result[:exit_code] @tests = tests @assertions = assertions @failures = failures @errors = errors end |
Instance Attribute Details
#assertions ⇒ Object (readonly)
Returns the value of attribute assertions.
248 249 250 |
# File 'lib/dtr/base.rb', line 248 def assertions @assertions end |
#client_name ⇒ Object (readonly)
Returns the value of attribute client_name.
248 249 250 |
# File 'lib/dtr/base.rb', line 248 def client_name @client_name end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
248 249 250 |
# File 'lib/dtr/base.rb', line 248 def errors @errors end |
#exit_code ⇒ Object (readonly)
Returns the value of attribute exit_code.
248 249 250 |
# File 'lib/dtr/base.rb', line 248 def exit_code @exit_code end |
#failures ⇒ Object (readonly)
Returns the value of attribute failures.
248 249 250 |
# File 'lib/dtr/base.rb', line 248 def failures @failures end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
248 249 250 |
# File 'lib/dtr/base.rb', line 248 def stderr @stderr end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
248 249 250 |
# File 'lib/dtr/base.rb', line 248 def stdout @stdout end |
#test ⇒ Object (readonly)
Returns the value of attribute test.
248 249 250 |
# File 'lib/dtr/base.rb', line 248 def test @test end |
#tests ⇒ Object (readonly)
Returns the value of attribute tests.
248 249 250 |
# File 'lib/dtr/base.rb', line 248 def tests @tests end |
Instance Method Details
#==(another) ⇒ Object
273 274 275 |
# File 'lib/dtr/base.rb', line 273 def ==(another) test == another.test end |
#error? ⇒ Boolean
269 270 271 |
# File 'lib/dtr/base.rb', line 269 def error? @errors > 0 end |
#failed? ⇒ Boolean
265 266 267 |
# File 'lib/dtr/base.rb', line 265 def failed? @failures > 0 end |
#succeeded? ⇒ Boolean
261 262 263 |
# File 'lib/dtr/base.rb', line 261 def succeeded? @failures == 0 && @errors == 0 end |
#successes ⇒ Object
277 278 279 |
# File 'lib/dtr/base.rb', line 277 def successes tests - failures - errors end |