recreating a non-existant database shouldn't raise any exception (and we make sure of it)

Signed-off-by: Marcos Tapajós <tapajos@gmail.com>
This commit is contained in:
Damien Mathieu 2010-02-03 15:57:43 +01:00 committed by Marcos Tapajós
parent d5b354367d
commit ec51c34f7d
2 changed files with 2 additions and 2 deletions

View file

@ -265,7 +265,7 @@ module CouchRest
def recreate!
delete!
create!
rescue HttpAbstraction::ResourceNotFound
rescue RestClient::ResourceNotFound
ensure
create!
end

View file

@ -716,7 +716,7 @@ describe CouchRest::Database do
it "should recreate a db even tho it doesn't exist" do
@cr.databases.should_not include(@db2.name)
begin @db2.recreate! rescue nil end
@db2.recreate!
@cr.databases.should include(@db2.name)
end