Skip to content

Commit 7f47bc9

Browse files
committed
Use batch size in collection names spec
1 parent 5eac94e commit 7f47bc9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spec/mongo/database_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,19 @@
9797
context 'when there are more collections than the initial batch size' do
9898

9999
before do
100-
200.times do |i|
100+
2.times do |i|
101101
database["#{i}_dalmatians"].create
102102
end
103103
end
104104

105105
after do
106-
200.times do |i|
106+
2.times do |i|
107107
database["#{i}_dalmatians"].drop
108108
end
109109
end
110110

111111
it 'returns all collections' do
112-
expect(database.collection_names.select { |c| c =~ /dalmatians/}.size).to eq(200)
112+
expect(database.collection_names(batch_size: 1).select { |c| c =~ /dalmatians/}.size).to eq(2)
113113
end
114114

115115
end

0 commit comments

Comments
 (0)