spec/danconia/money_spec.rb in danconia-0.2.4 vs spec/danconia/money_spec.rb in danconia-0.2.5
- old
+ new
@@ -87,9 +87,13 @@
context 'format' do
it 'allow to override the number of decimals' do
expect(Money(3.561, decimals: 3).format(decimals: 1)).to eq '$3.6'
end
+
+ it 'pass the options to the activesupport helper' do
+ expect(Money(2).format(format: '%n %u')).to eq '2.00 $'
+ end
end
context 'to_s' do
it 'should add the currency symbol' do
expect(Money(3.25).to_s).to eq '$3.25'