changes attr_accessible warnings to set @code to the attribute & updates tests