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

Version Path
andrewtimberlake-couch_potato-0.2.8.1 spec/create_spec.rb
andrewtimberlake-couch_potato-0.2.8.2 spec/create_spec.rb
andrewtimberlake-couch_potato-0.2.8.3 spec/create_spec.rb
andrewtimberlake-couch_potato-0.2.8.4 spec/create_spec.rb
langalex-couch_potato-0.2.0 spec/create_spec.rb
langalex-couch_potato-0.2.1 spec/create_spec.rb
langalex-couch_potato-0.2.11 spec/create_spec.rb
langalex-couch_potato-0.2.12 spec/create_spec.rb
langalex-couch_potato-0.2.2 spec/create_spec.rb
langalex-couch_potato-0.2.3 spec/create_spec.rb
langalex-couch_potato-0.2.4 spec/create_spec.rb
langalex-couch_potato-0.2.5 spec/create_spec.rb
langalex-couch_potato-0.2.6 spec/create_spec.rb
langalex-couch_potato-0.2.7 spec/create_spec.rb
langalex-couch_potato-0.2.8 spec/create_spec.rb
langalex-couch_potato-0.2.9 spec/create_spec.rb
speedmax-couch_potato-0.2.0 spec/create_spec.rb
speedmax-couch_potato-0.2.2 spec/create_spec.rb
thefool808-couch_potato-0.2.7 spec/create_spec.rb
couch_potato-0.2.12 spec/create_spec.rb