spec/contexts/ids_spec.rb in mongo_doc-0.4.2 vs spec/contexts/ids_spec.rb in mongo_doc-0.5.5
- old
+ new
@@ -14,11 +14,11 @@
let(:context) { criteria.context }
context "#id_criteria" do
context "single id" do
let(:id) { 'a' * 24 }
- let(:obj_id) { Mongo::ObjectID.from_string(id) }
+ let(:obj_id) { BSON::ObjectID.from_string(id) }
it "converts strings to an object id" do
criteria.should_receive(:id).with(obj_id)
context.stub(:one)
context.id_criteria(id)
@@ -30,10 +30,10 @@
end
end
context "mutliple ids" do
let(:ids) { ['a' * 24, 'b' * 24] }
- let(:obj_ids) { [Mongo::ObjectID.from_string(ids.first), Mongo::ObjectID.from_string(ids.last)] }
+ let(:obj_ids) { [BSON::ObjectID.from_string(ids.first), BSON::ObjectID.from_string(ids.last)] }
it "converts strings to an object id" do
criteria.should_receive(:id).with(obj_ids)
criteria.stub(:entries)
context.id_criteria(ids)