Sha256: d2a6eb551d1ac2e7e25507503afd17f1ecf22c2e9f239244a65baee659cd6035

Contents?: true

Size: 727 Bytes

Versions: 23

Compression:

Stored size: 727 Bytes

Contents

# frozen_string_literal: true
require 'spec_helper'

RSpec.describe Money::Currency::Loader do

  describe 'load_currencies' do
    it 'loads the iso currency file' do
      expect(subject.load_currencies['usd']['iso_code']).to eq('USD')
      expect(subject.load_currencies['usd']['symbol']).to eq('$')
      expect(subject.load_currencies['usd']['subunit_to_unit']).to eq(100)
      expect(subject.load_currencies['usd']['smallest_denomination']).to eq(1)
    end

    it 'loads the non iso currency file' do
      expect(subject.load_currencies['jep']['iso_code']).to eq('JEP')
    end

    it 'loads the historic iso currency file' do
      expect(subject.load_currencies['eek']['iso_code']).to eq('EEK')
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
shopify-money-3.0.0 spec/currency/loader_spec.rb
shopify-money-2.2.2 spec/currency/loader_spec.rb
shopify-money-2.2.1 spec/currency/loader_spec.rb
shopify-money-2.2.0 spec/currency/loader_spec.rb
shopify-money-2.0.0 spec/currency/loader_spec.rb
shopify-money-1.3.0 spec/currency/loader_spec.rb
shopify-money-1.2.1 spec/currency/loader_spec.rb
shopify-money-1.2.0 spec/currency/loader_spec.rb
shopify-money-1.1.2 spec/currency/loader_spec.rb
shopify-money-1.1.1 spec/currency/loader_spec.rb
shopify-money-1.1.0 spec/currency/loader_spec.rb
shopify-money-1.0.2.pre spec/currency/loader_spec.rb
shopify-money-1.0.1.pre spec/currency/loader_spec.rb
shopify-money-1.0.0.pre spec/currency/loader_spec.rb
shopify-money-0.16.0 spec/currency/loader_spec.rb
shopify-money-0.15.0 spec/currency/loader_spec.rb
shopify-money-0.14.8 spec/currency/loader_spec.rb
shopify-money-0.14.7 spec/currency/loader_spec.rb
shopify-money-0.14.6 spec/currency/loader_spec.rb
shopify-money-0.14.5 spec/currency/loader_spec.rb