Sha256: c1887ec251a3dec067eddd83abfb67f683d6caea157abaabef53ac6a33c68ef5
Contents?: true
Size: 562 Bytes
Versions: 13
Compression:
Stored size: 562 Bytes
Contents
require 'spec_helper' describe IEX::Api::Client do include_context 'client' context 'known symbol', vcr: { cassette_name: 'price/msft' } do subject do client.price('MSFT') end it 'retrieves a price' do expect(subject).to eq 119.36 end end context 'invalid symbol', vcr: { cassette_name: 'price/invalid' } do subject do client.price('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
13 entries across 13 versions & 1 rubygems