tests/mongo-qa/indices in mongodb-mongo-0.6.2 vs tests/mongo-qa/indices in mongodb-mongo-0.6.3
- old
+ new
@@ -1,8 +1,11 @@
#!/usr/bin/env ruby
require File.join(File.dirname(__FILE__), '_common.rb')
+
+include XGen::Mongo
+
db = Mongo.new(DEFAULT_HOST, DEFAULT_PORT).db(DEFAULT_DB)
x = db.collection('x')
y = db.collection('y')
def sorted_index_info(c)
@@ -39,8 +42,8 @@
raise "\n#{err.join("\n")}" unless err == ['', '']
x.drop_index('field1_1')
sorted_index_info(x).each { |info| puts sorted_info_keys(info) }
-y.create_index('abc', ['a', 'b', 'c'])
-y.create_index('d', ['d'])
+y.create_index([['a', ASCENDING], ['b', ASCENDING], ['c', ASCENDING]])
+y.create_index('d')
sorted_index_info(y).each { |info| puts sorted_info_keys(info) }