Sha256: 9c34e50cabb573437ddda434058849e8de0071cbc568459d805660e839c7a9df
Contents?: true
Size: 768 Bytes
Versions: 13
Compression:
Stored size: 768 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe DattsRight, "when inheriting the definition of an association" do before do reset_database @category = Category.create @category.definition = {:teaser => {:object_type => "text"}, :price => {:object_type => "integer"}} @category.save @page = Page.create :category => @category end it "should create the dynamic attributes" do @page.teaser = "hi" @page.teaser.should == "hi" @page.price = 200 @page.price.should == 200 end it "should point to the dynamic attribute definition" do @page.datt_details(:teaser).definer.should == {:object_type => "text"} @page.datt_details(:price).definer.should == {:object_type => "integer"} end end
Version data entries
13 entries across 13 versions & 1 rubygems