Class: RSpec::Core::QueueRunner
- Inherits:
-
CommandLine
- Object
- CommandLine
- RSpec::Core::QueueRunner
- Defined in:
- lib/test_queue/runner/rspec3.rb,
lib/test_queue/runner/rspec2.rb
Instance Method Summary collapse
- #example_groups ⇒ Object
-
#initialize ⇒ QueueRunner
constructor
A new instance of QueueRunner.
- #run_specs(iterator) ⇒ Object (also: #run_each)
Constructor Details
#initialize ⇒ QueueRunner
Returns a new instance of QueueRunner.
18 19 20 21 |
# File 'lib/test_queue/runner/rspec3.rb', line 18 def initialize = ConfigurationOptions.new(ARGV) super() end |
Instance Method Details
#example_groups ⇒ Object
23 24 25 26 |
# File 'lib/test_queue/runner/rspec3.rb', line 23 def example_groups setup($stderr, $stdout) @world.ordered_example_groups end |
#run_specs(iterator) ⇒ Object Also known as: run_each
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/test_queue/runner/rspec3.rb', line 28 def run_specs(iterator) @configuration.reporter.report(@world.ordered_example_groups.count) do |reporter| @configuration.with_suite_hooks do iterator.map { |g| start = Time.now if g.is_a? ::RSpec::Core::Example print " #{g.full_description}: " example = g g = example.example_group ::RSpec.world.filtered_examples.clear ::RSpec.world.filtered_examples[g] = [example] else print " #{g.description}: " end ret = g.run(reporter) diff = Time.now-start puts(" <%.3f>" % diff) ret }.all? ? 0 : @configuration.failure_exit_code end end end |