From de1cab12711e5d1bfd00365a1903bc3a277f8f39 Mon Sep 17 00:00:00 2001 From: Sam Lown Date: Sun, 5 Jun 2011 11:26:50 +0200 Subject: [PATCH] Updating destroy specs for DocumentNotFound message --- spec/couchrest/persistence_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/couchrest/persistence_spec.rb b/spec/couchrest/persistence_spec.rb index cd2ebed..8def959 100644 --- a/spec/couchrest/persistence_spec.rb +++ b/spec/couchrest/persistence_spec.rb @@ -267,7 +267,7 @@ describe "Model Persistence" do end it "should make it go away" do @dobj.destroy - lambda{Basic.get!(@dobj.id)}.should raise_error(RestClient::ResourceNotFound) + lambda{Basic.get!(@dobj.id)}.should raise_error(CouchRest::Model::DocumentNotFound) end it "should freeze the object" do @dobj.destroy @@ -277,7 +277,7 @@ describe "Model Persistence" do it "trying to save after should fail" do @dobj.destroy lambda { @dobj.save }.should raise_error(StandardError) - lambda{Basic.get!(@dobj.id)}.should raise_error(RestClient::ResourceNotFound) + lambda{Basic.get!(@dobj.id)}.should raise_error(CouchRest::Model::DocumentNotFound) end it "should make destroyed? true" do @dobj.destroyed?.should be_false