Testing helper in rspec with I18n lazy lookup
问题 Consider this example. I have a Product model which has discount_percentage . And we're maintaining multiple locales. In the view we do not want the i18n stuff mess up the view. So we make a helper to read better and probably reuse it in other views: render_product_discount (code please see below) which will render the discount status of this product. And we use i18n lazy lookup feature throughout the application. But when we want to test this helper method we get a Error: # RuntimeError: #