Sha256: 120fbd6e42e1a3f38251d82c49affedaaa0d3d5d76af0549576024ccc968049a
Contents?: true
Size: 609 Bytes
Versions: 13
Compression:
Stored size: 609 Bytes
Contents
require File.dirname(__FILE__) + '/spec_helper' describe "create" do before(:all) do recreate_db end describe "succeeds" do it "should store the class" do @comment = Comment.new :title => 'my_title' CouchPotato.database.save_document! @comment CouchPotato.couchrest_database.get(@comment.id).send(JSON.create_id).should == 'Comment' end end describe "fails" do it "should not store anything" do @comment = Comment.new CouchPotato.database.save_document @comment CouchPotato.couchrest_database.documents['rows'].should be_empty end end end
Version data entries
13 entries across 13 versions & 1 rubygems