File: group_failure_formatter.rb

package info (click to toggle)
ruby-rspec-rails 8.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,804 kB
  • sloc: ruby: 10,881; sh: 198; makefile: 6
file content (23 lines) | stat: -rw-r--r-- 432 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module RSpec::Rails::TestSupport
  class FailureReporter
    def initialize
      @exceptions = []
    end
    attr_reader :exceptions

    def example_failed(example)
      @exceptions << example.exception
    end

    def method_missing(name, *_args, &_block)
    end
  end

  def failure_reporter
    @failure_reporter ||= FailureReporter.new
  end
end

RSpec.configure do |config|
  config.include RSpec::Rails::TestSupport
end