Streamer fixes

* url must be quoted inside the curl command otherwise '&' between
  params are interpreted by shells
* View url format updated
* Streamer yielded the last row returned by curl ("}]") as nil
* Specs
This commit is contained in:
Julien Sanchez 2009-10-08 18:27:22 +08:00 committed by Matt Aimonetti
parent d8e7652680
commit 1c43a8f3d3
3 changed files with 51 additions and 8 deletions

View file

@ -131,9 +131,16 @@ describe CouchRest::Database do
rs = @db.view('first/test', :include_docs => true) do |row|
rows << row
end
rows.length.should == 4
rows.length.should == 3
rs["total_rows"].should == 3
end
it "should accept a block with several params" do
rows = []
rs = @db.view('first/test', :include_docs => true, :limit => 2) do |row|
rows << row
end
rows.length.should == 2
end
end
describe "GET (document by id) when the doc exists" do
@ -711,4 +718,4 @@ describe CouchRest::Database do
end
end
end