Sha256: c6a8bfe81c22f6ee0307c38fe5d996f0030417a0f0ffed17b4ce49873b93bd89

Contents?: true

Size: 858 Bytes

Versions: 5

Compression:

Stored size: 858 Bytes

Contents

require 'helper'

describe SymbolParser do

  describe '#sp500_to_bsym' do

    it "returns 'BRK/B' when 'BRK.B'" do
      expect(SymbolParser.new('BRK.B').symbol_to_bsym).to eq('BRK/B')
    end

  end

  describe '#bsym_to_cik' do

    it "returns '0001067983' when 'BRK/B'" do
      expect(SymbolParser.new('BRK/B').bsym_to_cik).to eq('0001067983')
    end

    it "returns '0000014693' when 'BF/B'" do
      expect(SymbolParser.new('BF/B').bsym_to_cik).to eq('0000014693')
    end

    it "returns '0001355096' when 'QVCA'" do
      expect(SymbolParser.new('QVCA').bsym_to_cik).to eq('0001355096')
    end

    it "returns '0001560385' when 'LMCK'" do
      expect(SymbolParser.new('LMCK').bsym_to_cik).to eq('0001560385')
    end

    it "returns 'CSCO' when 'CSCO'" do
      expect(SymbolParser.new('CSCO').bsym_to_cik).to eq('CSCO')
    end

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
stock_index-0.8.4 spec/stock_index/symbol_parser_spec.rb
stock_index-0.8.3 spec/stock_index/symbol_parser_spec.rb
stock_index-0.8.2 spec/stock_index/symbol_parser_spec.rb
stock_index-0.8.1 spec/stock_index/symbol_parser_spec.rb
stock_index-0.8.0 spec/stock_index/symbol_parser_spec.rb