mongo-ruby-driver/test
John Nunemaker 53ad43fedc Added transformer concept.
Can be passed to find/find_one, which in turn is passed to cursor. It is an optional block that makes it easier to turn documents that are returned into hashes.

cursor = collection.find({...}, :transformer => Proc.new { |doc| User.load(doc) })
cursor.next # returns instance of User instead of ordered hash

This will allow MongoMapper, ToyStore and other object mappers to take better advantage of Cursors. No more calling to_a and mapping to instances.
2011-03-23 15:26:34 -04:00
..
auxillary RUBY-250 RUBY-231 Test fork safety 2011-03-17 22:38:21 -04:00
bson RUBY-245 Unique object id with timestamp 2011-03-15 16:40:27 -04:00
data Tests for GridIO#each 2010-12-01 13:30:57 -05:00
load tests with Unicorn and Thin for out-of-sync responses 2011-02-10 14:42:29 -05:00
replica_sets RUBY-248 Verify query speed after failover 2011-03-12 17:48:35 -05:00
support minor: test fix 2010-10-13 18:27:19 -04:00
threading minor: increase pool size on pooled threading test. 2010-12-15 12:19:58 -05:00
tools minor: rs test framework updates 2011-02-10 14:48:59 -05:00
unit minor: test fix and cleanup 2011-01-31 15:53:38 -05:00
collection_test.rb Added transformer concept. 2011-03-23 15:26:34 -04:00
connection_test.rb RUBY-231 RUBY-250 Validate socket against pid 2011-03-17 22:15:14 -04:00
conversions_test.rb Path fixes for test in Ruby 1.9.2 2010-09-09 15:58:51 -04:00
cursor_fail_test.rb RUBY-187 All tests can now use custom host and port; 2010-10-13 17:09:23 -04:00
cursor_message_test.rb RUBY-187 All tests can now use custom host and port; 2010-10-13 17:09:23 -04:00
cursor_test.rb Added transformer concept. 2011-03-23 15:26:34 -04:00
db_api_test.rb RUBY-233 show invalid key on invalid key exception 2011-02-04 12:07:28 -05:00
db_connection_test.rb Fix DB#error and DB#last_status deprecation warnings in unit tests. 2010-09-13 10:48:08 -04:00
db_test.rb Create index concurrency fix 2010-11-09 13:34:28 -05:00
grid_file_system_test.rb RUBY-210 GridIO#seek with GridIO#read_all 2010-12-15 15:07:30 -05:00
grid_io_test.rb RUBY-210 GridIO#seek with GridIO#read_all 2010-12-15 15:07:30 -05:00
grid_test.rb Tests for GridIO#each 2010-12-01 13:30:57 -05:00
safe_test.rb Update and remove return error object in safe mode 2010-11-09 13:07:01 -05:00
support_test.rb minor: added missing tests 2010-10-12 15:41:24 -04:00
test_helper.rb minor: no longer using a new db per test run 2010-12-15 12:55:06 -05:00
threading_test.rb RUBY-187 All tests can now use custom host and port; 2010-10-13 17:09:23 -04:00
uri_test.rb RUBY-227 passwords in URIs can contain all 2011-01-17 11:05:24 -05:00