cache.rb 573 B

12345678910111213141516171819
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. RSpec.configure do |config|
  3. # Cache setup must be the first before hook
  4. # Otherwise authenticated_as hook fails with random errors
  5. config.prepend_before do
  6. # clear the cache otherwise it won't
  7. # be able to recognize the rollbacks
  8. # done by RSpec
  9. Rails.cache.clear
  10. # clear Setting cache to prevent leaking
  11. # of Setting changes from previous test examples
  12. Setting.reload
  13. # reset bulk import to prevent wrong base setting
  14. BulkImportInfo.disable
  15. end
  16. end