From 902e1bed26ab61448e1c98eb7bf1d26d80feb6b5 Mon Sep 17 00:00:00 2001 From: Chris Anderson Date: Tue, 30 Sep 2008 16:21:28 -0700 Subject: [PATCH] moved specs so the autotest filemapping works better --- lib/couchrest/core/database.rb | 2 ++ spec/{ => couchrest/core}/couchrest_spec.rb | 2 +- spec/{ => couchrest/core}/database_spec.rb | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) rename spec/{ => couchrest/core}/couchrest_spec.rb (99%) rename spec/{ => couchrest/core}/database_spec.rb (99%) diff --git a/lib/couchrest/core/database.rb b/lib/couchrest/core/database.rb index 1376078..5848d82 100644 --- a/lib/couchrest/core/database.rb +++ b/lib/couchrest/core/database.rb @@ -59,6 +59,8 @@ module CouchRest RestClient.get "#{@root}/#{doc}/#{name}" end + + # Save a document to CouchDB. This will use the _id field from the document as the id for PUT, or request a new UUID from CouchDB, if no _id is present on the document. IDs are attached to documents on the client side because POST has the curious property of being automatically retried by proxies in the event of network segmentation and lost responses. def save doc if doc['_attachments'] diff --git a/spec/couchrest_spec.rb b/spec/couchrest/core/couchrest_spec.rb similarity index 99% rename from spec/couchrest_spec.rb rename to spec/couchrest/core/couchrest_spec.rb index 2fa9eff..1d4499d 100644 --- a/spec/couchrest_spec.rb +++ b/spec/couchrest/core/couchrest_spec.rb @@ -1,4 +1,4 @@ -require File.dirname(__FILE__) + '/spec_helper' +require File.dirname(__FILE__) + '/../../spec_helper' describe CouchRest do diff --git a/spec/database_spec.rb b/spec/couchrest/core/database_spec.rb similarity index 99% rename from spec/database_spec.rb rename to spec/couchrest/core/database_spec.rb index a12fe07..57b321b 100644 --- a/spec/database_spec.rb +++ b/spec/couchrest/core/database_spec.rb @@ -1,4 +1,4 @@ -require File.dirname(__FILE__) + '/spec_helper' +require File.dirname(__FILE__) + '/../../spec_helper' describe CouchRest::Database do before(:each) do