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:
Diffstat (limited to 'spec/support/counter_attribute.rb')
-rw-r--r--spec/support/counter_attribute.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/support/counter_attribute.rb b/spec/support/counter_attribute.rb
new file mode 100644
index 00000000000..ea71b25b4c0
--- /dev/null
+++ b/spec/support/counter_attribute.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+RSpec.configure do |config|
+ config.before(:each, :counter_attribute) do
+ stub_const('CounterAttributeModel', Class.new(ProjectStatistics))
+
+ CounterAttributeModel.class_eval do
+ include CounterAttribute
+
+ counter_attribute :build_artifacts_size
+ counter_attribute :commit_count
+ end
+ end
+end