mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Moves test.rb I18n exception hanlder into base_spec_helper
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
I18n.exception_handler = Proc.new do |exception, *_|
|
||||
raise exception.to_exception
|
||||
end
|
||||
@@ -205,6 +205,11 @@ RSpec.configure do |config|
|
||||
# You can use `rspec -n` to run only failed specs.
|
||||
config.example_status_persistence_file_path = "tmp/rspec-status.txt"
|
||||
|
||||
# raise I18n exception handler
|
||||
I18n.exception_handler = proc do |exception, *_|
|
||||
raise exception.to_exception
|
||||
end
|
||||
|
||||
# Helpers
|
||||
config.include FactoryBot::Syntax::Methods
|
||||
config.include JsonSpec::Helpers
|
||||
|
||||
Reference in New Issue
Block a user