summaryrefslogtreecommitdiff
path: root/spec/initializers/zz_metrics_spec.rb
blob: f41a807f1ebf53ec83377c872a9023bde18302fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

require 'spec_helper'

describe 'instrument_classes' do
  let(:config) { double(:config) }

  before do
    allow(config).to receive(:instrument_method)
    allow(config).to receive(:instrument_methods)
    allow(config).to receive(:instrument_instance_method)
    allow(config).to receive(:instrument_instance_methods)
    allow(Gitlab::Application).to receive(:configure)
  end

  it 'can autoload and instrument all files' do
    require_relative '../../config/initializers/zz_metrics'
    expect { instrument_classes(config) }.not_to raise_error
  end
end