Moves test.rb I18n exception hanlder into base_spec_helper

This commit is contained in:
filipefurtad0
2023-12-19 16:41:58 +00:00
parent 264b6e072e
commit cdceefb6fb
2 changed files with 5 additions and 5 deletions

View File

@@ -1,5 +0,0 @@
# frozen_string_literal: true
I18n.exception_handler = Proc.new do |exception, *_|
raise exception.to_exception
end

View File

@@ -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