Merci Mickaël,
> So my conclusion is :
>
> Functional test take default_locale variable while is running his
> tests.
It worked for me! I'm not sure it's a general solution, as I use Spree
and I also had to override the Spree config. Here goes:
context "on GET to :edit with :test locale" do
setup do
@product = Factory.create(:product, :price => 49.95)
I18n.default_locale = :test
Spree::Config.set(:default_locale => :test)
get :edit, :id => @product.permalink
end
should "format the price properly" do
assert_select "#product_price[value='49,95']"
end
end
My test.yml file:
test:
number:
format:
separator: ","
Xtian
--
Posted via http://www.ruby-forum.com/.
--
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.