Class: Smartest::TestRegistry

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/smartest/test_registry.rb

Instance Method Summary collapse

Constructor Details

#initializeTestRegistry

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

#countObject 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