Sha256: a5badcf828b9f137a70a486d4b03bf1897aeaddee3b9977d434e8575b86b2a86
Contents?: true
Size: 760 Bytes
Versions: 38
Compression:
Stored size: 760 Bytes
Contents
require "spec_helper" describe Mongoid::Criteria::Options do context 'when a persistence context with options is set on the class of the criteria' do let(:context) do Band.with(connect_timeout: 10) do |klass| klass.where(name: 'FKA Twigs').persistence_context end end it 'uses the persistence context of the class of the criteria' do expect(context.options).to eq({ connect_timeout: 10 }) end end context 'when a persistence context with options is not set on the class of the criteria' do let(:context) do Band.where(name: 'FKA Twigs').persistence_context end it 'uses the persistence context of the class of the criteria' do expect(context.options).to eq({ }) end end end
Version data entries
38 entries across 36 versions & 2 rubygems