Sha256: 4ca6033b7d2d7343dc84bfe5349786910577795168f25c84b2f87de2655c367e
Contents?: true
Size: 437 Bytes
Versions: 7
Compression:
Stored size: 437 Bytes
Contents
require 'spec_helper' require './lib/fx_lib.rb' #test for generating a fx table describe 'Generating a fx table' do url = "http://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist-90d.xml" it 'should fetch the data given correct url and date' do FxLib::ExchangeRate.fetch_data(url, 1) puts FxRate.first.inspect puts FxRate.last.inspect expect(FxRate.where(currency: 'USD', rate: '1.3727')).not_to be_empty end end
Version data entries
7 entries across 7 versions & 1 rubygems