Sha256: 331f1178e499af89dedcd2fb269ec9d8c7babe1e2e8a3383946a326020095eff
Contents?: true
Size: 755 Bytes
Versions: 4
Compression:
Stored size: 755 Bytes
Contents
require 'spec_helper' describe Expedition do describe '.new' do subject(:client) do described_class.new('example.com', 12345) end let!(:mock_client) do double(Expedition::Client) end it 'returns new Expedition::Client with supplied host and port' do expect(Expedition::Client).to receive(:new).with('example.com', 12345).and_return(mock_client) expect(client).to eq(mock_client) end end describe '.client' do subject(:client) do Expedition.client end it 'returns an Expedition::Client' do expect(client).to be_an(Expedition::Client) end it 'returns the same instance' do expect(client.object_id).to eq(described_class.client.object_id) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
expedition-0.4.0 | spec/expedition_spec.rb |
expedition-0.3.0 | spec/expedition_spec.rb |
expedition-0.2.0 | spec/expedition_spec.rb |
expedition-0.1.0 | spec/expedition_spec.rb |