2010/7/18 Christian Lescuyer <[email protected]>: > 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.
Locale should be set with each single request, so you should have sth like: get :edit, :id => @product.permalink, :locale => :en assert_response :success # I would ensure response 200 status here assert_select "#product_price[value='49,95']" -- Regards KK -- 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.
