Commit 9b7ca61f8af919a3f614e45a8aabe09a3636b5f2
Squashed a few spec warnings and debug output
| |   |
| 82 | 82 | db.store(doc1) |
| 83 | 83 | db.store(doc2) |
| 84 | 84 | res = db.query(:map => "function(doc){ if(doc.foo == 'bar') emit(null, doc) }") |
| res.should be_instance_of CouchObject::Document |
| res.should be_instance_of(CouchObject::Document) |
| 86 | 86 | res.rows.size.should == 1 |
| 87 | 87 | res.rows.first["value"]["foo"].should == "bar" |
| 88 | 88 | end |
| … | … | |
| 95 | 95 | db.store(doc2) |
| 96 | 96 | res = db.query(:map => "function(doc){ emit(null, doc.data) }", |
| 97 | 97 | :reduce => "function(key, values){ return sum(values) }") |
| p res |
| res.should be_instance_of CouchObject::Document |
| res.should be_instance_of(CouchObject::Document) |
| 100 | 99 | res.rows[0]['value'].should == 4 |
| 101 | 100 | end |
| 102 | 101 | |