spec/mongo/collection/view/readable_spec.rb in mongo-2.1.1 vs spec/mongo/collection/view/readable_spec.rb in mongo-2.1.2
- old
+ new
@@ -320,22 +320,22 @@
let(:distinct) do
view.distinct(:field)
end
it 'returns the distinct values' do
- expect(distinct).to eq([ 'test1', 'test2', 'test3' ])
+ expect(distinct.sort).to eq([ 'test1', 'test2', 'test3' ])
end
end
context 'when the field is a string' do
let(:distinct) do
view.distinct('field')
end
it 'returns the distinct values' do
- expect(distinct).to eq([ 'test1', 'test2', 'test3' ])
+ expect(distinct.sort).to eq([ 'test1', 'test2', 'test3' ])
end
end
context 'when the field is nil' do
@@ -362,10 +362,10 @@
let(:distinct) do
view.distinct(:field, read: { mode: :secondary })
end
it 'returns the distinct values' do
- expect(distinct).to eq([ 'test1', 'test2', 'test3' ])
+ expect(distinct.sort).to eq([ 'test1', 'test2', 'test3' ])
end
end
context 'when a max_time_ms is specified', if: write_command_enabled? do