On Jul 18, 5:16 pm, Christian Lescuyer <[email protected]> wrote: > Same here. This works: > > I18n.locale = :test > assert_equal :test, I18n.locale > assert_equal ',', I18n.translate('number.format.separator') > > But this doesn't: > > @product = Factory.create(:product, :price => 49.95) > I18n.locale = :test > get :edit, :id => @product.permalink > assert_select "#product_price[value='49,95']" > > We're testing the view (@response.body), here, not the controller. But I > can't find where the view is rendered, and why I18n.locale is not used.
As a sanity check... If these are controller tests, did you call integrate_views? Otherwise they do not actually render the view. -- You received this message because you are subscribed to the Google Groups "rails-i18n" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rails-i18n?hl=en.
