Module: CiLogger::Rspec::ExampleGroupMethods

Defined in:
lib/ci_logger/rspec/example_group_methods.rb

Instance Method Summary collapse

Instance Method Details

#passed?Boolean

Returns:

  • (Boolean)


5
6
7
8
9
10
11
12
13
# File 'lib/ci_logger/rspec/example_group_methods.rb', line 5

def passed?
  return false if RSpec.current_example.exception
  return true unless defined?(::RSpec::Expectations::FailureAggregator)

  failure_notifier = ::RSpec::Support.failure_notifier
  return true unless failure_notifier.is_a?(::RSpec::Expectations::FailureAggregator)

  failure_notifier.failures.empty? && failure_notifier.other_errors.empty?
end