Sha256: a4a56768b3b718ce8fe15dc9ea7eb43d05bb33cfeaea4c8d558f7ab14b2468c4
Contents?: true
Size: 564 Bytes
Versions: 5
Compression:
Stored size: 564 Bytes
Contents
require 'spec_helper' describe IEX::Resources::Price do context 'known symbol', vcr: { cassette_name: 'price/msft' } do subject do IEX::Resources::Price.get('MSFT') end it 'retrieves a price' do expect(subject).to eq 93.78 end end context 'invalid symbol', vcr: { cassette_name: 'price/invalid' } do subject do IEX::Resources::Price.get('INVALID') end it 'fails with SymbolNotFoundError' do expect { subject }.to raise_error IEX::Errors::SymbolNotFoundError, 'Symbol INVALID Not Found' end end end
Version data entries
5 entries across 5 versions & 1 rubygems