Class: MiniAssert::TestSuite
- Inherits:
-
Object
- Object
- MiniAssert::TestSuite
- Defined in:
- lib/mini_assert/test_suite.rb
Overview
Test executable object
Instance Method Summary collapse
-
#initialize(test_classes) ⇒ TestSuite
constructor
A new instance of TestSuite.
- #run! ⇒ Object
Constructor Details
#initialize(test_classes) ⇒ TestSuite
Returns a new instance of TestSuite.
6 7 8 9 |
# File 'lib/mini_assert/test_suite.rb', line 6 def initialize(test_classes) @test_classes = test_classes @results = { total_tests: 0, passed_tests: 0 } end |
Instance Method Details
#run! ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/mini_assert/test_suite.rb', line 11 def run! @test_classes.each do |test_class| test_obj = test_class.new test_obj.each_test! { || show_failure } @results[:total_tests] += test_obj.total_tests @results[:passed_tests] += test_obj.passed_tests end show_results end |