X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f1c6a87aa137c11d0aff5a4b0e563ac2c2a8f82d..281d7992f857e7e7c64947a06470898c35035bb6:/test/test_helper.rb?ds=inline diff --git a/test/test_helper.rb b/test/test_helper.rb index 05385b4f9..4d9372148 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -42,6 +42,18 @@ module ActiveSupport end end + ## + # execute a block with missing translation exceptions suppressed + def without_i18n_exceptions + exception_handler = I18n.exception_handler + begin + I18n.exception_handler = nil + yield + ensure + I18n.exception_handler = exception_handler + end + end + ## # work round minitest insanity that causes it to tell you # to use assert_nil to test for nil, which is fine if you're