update to new Couch, vendor finish

This commit is contained in:
Chris Anderson 2008-06-01 10:23:24 -07:00
parent 2f7a5210c4
commit 4063210302
3 changed files with 6 additions and 10 deletions

View file

@ -1,13 +1,7 @@
require File.dirname(__FILE__) + '/../deps/rest-client/lib/rest_client' require File.dirname(__FILE__) + '/../vendor/rest-client/lib/rest_client'
require "rubygems" require "rubygems"
require 'json' require 'json'
# gem "json"
# begin
# require "json/ext"
# rescue LoadError
# $stderr.puts "C version of json (fjson) could not be loaded, using pure ruby one"
# require "json/pure"
# end
require File.dirname(__FILE__) + '/database' require File.dirname(__FILE__) + '/database'

View file

@ -22,7 +22,8 @@ describe CouchRest do
it "should be up to date" do it "should be up to date" do
v = @cr.info["version"] v = @cr.info["version"]
vi = v.split(/a/).pop.to_i vi = v.split(/a/).pop.to_i
vi.should be_between(658733, 660751) vi.should be >= 661484 # versions older than this will likely fail many specs
vi.should be <= 661484 # versions newer than this haven't been tried
end end
end end

View file

@ -53,7 +53,8 @@ describe CouchRest::Database do
end end
it "should return the result of the temporary function" do it "should return the result of the temporary function" do
rs = @db.temp_view(:map => "function(doc){emit(doc.beverage, doc.count)}", :reduce => "function(beverage,counts){return sum(counts)}") rs = @db.temp_view(:map => "function(doc){emit(doc.beverage, doc.count)}", :reduce => "function(beverage,counts){return sum(counts)}")
rs['result'].should == 9 # rs.should == 'x'
rs['rows'][0]['value'].should == 9
end end
end end