From 8f635ef86726eabbff727ce3b621e25414a911a8 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Wed, 24 Jan 2024 12:19:45 -0700 Subject: [PATCH 1/2] Fix failing atlas connectivity specs --- spec/atlas/atlas_connectivity_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/atlas/atlas_connectivity_spec.rb b/spec/atlas/atlas_connectivity_spec.rb index 0412d1bd84..fe27be1caf 100644 --- a/spec/atlas/atlas_connectivity_spec.rb +++ b/spec/atlas/atlas_connectivity_spec.rb @@ -11,13 +11,13 @@ describe 'connection to Atlas' do it 'runs ismaster successfully' do - result = client.database.command(:ismaster => 1) - expect(result.documents.first['ismaster']).to be true + expect { client.database.command(:ismaster => 1) } + .not_to raise_error end it 'runs findOne successfully' do - result = client.use(:test)['test'].find.to_a - expect(result).to be_a(Array) + expect { client.use(:test)['test'].find.to_a } + .not_to raise_error end end end From 83c429c4c2797f6a2dfe8f5b430ca3b8b04f5e63 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Thu, 25 Jan 2024 08:06:22 -0700 Subject: [PATCH 2/2] Update spec/atlas/atlas_connectivity_spec.rb Co-authored-by: Dmitry Rybakov --- spec/atlas/atlas_connectivity_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/atlas/atlas_connectivity_spec.rb b/spec/atlas/atlas_connectivity_spec.rb index fe27be1caf..ecd511ffb3 100644 --- a/spec/atlas/atlas_connectivity_spec.rb +++ b/spec/atlas/atlas_connectivity_spec.rb @@ -11,7 +11,7 @@ describe 'connection to Atlas' do it 'runs ismaster successfully' do - expect { client.database.command(:ismaster => 1) } + expect { client.database.command(:hello => 1) } .not_to raise_error end