2020-07-30 17:09:35 -04:00
|
|
|
# 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
|
2020-09-18 08:09:50 -04:00
|
|
|
|
|
|
|
attr_accessor :flushed
|
|
|
|
|
|
|
|
counter_attribute_after_flush do |subject|
|
|
|
|
subject.flushed = true
|
|
|
|
end
|
2020-07-30 17:09:35 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|