test/test_exchange.rb in big_money-1.1.0 vs test/test_exchange.rb in big_money-1.2.0

- old
+ new

@@ -31,7 +31,13 @@ should 'return equal rate' do assert_equal BigDecimal.new('1'), BigMoney::Exchange.rate(:usd, :usd) assert_equal BigDecimal.new('1'), BigMoney::Exchange.rate(:usd, :xxx) assert_equal BigDecimal.new('1'), BigMoney::Exchange.rate(:xxx, :usd) end + + should 'be cacheable' do + BigMoney::Exchange.cache = {} + BigMoney::Exchange.rate(:usd, :aud) + assert_equal BigDecimal.new('2'), BigMoney::Exchange.cache.values.first + end end end