You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: report_spec.rb
    path of file: ./repos/puppet/spec/integration/transaction
    
    the code of the file until where you have to start completion: require 'spec_helper'
require 'puppet_spec/files'

describe Puppet::Transaction::Report do
  before :each do
    # Enable persistence during tests
    allow_any_instance_of(Puppet::Transaction::Persistence).to receive(:enabled?).and_return(true)
  end

  describe "when using the indirector" do
    it "should be able to delegate to the :processor terminus" do
      allow(Puppet::Transaction::Report.indirection).to receive(:terminus_class).and_return(:processor)

      terminus = Puppet::Transaction::Report.indirection.terminus(:processor)

      allow(Facter).to receive(:value).and_return("host.domain.com")

      report = Puppet::Transaction::Report.new

      expect(terminus).to receive(:pr
    
    def run_catalogs(resources1, resources2, noop1 = false, noop2 = false, &block)
      last_run_report = nil
      expect(Puppet::Transaction::Report.indirection).to receive(:save) do |report, x|
        last_run_report = report
        true
      end.exactly(4)

      Puppet[:report] = true
      Puppet[:noop] = noop1

      configurer = Puppet::Configurer.new
      configurer.run :catalog => new_catalog(resources1)

      yield block if block
      last_report = last_run_report

      Puppet[:noop] = noop2

      configurer = Puppet::Configurer.new
      configurer.run :catalog => new_catalog(resources2)

      expect(last_report).not_to eq(last_run_report)

      return last_run_report
    end

    def new_blank_catalog
      Puppet::Resource::Catalog.new("testing", Puppet.lookup(:environments).get(Puppet[:environment]))
    end

    def new_catalog(resources = [])
      new_cat = new_blank_catalog
      [resources].flatten.each do |resource|
        new_cat.add_resource(resource)
      end
      new_cat
    end

    def get_cc_count(report)
      report.metrics["resources"].values.each do |v|
        if v[0] == "corrective_change"
          return v[2]
        end
      end
      return nil
    end