require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe Datt do before do reset_database @page = Page.create end it "should allow transferring between String and Text" do @page.add_dynamic_attribute(:foo, "string") @page.foo = "this is a string" @page.save @page.foo = "t"*300 @page.save @page.datts.find_by_attr_key("foo").object_type.should == "text" @page.foo = "this is a string again" @page.save @page.datts.find_by_attr_key("foo").object_type.should == "string" end end