spec/unit/create_spec.rb in langalex-couch_potato-0.2.2 vs spec/unit/create_spec.rb in langalex-couch_potato-0.2.3

- old
+ new

@@ -3,11 +3,11 @@ describe "create" do describe "succeeds" do before(:each) do @comment = Comment.new :title => 'my_title' - CouchPotato::Database.new(stub('database', :save_doc => {'rev' => '123', 'id' => '456'})).save_document!(@comment) + CouchPotato::Database.new(stub('database', :save_doc => {'rev' => '123', 'id' => '456'}, :info => nil)).save_document!(@comment) end it "should assign the id" do @comment._id.should == '456' end @@ -26,10 +26,10 @@ end describe "fails" do before(:each) do @comment = Comment.new - CouchPotato::Database.new(stub('database')).save_document(@comment) + CouchPotato::Database.new(stub('database', :info => nil)).save_document(@comment) end it "should not assign an id" do @comment._id.should be_nil end \ No newline at end of file