summaryrefslogtreecommitdiff
path: root/spec/support/helpers/reload_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/helpers/reload_helpers.rb')
-rw-r--r--spec/support/helpers/reload_helpers.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/support/helpers/reload_helpers.rb b/spec/support/helpers/reload_helpers.rb
new file mode 100644
index 00000000000..60811e4604f
--- /dev/null
+++ b/spec/support/helpers/reload_helpers.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+module ReloadHelpers
+ def reload_models(*models)
+ models.map(&:reload)
+ end
+
+ def subject_and_reload(*models)
+ subject
+ reload_models(*models)
+ end
+end