spec/danconia/money_spec.rb in danconia-0.2.3 vs spec/danconia/money_spec.rb in danconia-0.2.4
- old
+ new
@@ -165,9 +165,15 @@
expect(Money(10).positive?).to be true
expect(Money(10).respond_to?(:positive?)).to be true
end
end
+ context 'to_json' do
+ it 'should delegate to the amount' do
+ expect(Money(1).to_json).to eq '"1.0"'
+ end
+ end
+
def fake_exchange args = {}
double 'exchange', args.reverse_merge(rate: nil)
end
end
end