# Generic implementation for mock class for ActiveRecord emulation class GenericModel include Comparable attr_accessor :name def initialize(name) @name = name end def to_s @name end def <=>(other) @name <=> other.name end def self.find(what='', cond={}) if what == :all nil else self.new(what) end end def self.count(what='', cond={}) 0 end end