debian-mirror-gitlab/spec/support/helpers/reload_helpers.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
196 B
Ruby
Raw Normal View History

2021-04-29 21:17:54 +05:30
# frozen_string_literal: true
module ReloadHelpers
def reload_models(*models)
2021-06-08 01:23:25 +05:30
models.compact.map(&:reload)
2021-04-29 21:17:54 +05:30
end
2023-04-23 21:23:45 +05:30
def subject_and_reload(...)
2021-04-29 21:17:54 +05:30
subject
2023-04-23 21:23:45 +05:30
reload_models(...)
2021-04-29 21:17:54 +05:30
end
end