Class: PriorityTest::Core::TestResultCollector

Inherits:
Object
  • Object
show all
Defined in:
lib/priority_test/core/test_result_collector.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(all_tests) ⇒ TestResultCollector

Returns a new instance of TestResultCollector.



6
7
8
# File 'lib/priority_test/core/test_result_collector.rb', line 6

def initialize(all_tests)
  @all_tests = all_tests
end

Instance Attribute Details

#all_testsObject (readonly)

Returns the value of attribute all_tests.



4
5
6
# File 'lib/priority_test/core/test_result_collector.rb', line 4

def all_tests
  @all_tests
end

Instance Method Details

#add_result(test_result_hash) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/priority_test/core/test_result_collector.rb', line 10

def add_result(test_result_hash)
  identifier = test_result_hash[:identifier]
  return unless identifier

  @all_tests.get_test(identifier) || @all_tests.add_test(test_params(test_result_hash))
  @all_tests.add_test_result(identifier, test_result_params(test_result_hash))
end

#finishObject



18
19
20
# File 'lib/priority_test/core/test_result_collector.rb', line 18

def finish
  # nothing
end