Sha256: 4a7bc69753e8ba1a0960675c99e4977ff32c0ed56349b86c07d7eda194ea6076
Contents?: true
Size: 602 Bytes
Versions: 7
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' CouchTomato.database.save_document! @comment CouchTomato.couchrest_database.get(@comment.id)['ruby_class'].should == 'Comment' end end describe "fails" do it "should not store anything" do @comment = Comment.new CouchTomato.database.save_document @comment CouchTomato.couchrest_database.documents['rows'].should be_empty end end end
Version data entries
7 entries across 7 versions & 1 rubygems