Permalink
Browse files

update to v1.6.3

  • Loading branch information...
1 parent 0776a75 commit 0b42e31dde82b3fcf2d8f8e5d07ec0c262031fec @ghendry ghendry committed Oct 20, 2010
View
2 koans/about_crud.rb
@@ -13,7 +13,7 @@ def setup
def teardown
@db.collections.each do |collection|
- @db.drop_collection(collection.name)
+ @db.drop_collection(collection.name) unless collection.name =~ /indexes$/
end
end
View
4 koans/about_data_types.rb
@@ -15,7 +15,7 @@ def setup
def teardown
@db.collections.each do |collection|
- @db.drop_collection(collection.name)
+ @db.drop_collection(collection.name) unless collection.name =~ /indexes$/
end
end
@@ -51,7 +51,7 @@ def test_boolean_true
end
def test_nil
@col.insert({:value => nil})
- assert_instance_of ___, @col.find_one['value']
+ assert_instance_of___, @col.find_one['value']
end
def test_not_attribute
@col.insert({:value => true})
View
2 koans/about_db_connect.rb
@@ -12,7 +12,7 @@ def setup
def teardown
@db.collections.each do |collection|
- @db.drop_collection(collection.name)
+ @db.drop_collection(collection.name) unless collection.name =~ /indexes$/
end
end
View
4 koans/about_embedded.rb
@@ -29,7 +29,7 @@ def setup
def teardown
@db.collections.each do |collection|
- @db.drop_collection(collection.name)
+ @db.drop_collection(collection.name) unless collection.name =~ /indexes$/
end
end
@@ -64,7 +64,7 @@ def test_update_change_address
def test_indexed_query
@embedded.create_index('lines.item')
assert_equal __, @embedded.find({'lines.item' => 'widget'}).count
- assert_equal __, @embedded.find({'lines.item' => 'widget'}).explain['indexBounds'][0][0]['lines.item']
+ assert_equal __, @embedded.find({'lines.item' => 'widget'}).explain['indexBounds']['lines.item'][0][0]
end
end
View
2 koans/about_groups.rb
@@ -24,7 +24,7 @@ def setup
def teardown
@db.collections.each do |collection|
- @db.drop_collection(collection.name)
+ @db.drop_collection(collection.name) unless collection.name =~ /indexes$/
end
end
View
2 koans/about_map_reduce.rb
@@ -27,7 +27,7 @@ def setup
def teardown
@db.collections.each do |collection|
- @db.drop_collection(collection.name)
+ @db.drop_collection(collection.name) unless collection.name =~ /indexes$/
end
end
View
2 koans/about_queries.rb
@@ -25,7 +25,7 @@ def setup
def teardown
@db.collections.each do |collection|
- @db.drop_collection(collection.name)
+ @db.drop_collection(collection.name) unless collection.name =~ /indexes$/
end
end
View
2 koans/about_query_conditions.rb
@@ -18,7 +18,7 @@ def setup
def teardown
@db.collections.each do |collection|
- @db.drop_collection(collection.name)
+ @db.drop_collection(collection.name) unless collection.name =~ /indexes$/
end
end
View
2 koans/about_query_options.rb
@@ -14,7 +14,7 @@ def setup
def teardown
@db.collections.each do |collection|
- @db.drop_collection(collection.name)
+ @db.drop_collection(collection.name) unless collection.name =~ /indexes$/
end
end
View
12 koans/about_updates.rb
@@ -24,7 +24,7 @@ def setup
def teardown
@db.collections.each do |collection|
- @db.drop_collection(collection.name)
+ @db.drop_collection(collection.name) unless collection.name =~ /indexes$/
end
end
@@ -82,13 +82,13 @@ def test_push_all
def test_check_status
@pix.update({:file => 'pic1.jpg'}, {'$push' => {:tags => 'people'}})
- assert !@db.last_status["updatedExisting"], "Update failed"
+ assert !@db.get_last_error["updatedExisting"], "Update failed"
@pix.update({:file => 'pic1.jpg'}, {'$push' => {:camera => 'Canon'}})
- assert_not_nil @db.last_status["updatedExisting"], "Update not permitted"
+ assert_not_nil @db.get_last_error["updatedExisting"], "Update not permitted"
- #when update works last_status is {"err"=>nil, "updatedExisting"=>true, "n"=>1, "ok"=>1.0}
- #when update fails last_status is {"err"=>nil, "updatedExisting"=>false, "n"=>0, "ok"=>1.0}
- #when update is not permitted last_status is {"err"=>"Cannot apply $push/$pushAll modifier to non-array", "n"=>0, "ok"=>1.0}
+ #when update works get_last_error is {"err"=>nil, "updatedExisting"=>true, "n"=>1, "ok"=>1.0}
+ #when update fails get_last_error is {"err"=>nil, "updatedExisting"=>false, "n"=>0, "ok"=>1.0}
+ #when update is not permitted get_last_error is {"err"=>"Cannot apply $push/$pushAll modifier to non-array", "code"=>10141, "n"=>0, "ok"=>1.0}
end
def test_pop

0 comments on commit 0b42e31

Please sign in to comment.