Sha256: f9e37f94561cf5c8e4cb50f83c7799d1b8b5286042b4c81654e8bd282c11a6ce
Contents?: true
Size: 1.19 KB
Versions: 4
Compression:
Stored size: 1.19 KB
Contents
# frozen_string_literal: true module RSpecTracer module RSpecRunner # rubocop:disable Metrics/AbcSize def run_specs(example_groups) actual_count = RSpec.world.example_count RSpecTracer.no_examples = actual_count.zero? if RSpecTracer.no_examples RSpecTracer.running = true super(example_groups) return end starting = Process.clock_gettime(Process::CLOCK_MONOTONIC) filtered_examples, filtered_example_groups = RSpecTracer.filter_examples RSpec.world.instance_variable_set(:@filtered_examples, filtered_examples) RSpec.world.instance_variable_set(:@example_groups, filtered_example_groups) current_count = RSpec.world.example_count ending = Process.clock_gettime(Process::CLOCK_MONOTONIC) elpased = RSpecTracer::TimeFormatter.format_time(ending - starting) puts puts <<-EXAMPLES.strip.gsub(/\s+/, ' ') RSpec tracer is running #{current_count} examples (actual: #{actual_count}, skipped: #{actual_count - current_count}) (took #{elpased}) EXAMPLES RSpecTracer.running = true super(filtered_example_groups) end # rubocop:enable Metrics/AbcSize end end
Version data entries
4 entries across 4 versions & 1 rubygems