Permalink
Browse files

fix real requests

  • Loading branch information...
1 parent 2cb1f90 commit f8ac0153b3726a84f7964748b9e601e478b704ef @jweiss committed Sep 14, 2010
Showing with 14 additions and 1 deletion.
  1. +6 −1 lib/rocking_chair/http_adapter.rb
  2. +8 −0 test/simply_stored_test.rb
@@ -2,10 +2,15 @@ module RockingChair
module HttpAdapter
def http_adapter
+ unless @_restclient
+ @_restclient = Object.new
+ @_restclient.extend(RestClientAdapter::API)
+ end
+
if RockingChair.enabled?
RockingChair::CouchRestHttpAdapter
else
- RestClientAdapter::API
+ @_restclient
end
end
@@ -271,6 +271,14 @@ class SimplyStoredTest < Test::Unit::TestCase
end
+ context "when deleting" do
+ should "delete the doc" do
+ user = User.new(:firstname => 'Bart', :lastname => 'S')
+ assert user.save
+ assert user.delete
+ end
+ end
+
context "when deleting all design docs" do
should "reset all design docs" do
User.find_all_by_firstname('a')

0 comments on commit f8ac015

Please sign in to comment.