Sha256: 9ef0e385f4bf789f5475ba82e8e6b2dde6cca93acb01bcd8e4123137dd512cb1

Contents?: true

Size: 483 Bytes

Versions: 4

Compression:

Stored size: 483 Bytes

Contents

require 'helper'

describe SymbolParser do

  describe '#sp500_to_bsym' do

    it "returns 'Z/' when 'Z-'" do
      expect(SymbolParser.new('Z-').symbol_to_bsym).to eq('Z/')
    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

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

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