Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 14:18:50 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 14:18:50 +0300
commit8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch)
treea77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/support_specs/matchers
parent00b35af3db1abfe813a778f643dad221aad51fca (diff)
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/support_specs/matchers')
-rw-r--r--spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb21
1 files changed, 13 insertions, 8 deletions
diff --git a/spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb b/spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb
index 3b15d804d7c..4a711b43d9a 100644
--- a/spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb
+++ b/spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb
@@ -3,16 +3,21 @@
require 'spec_helper'
describe ExceedQueryLimitHelpers do
- class TestQueries < ActiveRecord::Base
- self.table_name = 'schema_migrations'
- end
+ before do
+ stub_const('TestQueries', Class.new(ActiveRecord::Base))
+ stub_const('TestMatcher', Class.new)
+
+ TestQueries.class_eval do
+ self.table_name = 'schema_migrations'
+ end
- class TestMatcher
- include ExceedQueryLimitHelpers
+ TestMatcher.class_eval do
+ include ExceedQueryLimitHelpers
- def expected
- ActiveRecord::QueryRecorder.new do
- 2.times { TestQueries.count }
+ def expected
+ ActiveRecord::QueryRecorder.new do
+ 2.times { TestQueries.count }
+ end
end
end
end