Sha256: e73a96d2b8eb072f288321591c8c2b2dab520de962ffff795d77ad99815503f9

Contents?: true

Size: 427 Bytes

Versions: 5

Compression:

Stored size: 427 Bytes

Contents

require 'helper'

describe StockIndex::BsymSearch do

  context 'searching a symbol in the CSV file' do

    it 'returns the component' do
      expect(StockIndex::BsymSearch.find('CSCO', :us)).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', :us)).to eq(nil)
    end

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
stock_index-0.8.8 spec/stock_index/bsym_search_spec.rb
stock_index-0.8.7 spec/stock_index/bsym_search_spec.rb
stock_index-0.8.6 spec/stock_index/bsym_search_spec.rb
stock_index-0.8.5 spec/stock_index/bsym_search_spec.rb
stock_index-0.8.4 spec/stock_index/bsym_search_spec.rb