Skip to content

Commit 9245799

Browse files
committed
Fix specs deprecation errors
Fix the following deprecation issues in specs: - Default localization behaviour - Default rounding mode - `symbol_position` option
1 parent b0cf7c0 commit 9245799

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

spec/configuration_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
value = Money.new(-12345600, "EUR")
7777
symbol = Money::Currency.find(:eur).symbol
7878

79-
MoneyRails.default_format = {symbol_position: :after}
79+
MoneyRails.default_format = { format: '%n%u' }
8080
expect(value.format).to match(/#{symbol}\z/)
8181

8282
# Override with "classic" format options for backward compatibility

spec/dummy/config/initializers/money.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# encoding : utf-8
22

33
MoneyRails.configure do |config|
4+
Money.locale_backend = :i18n
5+
Money.rounding_mode = BigDecimal::ROUND_HALF_UP
46

57
# To set the default currency
68
#

0 commit comments

Comments
 (0)