From a20d0c5f98d5099e2391822e0ef7d18aa504552b Mon Sep 17 00:00:00 2001 From: Kyle Banker Date: Mon, 13 Sep 2010 11:12:26 -0400 Subject: [PATCH] minor: test fix getlasterror --- test/collection_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/collection_test.rb b/test/collection_test.rb index 8b1bd32..f4c235b 100644 --- a/test/collection_test.rb +++ b/test/collection_test.rb @@ -105,10 +105,11 @@ class TestCollection < Test::Unit::TestCase end def test_safe_insert + @@test.create_index("hello", :unique => true) a = {"hello" => "world"} @@test.insert(a) @@test.insert(a) - assert(@@db.get_last_error.include?("E11000")) + assert(@@db.get_last_error['err'].include?("11000")) assert_raise OperationFailure do @@test.insert(a, :safe => true)