Skip to content

Commit 7ae74df

Browse files
committed
RUBY-1104 Improve test language and matcher use
1 parent e565715 commit 7ae74df

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/mongo/cluster/cursor_reaper_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101

102102
it 'adds the op to the server list' do
103103
expect(to_kill.keys).to eq([ server ])
104-
expect(to_kill[server]).to eq(Set.new([op_spec_1, op_spec_2]))
104+
expect(to_kill[server]).to contain_exactly(op_spec_1, op_spec_2)
105105
end
106106

107107
context 'when the same op is added more than once' do
@@ -112,7 +112,7 @@
112112

113113
it 'does not allow duplicates ops for a server' do
114114
expect(to_kill.keys).to eq([ server ])
115-
expect(to_kill[server]).to eq(Set.new([op_spec_1, op_spec_2]))
115+
expect(to_kill[server]).to contain_exactly(op_spec_1, op_spec_2)
116116
end
117117
end
118118
end
@@ -180,7 +180,7 @@
180180
end
181181

182182
it 'removes the cursor id' do
183-
expect(active_cursors).to eq(Set.new)
183+
expect(active_cursors.size).to eq(0)
184184
end
185185
end
186186
end
@@ -208,7 +208,7 @@
208208
reaper.instance_variable_get(:@thread)
209209
end
210210

211-
it 'stops the thread from running' do
211+
it 'restarts the thread' do
212212
expect(thread.alive?).to be(true)
213213
end
214214
end

0 commit comments

Comments
 (0)