Skip to content

Commit

Permalink
Fix specs deprecation errors
Browse files Browse the repository at this point in the history
Fix the following deprecation issues in specs:
- Default localization behaviour
- Default rounding mode
- `symbol_position` option
  • Loading branch information
tagliala committed Mar 8, 2024
1 parent b0cf7c0 commit 9245799
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion spec/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
value = Money.new(-12345600, "EUR")
symbol = Money::Currency.find(:eur).symbol

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

# Override with "classic" format options for backward compatibility
Expand Down
2 changes: 2 additions & 0 deletions spec/dummy/config/initializers/money.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# encoding : utf-8

MoneyRails.configure do |config|
Money.locale_backend = :i18n
Money.rounding_mode = BigDecimal::ROUND_HALF_UP

# To set the default currency
#
Expand Down

0 comments on commit 9245799

Please sign in to comment.