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:
parent
d5b354367d
commit
ec51c34f7d
|
@ -265,7 +265,7 @@ module CouchRest
|
|||
def recreate!
|
||||
delete!
|
||||
create!
|
||||
rescue HttpAbstraction::ResourceNotFound
|
||||
rescue RestClient::ResourceNotFound
|
||||
ensure
|
||||
create!
|
||||
end
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue