Class: RSpec::Core::QueueRunner
- Inherits:
-
Runner
- Object
- Runner
- RSpec::Core::QueueRunner
- Defined in:
- lib/test_queue/runner/rspec_ext.rb
Instance Method Summary collapse
-
#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.
24 25 26 27 |
# File 'lib/test_queue/runner/rspec_ext.rb', line 24 def initialize = ConfigurationOptions.new(ARGV) super() end |
Instance Method Details
#run_specs(iterator) ⇒ Object Also known as: run_each
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/test_queue/runner/rspec_ext.rb', line 29 def run_specs(iterator) @configuration.reporter.report(0) 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 |