Sha256: 54e2bc863c8681567a29085619e948a38e56e7528f67433a7b3bdca9dd92af7d
Contents?: true
Size: 1 KB
Versions: 2
Compression:
Stored size: 1 KB
Contents
require "spec_helper" describe "Nordea::Bank" do let(:bank) do Nordea::Bank.new end before(:each) do stub_request(:get, "http://service.nordea.com/nordea-openpages/fi/lists/currency/elelctronicExchangeFI.dat"). to_return(:status => 200, :body => SampleData.raw) Money.default_bank = bank end describe "#exchange" do it "returns the correct exchange rates" do bank.known_currencies.each do |currency| bank.exchange(100, "EUR", currency).cents.should == (SampleData.get_rate(currency) * 100).round end end end describe "#exchange_with" do it "returns the correct exchange rates" do bank.known_currencies.each do |currency| bank.exchange_with(Money.new(100, "EUR"), currency).cents.should == (SampleData.get_rate(currency) * 100).round end end end describe "#exchange_rates" do it "is an instance of Nordea::ExchangeRates" do bank.exchange_rates.should be_an_instance_of(Nordea::ExchangeRates) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nordea-2.0.1 | spec/bank/bank_spec.rb |
nordea-2.0.0 | spec/bank/bank_spec.rb |