Permalink
Browse files

Better tests.

Signed-off-by: chatgris <jboyer@af83.com>
Signed-off-by: Laurent Arnoud <larnoud@af83.com>
  • Loading branch information...
1 parent 7c95b2c commit fef41b8c981a9e5ae49bc5d6ee110658a857b019 chatgris committed Mar 29, 2012
Showing with 13 additions and 2 deletions.
  1. +13 −2 test/open_exchange_rates_bank_test.rb
@@ -40,8 +40,19 @@
end
it "should not return 0 with integer rate" do
- @bank.update_rates
- @bank.exchange_with(5000.to_money('BBD'), 'USD').cents.wont_equal 0
+ Money::Currency::TABLE[:wtf] = {
+ :priority => 1,
+ :iso_code => "WTF",
+ :name => "WTF",
+ :symbol => "WTF",
+ :subunit => "Cent",
+ :subunit_to_unit => 1000,
+ :separator => ".",
+ :delimiter => ","
+ }
+ Money::Currency::STRINGIFIED_KEYS << 'wtf'
+ @bank.add_rate("USD", "WTF", 2)
+ @bank.exchange_with(5000.to_money('WTF'), 'USD').cents.wont_equal 0
end
# in response to #4

0 comments on commit fef41b8

Please sign in to comment.