Class: TestJavalosRunner
- Inherits:
-
Object
- Object
- TestJavalosRunner
- Defined in:
- lib/test_javalos_runner.rb
Instance Attribute Summary collapse
-
#exceptions ⇒ Object
readonly
Returns the value of attribute exceptions.
-
#failures ⇒ Object
readonly
Returns the value of attribute failures.
-
#total_passes ⇒ Object
readonly
Returns the value of attribute total_passes.
Instance Method Summary collapse
- #assert_equals_fails(object_1, object_2) ⇒ Object
- #assert_not_null_fails ⇒ Object
-
#initialize ⇒ TestJavalosRunner
constructor
A new instance of TestJavalosRunner.
- #start ⇒ Object
- #test_error_by(exception) ⇒ Object
- #test_passes ⇒ Object
Constructor Details
#initialize ⇒ TestJavalosRunner
Returns a new instance of TestJavalosRunner.
7 8 9 10 11 |
# File 'lib/test_javalos_runner.rb', line 7 def initialize @exceptions = Array.new @failures = Array.new @total_passes = 0 end |
Instance Attribute Details
#exceptions ⇒ Object (readonly)
Returns the value of attribute exceptions.
5 6 7 |
# File 'lib/test_javalos_runner.rb', line 5 def exceptions @exceptions end |
#failures ⇒ Object (readonly)
Returns the value of attribute failures.
5 6 7 |
# File 'lib/test_javalos_runner.rb', line 5 def failures @failures end |
#total_passes ⇒ Object (readonly)
Returns the value of attribute total_passes.
5 6 7 |
# File 'lib/test_javalos_runner.rb', line 5 def total_passes @total_passes end |
Instance Method Details
#assert_equals_fails(object_1, object_2) ⇒ Object
23 24 25 26 |
# File 'lib/test_javalos_runner.rb', line 23 def assert_equals_fails object_1, object_2 Printer.test_fails failures << Failure.assert_equals(object_1, object_2) end |
#assert_not_null_fails ⇒ Object
28 29 30 31 |
# File 'lib/test_javalos_runner.rb', line 28 def assert_not_null_fails Printer.test_fails failures << Failure.assert_not_null end |
#start ⇒ Object
13 14 15 16 |
# File 'lib/test_javalos_runner.rb', line 13 def start run_tests print_results end |
#test_error_by(exception) ⇒ Object
33 34 35 36 |
# File 'lib/test_javalos_runner.rb', line 33 def test_error_by exception Printer.test_error exceptions << exception end |
#test_passes ⇒ Object
18 19 20 21 |
# File 'lib/test_javalos_runner.rb', line 18 def test_passes Printer.test_passes @total_passes = total_passes + 1 end |