Module: RSpec::Distrib::Leader::RSpecHelper
- Defined in:
- lib/rspec/distrib/leader/rspec_helper.rb
Overview
Helper that handles some cases with RSpec.
Class Method Summary collapse
-
.failures_of(example_groups) ⇒ Object
Goes through all example_group tree and returns all failures as array.
-
.unpack_causes(exceptions) ⇒ Object
Extract all causes for exceptions to a list.
Class Method Details
.failures_of(example_groups) ⇒ Object
Goes through all example_group tree and returns all failures as array.
8 9 10 |
# File 'lib/rspec/distrib/leader/rspec_helper.rb', line 8 def failures_of(example_groups) fetch_all_failures_recursively(example_groups).flatten.compact.uniq end |
.unpack_causes(exceptions) ⇒ Object
Extract all causes for exceptions to a list.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rspec/distrib/leader/rspec_helper.rb', line 13 def unpack_causes(exceptions) exceptions.map do |exception| causes = [] while exception causes << exception exception = exception.cause end causes end end |