Class: RSpec::Core::QueueRunner
- Inherits:
-
CommandLine
- Object
- CommandLine
- RSpec::Core::QueueRunner
- Defined in:
- lib/test_queue/runner/rspec.rb
Instance Method Summary collapse
- #example_groups ⇒ Object
-
#initialize ⇒ QueueRunner
constructor
A new instance of QueueRunner.
- #run_each(iterator) ⇒ Object
Constructor Details
#initialize ⇒ QueueRunner
Returns a new instance of QueueRunner.
6 7 8 |
# File 'lib/test_queue/runner/rspec.rb', line 6 def initialize super(ARGV) end |
Instance Method Details
#example_groups ⇒ Object
10 11 12 13 14 15 |
# File 'lib/test_queue/runner/rspec.rb', line 10 def example_groups @options.configure(@configuration) @configuration.load_spec_files @world.announce_filters @world.example_groups end |
#run_each(iterator) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/test_queue/runner/rspec.rb', line 17 def run_each(iterator) @configuration.error_stream = $stderr @configuration.output_stream = $stdout @configuration.reporter.report(0, @configuration.randomize? ? @configuration.seed : nil) do |reporter| begin @configuration.run_hook(:before, :suite) iterator.map {|g| print " #{g.description}: " 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 |