summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-01-12 15:44:57 +0000
committerYorick Peterse <yorickpeterse@gmail.com>2016-01-12 15:44:57 +0000
commit83ad5fa5cbe72f2fe841627ba5152a3847204d12 (patch)
tree2cee5f927547961fbcb22232c65e035417f6d0dd /spec/lib
parent8f1c46d18aecb00ab43f348a0bd66cc5eac51ba6 (diff)
parent355c341fe7c6b7c503386cf0b0e39cc02dbc8902 (diff)
downloadgitlab-ce-83ad5fa5cbe72f2fe841627ba5152a3847204d12.tar.gz
Merge branch 'remove-application-frames-from-views' into 'master'
See merge request !2392
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/metrics/subscribers/action_view_spec.rb9
-rw-r--r--spec/lib/gitlab/metrics_spec.rb9
2 files changed, 1 insertions, 17 deletions
diff --git a/spec/lib/gitlab/metrics/subscribers/action_view_spec.rb b/spec/lib/gitlab/metrics/subscribers/action_view_spec.rb
index 05e4fbbeb51..0695c5ce096 100644
--- a/spec/lib/gitlab/metrics/subscribers/action_view_spec.rb
+++ b/spec/lib/gitlab/metrics/subscribers/action_view_spec.rb
@@ -14,19 +14,12 @@ describe Gitlab::Metrics::Subscribers::ActionView do
before do
allow(subscriber).to receive(:current_transaction).and_return(transaction)
-
- allow(Gitlab::Metrics).to receive(:last_relative_application_frame).
- and_return(['app/views/x.html.haml', 4])
end
describe '#render_template' do
it 'tracks rendering of a template' do
values = { duration: 2.1 }
- tags = {
- view: 'app/views/x.html.haml',
- file: 'app/views/x.html.haml',
- line: 4
- }
+ tags = { view: 'app/views/x.html.haml' }
expect(transaction).to receive(:increment).
with(:view_duration, 2.1)
diff --git a/spec/lib/gitlab/metrics_spec.rb b/spec/lib/gitlab/metrics_spec.rb
index c2782f95c8e..0ec8a6dc5cb 100644
--- a/spec/lib/gitlab/metrics_spec.rb
+++ b/spec/lib/gitlab/metrics_spec.rb
@@ -13,15 +13,6 @@ describe Gitlab::Metrics do
end
end
- describe '.last_relative_application_frame' do
- it 'returns an Array containing a file path and line number' do
- file, line = described_class.last_relative_application_frame
-
- expect(line).to eq(__LINE__ - 2)
- expect(file).to eq('spec/lib/gitlab/metrics_spec.rb')
- end
- end
-
describe '#submit_metrics' do
it 'prepares and writes the metrics to InfluxDB' do
connection = double(:connection)