Sha256: 72c952ed4a1fd98294c583e47289114ab58556c4122ed06eee55a9d4d783cea1
Contents?: true
Size: 602 Bytes
Versions: 20
Compression:
Stored size: 602 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)['ruby_class'].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
20 entries across 20 versions & 5 rubygems