class RSpec::Core::QueueRunner
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/test_queue/runner/rspec2.rb, line 9 def initialize super(ARGV) @configuration.output_stream = $stdout @configuration.error_stream = $stderr end
Public Instance Methods
run_each(iterator)
click to toggle source
# File lib/test_queue/runner/rspec2.rb, line 15 def run_each(iterator) @configuration.reporter.report(0, @configuration.randomize? ? @configuration.seed : nil) do |reporter| begin @configuration.run_hook(:before, :suite) iterator.map {|g| if g.is_a? ::RSpec::Core::Example print " #{g.full_description}: " example = g g = example.example_group ::RSpec.world.filtered_examples.clear examples = [example] examples.extend(::RSpec::Core::Extensions::Ordered::Examples) ::RSpec.world.filtered_examples[g] = examples else print " #{g.description}: " end start = Time.now ret = g.run(reporter) diff = Time.now-start puts(" <%.3f>" % diff) ret }.all? ? 0 : @configuration.failure_exit_code ensure @configuration.run_hook(:after, :suite) end end end
run_specs(iterator)
click to toggle source
# File lib/test_queue/runner/rspec3.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
Also aliased as: run_each