Class: TestQueue::Runner::RSpec
- Inherits:
-
TestQueue::Runner
- Object
- TestQueue::Runner
- TestQueue::Runner::RSpec
- Defined in:
- lib/test_queue/runner/rspec.rb
Constant Summary
Constants inherited from TestQueue::Runner
Instance Attribute Summary
Attributes inherited from TestQueue::Runner
#concurrency, #exit_when_done, #stats
Instance Method Summary collapse
-
#initialize ⇒ RSpec
constructor
A new instance of RSpec.
- #run_worker(iterator) ⇒ Object
- #start_master ⇒ Object
- #summarize_worker(worker) ⇒ Object
Methods inherited from TestQueue::Runner
#abort, #after_fork, #after_fork_internal, #around_filter, #awaiting_suites?, #cleanup_worker, #collect_worker_data, #connect_to_relay, #discover_suites, #distribute_queue, #enqueue_discovered_suite, #execute, #execute_internal, #kill_subprocesses, #kill_suite_discovery_process, #kill_workers, #prepare, #queue_status, #reap_suite_discovery_process, #reap_workers, #relay?, #relay_to_master, #spawn_workers, #start_relay, #stats_file, #stop_master, #summarize, #summarize_internal, #worker_completed
Constructor Details
#initialize ⇒ RSpec
Returns a new instance of RSpec.
13 14 15 16 17 |
# File 'lib/test_queue/runner/rspec.rb', line 13 def initialize super(TestFramework::RSpec.new) @rspec = ::RSpec::Core::QueueRunner.new end |
Instance Method Details
#run_worker(iterator) ⇒ Object
26 27 28 |
# File 'lib/test_queue/runner/rspec.rb', line 26 def run_worker(iterator) @rspec.run_each(iterator).to_i end |
#start_master ⇒ Object
19 20 21 22 23 24 |
# File 'lib/test_queue/runner/rspec.rb', line 19 def start_master seed_notification = ::RSpec::Core::Notifications::SeedNotification.new(@rspec.configuration.seed, seed_used?) puts "#{seed_notification.fully_formatted}\n" super end |
#summarize_worker(worker) ⇒ Object
30 31 32 33 |
# File 'lib/test_queue/runner/rspec.rb', line 30 def summarize_worker(worker) worker.summary = worker.lines.grep(/ examples?, /).first worker.failure_output = worker.output[/^Failures:\n\n(.*)\n^Finished/m, 1] end |