diff --git a/lib/couchrest/core/database.rb b/lib/couchrest/core/database.rb index 90c4828..8b81db7 100644 --- a/lib/couchrest/core/database.rb +++ b/lib/couchrest/core/database.rb @@ -48,6 +48,7 @@ module CouchRest def get_bulk(ids) documents(:keys => ids, :include_docs => true) end + alias :bulk_load :get_bulk # POST a temporary view function to CouchDB for querying. This is not # recommended, as you don't get any performance benefit from CouchDB's diff --git a/spec/couchrest/core/database_spec.rb b/spec/couchrest/core/database_spec.rb index 985ebf9..57dc2a4 100644 --- a/spec/couchrest/core/database_spec.rb +++ b/spec/couchrest/core/database_spec.rb @@ -602,7 +602,7 @@ describe CouchRest::Database do it "should have the bulk_load macro" do rs = @db.bulk_load ["doc0", "doc7"] rs['rows'].length.should == 2 - ds['rows'][0]['doc']['another'].should == "doc" + rs['rows'][0]['doc']['another'].should == "doc" end end diff --git a/spec/couchrest/more/casted_model_spec.rb b/spec/couchrest/more/casted_model_spec.rb index 0a4428f..4396317 100644 --- a/spec/couchrest/more/casted_model_spec.rb +++ b/spec/couchrest/more/casted_model_spec.rb @@ -1,3 +1,5 @@ +# encoding: utf-8 + require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper') require File.join(FIXTURE_PATH, 'more', 'card') require File.join(FIXTURE_PATH, 'more', 'cat') @@ -68,7 +70,7 @@ describe CouchRest::CastedModel do describe "casted as an array of a different type" do before(:each) do - @obj = DummyModel.new(:keywords => ['couch', 'sofa', 'relax', 'canape']) + @obj = DummyModel.new(:keywords => ['couch', 'sofa', 'relax', 'canapé']) end it "should cast the array propery" do