Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
af88e668
Commit
af88e668
authored
May 18, 2020
by
Rajendra Kadam
Committed by
Peter Leitzen
May 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add stub for query recorder spec
parent
4ca162db
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
.rubocop.yml
.rubocop.yml
+0
-1
changelogs/unreleased/leaky-constant-fix-4.yml
changelogs/unreleased/leaky-constant-fix-4.yml
+5
-0
spec/support_specs/helpers/active_record/query_recorder_spec.rb
...upport_specs/helpers/active_record/query_recorder_spec.rb
+6
-2
No files found.
.rubocop.yml
View file @
af88e668
...
@@ -402,7 +402,6 @@ RSpec/LeakyConstantDeclaration:
...
@@ -402,7 +402,6 @@ RSpec/LeakyConstantDeclaration:
-
'
spec/services/metrics/dashboard/clone_dashboard_service_spec.rb'
-
'
spec/services/metrics/dashboard/clone_dashboard_service_spec.rb'
-
'
spec/support/shared_contexts/spam_constants.rb'
-
'
spec/support/shared_contexts/spam_constants.rb'
-
'
spec/support/shared_examples/quick_actions/issuable/issuable_quick_actions_shared_examples.rb'
-
'
spec/support/shared_examples/quick_actions/issuable/issuable_quick_actions_shared_examples.rb'
-
'
spec/support_specs/helpers/active_record/query_recorder_spec.rb'
-
'
spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb'
-
'
spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb'
-
'
spec/uploaders/content_type_whitelist_spec.rb'
-
'
spec/uploaders/content_type_whitelist_spec.rb'
-
'
spec/uploaders/records_uploads_spec.rb'
-
'
spec/uploaders/records_uploads_spec.rb'
...
...
changelogs/unreleased/leaky-constant-fix-4.yml
0 → 100644
View file @
af88e668
---
title
:
Add class stubs and fix leaky constant alert in query recorder spec
merge_request
:
31954
author
:
Rajendra Kadam
type
:
fixed
spec/support_specs/helpers/active_record/query_recorder_spec.rb
View file @
af88e668
...
@@ -3,9 +3,13 @@
...
@@ -3,9 +3,13 @@
require
'spec_helper'
require
'spec_helper'
describe
ActiveRecord
::
QueryRecorder
do
describe
ActiveRecord
::
QueryRecorder
do
class
TestQueries
<
ActiveRecord
::
Base
before
do
stub_const
(
'TestQueries'
,
Class
.
new
(
ActiveRecord
::
Base
))
TestQueries
.
class_eval
do
self
.
table_name
=
'schema_migrations'
self
.
table_name
=
'schema_migrations'
end
end
end
describe
'detecting the right number of calls and their origin'
do
describe
'detecting the right number of calls and their origin'
do
it
'detects two separate queries'
do
it
'detects two separate queries'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment