File: multi_formatter_spec.rb

package info (click to toggle)
ruby-simplecov 0.22.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,500 kB
  • sloc: ruby: 5,550; makefile: 10
file content (22 lines) | stat: -rw-r--r-- 601 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

require "helper"

require "simplecov/formatter/multi_formatter"

describe SimpleCov::Formatter::MultiFormatter do
  describe ".[]" do
    # Regression test for https://github.com/simplecov-ruby/simplecov/issues/428
    it "constructs a formatter with multiple children" do
      # Silence deprecation warnings.
      allow(described_class).to receive(:warn)

      children = [
        SimpleCov::Formatter::SimpleFormatter,
        SimpleCov::Formatter::SimpleFormatter
      ]

      expect(described_class[*children].new.formatters).to eq(children)
    end
  end
end