added block yields to db.view
This commit is contained in:
parent
b1847cb465
commit
54a0afdf8e
2 changed files with 14 additions and 2 deletions
|
@ -117,6 +117,13 @@ describe CouchRest::Database do
|
|||
rs = @db.view('first/test', :keys => ["another", "wild"])
|
||||
rs['rows'].length.should == 2
|
||||
end
|
||||
it "should accept a block" do
|
||||
rows = []
|
||||
rs = @db.view('first/test', :include_docs => true) do |row|
|
||||
rows << row
|
||||
end
|
||||
rows.length.should == 3
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET (document by id) when the doc exists" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue