Sha256: 1b6f2340d4406244cda6b94691928b97c915818d81f40a950c6d2ee832bd5eda
Contents?: true
Size: 748 Bytes
Versions: 4
Compression:
Stored size: 748 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe DattsRight, "when inheriting the definition of an association" do before do @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
4 entries across 4 versions & 1 rubygems