Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cobertura_spec.rb « coverage « parsers « ci « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 65d85c7f1c0c52b753546f3c8ea1c06934b8ca92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Gitlab::Ci::Parsers::Coverage::Cobertura do
  let(:xml_data) { double }
  let(:coverage_report) { double }
  let(:project_path) { double }
  let(:paths) { double }

  subject(:parse_report) { described_class.new.parse!(xml_data, coverage_report, project_path: project_path, worktree_paths: paths) }

  before do
    allow_next_instance_of(Nokogiri::XML::SAX::Parser) do |document|
      allow(document).to receive(:parse)
    end
  end

  it 'uses Sax parser' do
    expect(Gitlab::Ci::Parsers::Coverage::SaxDocument).to receive(:new)

    parse_report
  end
end