Module: Polyrun::RSpec::ShardedFormatterCompat
- Defined in:
- lib/polyrun/rspec/sharded_formatter_compat.rb
Overview
Formatter tweaks for progress bars (e.g. Fuubar) under POLYRUN_SHARD_* workers.
Class Method Summary collapse
- .install!(rspec_config: fetch_rspec_configuration!) ) ⇒ Object
- .noop_fuubar_seed! ⇒ Object
- .sharded_worker? ⇒ Boolean
Class Method Details
.install!(rspec_config: fetch_rspec_configuration!) ) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/polyrun/rspec/sharded_formatter_compat.rb', line 7 def install!(rspec_config: fetch_rspec_configuration!) return unless sharded_worker? rspec_config.silence_filter_announcements = true if defined?(Fuubar) end |
.noop_fuubar_seed! ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/polyrun/rspec/sharded_formatter_compat.rb', line 18 def return unless defined?(Fuubar) Fuubar.class_eval do def seed(_notification) end end end |
.sharded_worker? ⇒ Boolean
14 15 16 |
# File 'lib/polyrun/rspec/sharded_formatter_compat.rb', line 14 def sharded_worker? !ENV["POLYRUN_SHARD_TOTAL"].to_s.strip.empty? end |