trabajo-afectivo/spec/support/otrs_import_json_fixture_helper.rb

16 lines
454 B
Ruby
Raw Permalink Normal View History

2022-01-01 13:38:12 +00:00
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
module OtrsImportJsonFixtureHelper
def json_fixture(file)
JSON.parse(File.read("spec/fixtures/#{file}.json"))
end
end
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