Class: ParallelSpecs::CLI
- Inherits:
-
Object
- Object
- ParallelSpecs::CLI
- Defined in:
- lib/parallel_specs/cli.rb,
lib/parallel_specs/cli/dashboard.rb
Defined Under Namespace
Classes: Dashboard
Constant Summary collapse
- DEFAULT_RERUN_COMMAND_SPEC_FILE_LIMIT =
25- DEFAULT_RERUN_COMMAND_CHAR_LIMIT =
2_000
Instance Method Summary collapse
-
#initialize ⇒ CLI
constructor
A new instance of CLI.
- #run(argv) ⇒ Object
Constructor Details
#initialize ⇒ CLI
Returns a new instance of CLI.
18 19 20 |
# File 'lib/parallel_specs/cli.rb', line 18 def initialize @runner = ParallelSpecs::RSpec::Runner end |
Instance Method Details
#run(argv) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/parallel_specs/cli.rb', line 22 def run(argv) Signal.trap("INT") { handle_interrupt } = (argv) ENV["DISABLE_SPRING"] ||= "1" num_processes = ParallelSpecs.determine_number_of_processes([:count]) abort "Process count must be greater than 0" unless num_processes.positive? run_tests_in_parallel(num_processes, ) rescue ParallelSpecs::ConfigurationError => e abort e. rescue ParallelSpecs::Test::Runner::MissingTestFileError => e abort e. end |