Sha256: c9d6fefe0bf518c6d2d0e8f648c883c068999195cadbcc89db81aea1e692f0d4
Contents?: true
Size: 988 Bytes
Versions: 81
Compression:
Stored size: 988 Bytes
Contents
require 'spec_helper' describe Mongo::Grid::FSBucket::Stream do let(:fs) do authorized_client.database.fs end describe '.get' do let(:stream) do described_class.get(fs, mode) end context 'when mode is read' do let(:mode) do Mongo::Grid::FSBucket::Stream::READ_MODE end it 'returns a Stream::Read object' do expect(stream).to be_a(Mongo::Grid::FSBucket::Stream::Read) end end context 'when mode is write' do let(:mode) do Mongo::Grid::FSBucket::Stream::WRITE_MODE end it 'returns a Stream::Write object' do expect(stream).to be_a(Mongo::Grid::FSBucket::Stream::Write) end context 'when options are provided' do let(:stream) do described_class.get(fs, mode, chunk_size: 100) end it 'sets the options on the stream object' do expect(stream.options[:chunk_size]).to eq(100) end end end end end
Version data entries
81 entries across 78 versions & 3 rubygems