X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f1c6a87aa137c11d0aff5a4b0e563ac2c2a8f82d..1586e2ba802e051f122d42fd8ad30aa3e6fdbf18:/test/test_helper.rb 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