Class: Smartest::TestRegistry
- Inherits:
-
Object
- Object
- Smartest::TestRegistry
- Includes:
- Enumerable
- Defined in:
- lib/smartest/test_registry.rb
Instance Method Summary collapse
- #add(test_case) ⇒ Object
- #count ⇒ Object (also: #size)
- #each(&block) ⇒ Object
-
#initialize ⇒ TestRegistry
constructor
A new instance of TestRegistry.
Constructor Details
#initialize ⇒ TestRegistry
Returns a new instance of TestRegistry.
7 8 9 |
# File 'lib/smartest/test_registry.rb', line 7 def initialize @tests = [] end |
Instance Method Details
#add(test_case) ⇒ Object
11 12 13 |
# File 'lib/smartest/test_registry.rb', line 11 def add(test_case) @tests << test_case end |
#count ⇒ Object Also known as: size
19 20 21 |
# File 'lib/smartest/test_registry.rb', line 19 def count @tests.count end |
#each(&block) ⇒ Object
15 16 17 |
# File 'lib/smartest/test_registry.rb', line 15 def each(&block) @tests.each(&block) end |