Sha256: 4b375dcefccf6fc8d0783f174776cfd1a099d294e888146966b20cee4327ad2e
Contents?: true
Size: 807 Bytes
Versions: 4
Compression:
Stored size: 807 Bytes
Contents
require 'helper' describe StockIndex::Component do it 'returns the value written to the cache' do component = StockIndex::Component.new('T', 'test', nil) component.cache_write('ZZZZ') expect(component.cache_lookup).to eq('ZZZZ') end # it 'returns the correct attributes with a valid symbol' do # component = StockIndex::Component.new('CSCO', 'XNAS', nil) # expect(component.attributes_lookup).to eq({:market=>"XNAS", :share=>{:symbol=>"CSCO", :name=>"CISCO SYSTEMS INC", :bbgid=>"BBG000C3J3C9"}, :company=>{:wikipedia=>nil, :cik=>"0000858877", :name=>"CISCO SYSTEMS, INC.", :sic=>"3576"}}) # end # # it 'returns nil with an invalid symbol' do # component = StockIndex::Component.new('ZZZZ', 'XNAS', nil) # expect(component.attributes_lookup).to be_nil # end end
Version data entries
4 entries across 4 versions & 1 rubygems