Skip to content

Commit

Permalink
Better tests.
Browse files Browse the repository at this point in the history
Signed-off-by: chatgris <jboyer@af83.com>
Signed-off-by: Laurent Arnoud <larnoud@af83.com>
  • Loading branch information
chatgris committed Mar 29, 2012
1 parent 7c95b2c commit fef41b8
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions test/open_exchange_rates_bank_test.rb
Expand Up @@ -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
Expand Down

0 comments on commit fef41b8

Please sign in to comment.