2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-06-01 12:20:20 +00:00
|
|
|
|
2021-07-22 16:52:09 +00:00
|
|
|
module OtrsImportJsonFixtureHelper
|
2016-11-25 16:10:37 +00:00
|
|
|
def json_fixture(file)
|
|
|
|
JSON.parse(File.read("spec/fixtures/#{file}.json"))
|
|
|
|
end
|
|
|
|
end
|
2021-07-22 16:52:09 +00:00
|
|
|
|
|
|
|
RSpec.configure do |config|
|
|
|
|
# Zammad specific helpers
|
|
|
|
config.include OtrsImportJsonFixtureHelper
|
|
|
|
|
|
|
|
# skip OtrsImportJsonFixtureHelper functions in the backtraces to lower noise
|
|
|
|
config.backtrace_exclusion_patterns << %r{/spec/spec_helper/}
|
|
|
|
end
|