spec/configuration_spec.rb in money-rails-1.13.0 vs spec/configuration_spec.rb in money-rails-1.13.1

- old
+ new

@@ -16,12 +16,12 @@ expect(Money.us_dollar(100).bank.get_rate('USD', 'CAD')).to eq(1.24515) expect(Money.ca_dollar(100).bank.get_rate('CAD', 'USD')).to eq(0.803115) end it "sets no_cents_if_whole value for formatted output globally" do - # Disable the usage of I18n (to avoid default symbols for :en) - Money.use_i18n = false + # Enable formatting to depend only on currency (to avoid default symbols for :en) + Money.locale_backend = :currency value = Money.new(12345600, "EUR") mark = Money::Currency.find(:eur).decimal_mark expect(value.format).to match(/#{mark}/) @@ -33,10 +33,10 @@ expect(value.format).to match(/#{mark}/) expect(value.format(no_cents_if_whole: true)).not_to match(/#{mark}/) # Reset global settings MoneyRails.no_cents_if_whole = nil - Money.use_i18n = true + Money.locale_backend = :i18n end it "sets symbol for formatted output globally" do value = Money.new(12345600, "EUR") symbol = Money::Currency.find(:eur).symbol