Sha256: ea2d065bfc92f6634b48942b36ef723dec490c6ef5931c11c9e5dc52b744de89

Contents?: true

Size: 545 Bytes

Versions: 2

Compression:

Stored size: 545 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'

describe CouchPotato::Persistence::InlineCollection do
  it "should build elements with the item class" do
    collection = CouchPotato::Persistence::InlineCollection.new Comment
    collection.build :title => 'mytitle'
    collection[0].class.should == Comment
  end
  
  it "should build elements with the given attributes" do
    collection = CouchPotato::Persistence::InlineCollection.new Comment
    collection.build :title => 'mytitle'
    collection[0].title.should == 'mytitle'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
langalex-couch_potato-0.1.1 spec/inline_collection_spec.rb
langalex-couch_potato-0.1 spec/inline_collection_spec.rb