spec/integration/read_preference_spec.rb in mongo-2.10.0 vs spec/integration/read_preference_spec.rb in mongo-2.10.1

- old
+ new

@@ -407,11 +407,11 @@ session.with_transaction(tx_options) do collection.insert_one({hello: 'world'}, session: session) res = collection.find({}, {session: session}.merge(find_options || {})).to_a.count expect(res).to eq(1) end - end.to raise_error(Mongo::Error::InvalidTransactionOperation, "read preference in a transaction must be primary (requested: secondary)") + end.to raise_error(Mongo::Error::InvalidTransactionOperation, /read preference in a transaction must be primary \(requested: secondary\)/) end end context 'when read preference is given in transaction options' do let(:tx_options) do @@ -476,10 +476,10 @@ session.with_transaction(tx_options) do collection.insert_one({hello: 'world'}, session: session) res = collection.find({}, {session: session}.merge(find_options || {})).to_a.count expect(res).to eq(1) end - end.to raise_error(Mongo::Error::InvalidTransactionOperation, "read preference in a transaction must be primary (requested: secondary)") + end.to raise_error(Mongo::Error::InvalidTransactionOperation, /read preference in a transaction must be primary \(requested: secondary\)/) end end end end