Sha256: 9a5b06e0ee71fbe6e312575c041313ceaba01a21aed319c135e02cb4fad1de94

Contents?: true

Size: 565 Bytes

Versions: 16

Compression:

Stored size: 565 Bytes

Contents

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

class Plant
  include CouchPotato::Persistence
  property :leaf_count
end

describe "attributes" do
  
  describe 'attributes=' do
    it "should assign the attributes" do
      plant = Plant.new 
      plant.attributes = {:leaf_count => 1}
      plant.leaf_count.should == 1
    end
  end

  describe "attributes" do
    it "should return the attributes" do
      plant = Plant.new(:leaf_count => 1)
      plant.attributes.should == {:leaf_count => 1, :created_at => nil, :updated_at => nil}
    end
  end

end

Version data entries

16 entries across 16 versions & 4 rubygems

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