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/factory_default.rb')
-rw-r--r--spec/support/factory_default.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/support/factory_default.rb b/spec/support/factory_default.rb
new file mode 100644
index 00000000000..e116c28f132
--- /dev/null
+++ b/spec/support/factory_default.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+RSpec.configure do |config|
+ config.after do |ex|
+ TestProf::FactoryDefault.reset unless ex.metadata[:factory_default] == :keep
+ end
+
+ config.after(:all) do
+ TestProf::FactoryDefault.reset
+ end
+end