otrs_import_json_fixture_helper.rb 454 B

123456789101112131415
  1. # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. module OtrsImportJsonFixtureHelper
  3. def json_fixture(file)
  4. JSON.parse(File.read("spec/fixtures/#{file}.json"))
  5. end
  6. end
  7. RSpec.configure do |config|
  8. # Zammad specific helpers
  9. config.include OtrsImportJsonFixtureHelper
  10. # skip OtrsImportJsonFixtureHelper functions in the backtraces to lower noise
  11. config.backtrace_exclusion_patterns << %r{/spec/spec_helper/}
  12. end