Sha256: 21bb8a25b2bf7acf583cca91c2d583c179ef55ecc00cf5d07d603a18f7f8f814

Contents?: true

Size: 616 Bytes

Versions: 1

Compression:

Stored size: 616 Bytes

Contents

require 'helper'

describe StockIndex::BsymSearch do

  context 'searching a symbol in EXCEPTIONS' do

    it 'returns the component' do
      expect(StockIndex::BsymSearch.find('BIDU')).to eq({name: 'BAIDU INC', bbgid: 'BBG000QXWHD1'})
    end

  end

  context 'searching a symbol in the CSV file' do

    it 'returns the component' do
      expect(StockIndex::BsymSearch.find('CSCO')).to eq({:name=>"CISCO SYSTEMS INC", :bbgid=>"BBG000C3J3C9"})
    end

  end

  context 'searching a non existent symbol' do

    it 'returns nil' do
      expect(StockIndex::BsymSearch.find('ZZZZ')).to eq(nil)
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stock_index-0.6.0 spec/stock_index/bsym_search_spec.rb