Module: ParallelSplitTest
- Defined in:
- lib/parallel_split_test/runner.rb,
lib/parallel_split_test.rb,
lib/parallel_split_test/version.rb,
lib/parallel_split_test/command_line.rb,
lib/parallel_split_test/output_recorder.rb
Overview
a cleaned up version of the RSpec runner, e.g. no drb support
Defined Under Namespace
Classes: CommandLine, OutputRecorder, Runner
Constant Summary collapse
- VERSION =
'0.10.0'
Class Attribute Summary collapse
-
.example_counter ⇒ Object
Returns the value of attribute example_counter.
-
.process_number ⇒ Object
Returns the value of attribute process_number.
-
.processes ⇒ Object
Returns the value of attribute processes.
Class Method Summary collapse
Class Attribute Details
.example_counter ⇒ Object
Returns the value of attribute example_counter.
5 6 7 |
# File 'lib/parallel_split_test.rb', line 5 def example_counter @example_counter end |
.process_number ⇒ Object
Returns the value of attribute process_number.
5 6 7 |
# File 'lib/parallel_split_test.rb', line 5 def process_number @process_number end |
.processes ⇒ Object
Returns the value of attribute processes.
5 6 7 |
# File 'lib/parallel_split_test.rb', line 5 def processes @processes end |
Class Method Details
.best_number_of_processes ⇒ Object
16 17 18 |
# File 'lib/parallel_split_test.rb', line 16 def best_number_of_processes Integer(ENV['PARALLEL_SPLIT_TEST_PROCESSES'] || Parallel.processor_count) end |
.choose_number_of_processes ⇒ Object
12 13 14 |
# File 'lib/parallel_split_test.rb', line 12 def choose_number_of_processes self.processes = best_number_of_processes end |
.run_example? ⇒ Boolean
7 8 9 10 |
# File 'lib/parallel_split_test.rb', line 7 def run_example? self.example_counter += 1 (example_counter - 1) % processes == process_number end |