Skip to content

Commit

Permalink
Catch requests at a higher level
Browse files Browse the repository at this point in the history
  • Loading branch information
benschwarz committed Jan 31, 2010
1 parent ea18806 commit b8393c1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec/throne/document_spec.rb
Expand Up @@ -53,8 +53,9 @@ class TestDocumentWithDefault < Throne::Document
end

it "should get a document with params" do
RestClient.should_receive(:get).with(/descending=true/, {:accept_encoding=>"gzip, deflate"})
TestDocument.get("fake-id", {:descending => true})
doc = TestDocument.create
Throne::Request.should_receive(:get).with({:params=>{:descending=>true}, :resource=>doc._id, :database=>:document_specs})
TestDocument.get(doc._id, {:descending => true})
end

it "should get a specific revision" do
Expand Down

0 comments on commit b8393c1

Please sign in to comment.