Sha256: 40f2a69e1819be4537de1865611b8b8057de6f4c9bbd695eba5d5b597113ddb9

Contents?: true

Size: 565 Bytes

Versions: 7

Compression:

Stored size: 565 Bytes

Contents

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

class Plant
  include CouchTomato::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

7 entries across 7 versions & 1 rubygems

Version Path
couch_tomato-0.2.0 spec/unit/attributes_spec.rb
couch_tomato-0.1.5 spec/unit/attributes_spec.rb
couch_tomato-0.1.4 spec/unit/attributes_spec.rb
couch_tomato-0.1.3 spec/unit/attributes_spec.rb
couch_tomato-0.1.2 spec/unit/attributes_spec.rb
couch_tomato-0.1.1 spec/unit/attributes_spec.rb
couch_tomato-0.1.0 spec/unit/attributes_spec.rb