flow-reference 0.2.85 → 0.2.87

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,16 +0,0 @@
1
- require_relative './lib/flow-reference'
2
-
3
- Gem::Specification.new 'flow-reference' do |gem|
4
- gem.version = Io::Flow::Reference::V0::Client::Constants::VERSION
5
- gem.summary = 'Flow helpers'
6
- gem.description = 'Flow helper libraries for working with https://api.flow.io'
7
- gem.homepage = 'https://www.flow.io'
8
- gem.license = 'MIT'
9
- gem.authors = ['Michael Bryzek', 'Dino Reic']
10
- gem.email = 'mbryzek@alum.mit.edu'
11
- gem.files = `git ls-files`.split($\)
12
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
- gem.test_files = gem.files.grep(%r{spec/})
14
-
15
- # gem.add_runtime_dependency 'flowcommerce'
16
- end
@@ -1,30 +0,0 @@
1
- require 'spec_helper'
2
-
3
- RSpec.describe Flow::Reference::Currencies do
4
-
5
- it 'checks loading of currency model' do
6
- currency_class = ::Io::Flow::Reference::V0::Models::Currency
7
-
8
- expect(Flow::Reference::Currencies.find('usd').class).to eq(currency_class)
9
- expect(Flow::Reference::Currencies.find(' usd ').class).to eq(currency_class)
10
- expect(Flow::Reference::Currencies.find('USD').class).to eq(currency_class)
11
- expect(Flow::Reference::Currencies.find('JPY').class).to eq(currency_class)
12
-
13
- expect(Flow::Reference::Currencies.find('other')).to be_nil
14
- end
15
-
16
- it 'checks to_cents conversion' do
17
- expect(Flow::Reference::Currencies::Data.Usd.to_cents("10.52")).to eq(1052)
18
- expect(Flow::Reference::Currencies::Data.Usd.to_cents("10.524")).to eq(1052)
19
- expect(Flow::Reference::Currencies::Data.Usd.to_cents("10.525")).to eq(1053)
20
- expect(Flow::Reference::Currencies::Data.Cad.to_cents("10.525")).to eq(1053)
21
- expect(Flow::Reference::Currencies::Data.Usd.to_cents(100)).to eq(10000)
22
- expect(Flow::Reference::Currencies::Data.Mro.to_cents("105")).to eq(1050)
23
- expect(Flow::Reference::Currencies::Data.Mro.to_cents("105.55")).to eq(1056)
24
-
25
- # Japan Jen has no cents
26
- expect(Flow::Reference::Currencies::Data.Jpy.to_cents("105")).to eq(105)
27
- expect(Flow::Reference::Currencies::Data.Jpy.to_cents(105)).to eq(105)
28
- expect(Flow::Reference::Currencies.find('JPY').to_cents(105)).to eq(105)
29
- end
30
- end
data/spec/spec_helper.rb DELETED
@@ -1,7 +0,0 @@
1
- require './lib/flow-reference.rb'
2
-
3
- RSpec.configure do |config|
4
- config.color = true
5
- config.tty = true
6
- config.formatter = :documentation
7
- end