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

Version Path
fx_lib-0.0.8 spec/acceptance/fx_table_spec.rb
fx_lib-0.0.7 spec/acceptance/fx_table_spec.rb
fx_lib-0.0.6 spec/acceptance/fx_table_spec.rb
fx_lib-0.0.5 spec/acceptance/fx_table_spec.rb
fx_lib-0.0.4 spec/acceptance/fx_table_spec.rb
fx_lib-0.0.3 spec/acceptance/fx_table_spec.rb
fx_lib-0.0.2 spec/acceptance/fx_table_spec.rb