quote-only 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/test/test-quote-only.rb +26 -22
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e3d222782671720e0270051838d890d6eeb4c10
4
- data.tar.gz: 69187462fbfa634235b01c097db84ed47792b652
3
+ metadata.gz: 004dcbf033616ad303189cadcc471864fb41b323
4
+ data.tar.gz: cfd9a86fc010bef1c6f5d92581e322a822558392
5
5
  SHA512:
6
- metadata.gz: c21ef08887991cf6ef6bc104068478ebc0a3ade6715d396e0e804aba4e70799ade93c28e9c0df306ab2a669f4ff446c9463c06440d077e6cc1f5573b6902dead
7
- data.tar.gz: d809668c076e8294c561503ce6ee5dc69c6ae268c742b9b7e4ee884622959ee0e09b0c58d85d7d0425ad146287d0f6a8906d0677b640446140bf2f9ac4127f13
6
+ metadata.gz: 7fd5ed3e5e613d9bb88d5fc772e94d75b9da3afb63e6f7d2acf698cfc8ca1b236b0c0ad6a67f44046db85b509da1fe572b2330f5b0952b2bf1ba7e9c5a3a4d56
7
+ data.tar.gz: 7af196f14a9b4a02a0e6efa00f5e4dbda42d49f6fd3e655ee204cd4e87f7d1299fc1b3cb62db12c6f50b9f663224ab2d91c96169cf646eaba02ea85b1640267f
@@ -2,31 +2,35 @@ require 'minitest/autorun'
2
2
  require_relative '../lib/quote-only'
3
3
 
4
4
  class QuoteOnlyTest < Minitest::Test
5
- def test_
6
- cnn_market_tests = []
7
- cnn_market_tests.push({ :symbol => 'dow', :friendly_name => 'Dow', :decimal_places => -3 })
8
- cnn_market_tests.push({ :symbol => 'sandp', :friendly_name => 'S&P', :decimal_places => -2 })
5
+ def testCnnQuoteOnly(symbol, friendly_name, decimal_places)
6
+ f = CnnQuoteOnly.new({ :symbol => symbol, :friendly_name => friendly_name, :decimal_places => decimal_places })
7
+ puts f
8
+ assert f.quote.is_a? Float
9
+ end
9
10
 
10
- cnn_market_tests.each do |c|
11
- f = CnnMarketQuoteOnly.new(c)
12
- puts f
13
- assert f.quote.is_a? Float
14
- end
11
+ def test_
12
+ testCnnQuoteOnly('VT', 'World Stocks', 2)
15
13
 
16
- f = BloombergQuoteOnly.new({ :symbol => 'USGG10YR:IND', :friendly_name => '10 Year', :decimal_places => 0 })
17
- puts f
18
- assert f.quote.is_a? Float
14
+ f = ApmexGoldQuoteOnly.new({ :symbol => 'oz', :friendly_name => 'Gold', :decimal_places => 2 })
15
+ puts f
16
+ assert f.quote.is_a? Float
19
17
 
20
- f = ApmexGoldQuoteOnly.new({ :symbol => 'oz', :friendly_name => 'Gold', :decimal_places => -2 })
21
- puts f
22
- assert f.quote.is_a? Float
18
+ f = ApmexSilverQuoteOnly.new({ :symbol => 'oz', :friendly_name => 'Silver', :decimal_places => 2 })
19
+ puts f
20
+ assert f.quote.is_a? Float
21
+ puts
23
22
 
24
- f = ApmexSilverQuoteOnly.new({ :symbol => 'oz', :friendly_name => 'Silver', :decimal_places => 0 })
25
- puts f
26
- assert f.quote.is_a? Float
23
+ testCnnQuoteOnly('VTI', 'U.S. Stocks', 2)
24
+ testCnnQuoteOnly('VT', 'Foreign Stocks', 2)
25
+ puts
27
26
 
28
- f = CnnQuoteOnly.new({ :symbol => 'XBT', :friendly_name => 'Bitcoin', :decimal_places => -2 })
29
- puts f
30
- assert f.quote.is_a? Float
31
- end
27
+ testCnnQuoteOnly('VGLT', 'Long-Term Gov', 2)
28
+ f = BloombergQuoteOnly.new({ :symbol => 'USGG10YR:IND', :friendly_name => '10 Year', :decimal_places => 2 })
29
+ puts f
30
+ assert f.quote.is_a? Float
31
+ puts
32
+
33
+ testCnnQuoteOnly('BWZ', 'Foreign Cash', 2)
34
+ puts
35
+ end
32
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quote-only
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - cscribn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-08 00:00:00.000000000 Z
11
+ date: 2016-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest