diff options
Diffstat (limited to 'spec/support/counter_attribute.rb')
-rw-r--r-- | spec/support/counter_attribute.rb | 14 |
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 |