debian-mirror-gitlab/spec/initializers/zz_metrics_spec.rb

21 lines
591 B
Ruby
Raw Normal View History

2019-12-26 22:10:19 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
require 'spec_helper'
2017-09-10 17:25:29 +05:30
describe 'instrument_classes' do
2017-08-17 22:00:37 +05:30
let(:config) { double(:config) }
before do
allow(config).to receive(:instrument_method)
allow(config).to receive(:instrument_methods)
2017-09-10 17:25:29 +05:30
allow(config).to receive(:instrument_instance_method)
2017-08-17 22:00:37 +05:30
allow(config).to receive(:instrument_instance_methods)
2017-09-10 17:25:29 +05:30
allow(Gitlab::Application).to receive(:configure)
2017-08-17 22:00:37 +05:30
end
it 'can autoload and instrument all files' do
2019-02-15 15:39:39 +05:30
require_relative '../../config/initializers/zz_metrics'
2017-08-17 22:00:37 +05:30
expect { instrument_classes(config) }.not_to raise_error
end
end