test/test_joint.rb in joint-0.3.1 vs test/test_joint.rb in joint-0.3.2
- old
+ new
@@ -110,12 +110,12 @@
subject.file_type.should == "application/pdf"
subject.image_id.should_not be_nil
subject.file_id.should_not be_nil
- subject.image_id.should be_instance_of(Mongo::ObjectID)
- subject.file_id.should be_instance_of(Mongo::ObjectID)
+ subject.image_id.should be_instance_of(BSON::ObjectID)
+ subject.file_id.should be_instance_of(BSON::ObjectID)
end
should "allow accessing keys through attachment proxy" do
subject.image.size.should == 13661
subject.file.size.should == 68926
@@ -124,12 +124,12 @@
subject.file.type.should == "application/pdf"
subject.image.id.should_not be_nil
subject.file.id.should_not be_nil
- subject.image.id.should be_instance_of(Mongo::ObjectID)
- subject.file.id.should be_instance_of(Mongo::ObjectID)
+ subject.image.id.should be_instance_of(BSON::ObjectID)
+ subject.file.id.should be_instance_of(BSON::ObjectID)
end
should "proxy unknown methods to GridIO object" do
subject.image.files_id.should == subject.image_id
subject.image.content_type.should == 'image/jpeg'
@@ -249,11 +249,11 @@
should "know that the attachment is not present" do
subject.image?.should be(false)
end
- should "raise Mongo::GridError" do
- assert_raises(Mongo::GridError) { subject.image.read }
+ should "raise Mongo::GridFileNotFound" do
+ assert_raises(Mongo::GridFileNotFound) { subject.image.read }
end
end
context "Destroying a document" do
setup do
\ No newline at end of file