Sha256: df452517006a743eb65187a4ba9a01982c2d55b8a9fab4191308cfdba5a4ae14
Contents?: true
Size: 534 Bytes
Versions: 7
Compression:
Stored size: 534 Bytes
Contents
require './lib/dagger' require 'rspec/mocks' require 'rspec/expectations' describe 'Persistent mode' do it 'works' do fake_client = double('Client') expect(Dagger::Client).to receive(:new).once.and_return(fake_client) expect(fake_client).to receive(:open).once #.and_return(fake_resp) expect(fake_client).to receive(:close).once #.and_return(fake_resp) obj = Dagger.open('https://www.google.com') do get('/search?q=dagger+http+client') get('google.com/search?q=thank+you+ruby') end end end
Version data entries
7 entries across 7 versions & 1 rubygems