Skip to content

Commit cc921f1

Browse files
committed
Fix race conditions in tests
1 parent af3028f commit cc921f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/mongo/database_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,11 +347,11 @@
347347

348348
let(:from_db) do
349349
fs.insert_one(file)
350-
fs.find_one(:filename => 'test.txt')
350+
fs.find({ filename: 'test.txt' }, limit: 1).first
351351
end
352352

353353
it 'returns the assembled file from the db' do
354-
expect(from_db.filename).to eq(file.info.filename)
354+
expect(from_db['filename']).to eq(file.info.filename)
355355
end
356356
end
357357
end

0 commit comments

Comments
 (0)