Skip to content

Commit

Permalink
Add spec for Money::Currency::Loader
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanitoFatas committed May 7, 2015
1 parent 838832a commit caa41e0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions spec/currency/loader_spec.rb
@@ -0,0 +1,20 @@
# encoding: utf-8
require 'spec_helper'

describe Money::Currency::Loader do
class CurrencyLoader
include Money::Currency::Loader
end

let(:loader) { CurrencyLoader.new }

it "returns a currency table hash" do
expect(loader.load_currencies).to be_a Hash
end

it "parse currency_iso.json & currency_non_iso.json & currency_backwards_compatible.json" do
expect(loader).to receive(:parse_currency_file).exactly(3).times.and_return({})

loader.load_currencies
end
end

0 comments on commit caa41e0

Please sign in to comment.