Sha256: 5dd73317c7713095dd0c8ed5b7af4b0ead9ccc087043fc41aed24630b298a1ad
Contents?: true
Size: 628 Bytes
Versions: 39
Compression:
Stored size: 628 Bytes
Contents
# This class was made to help test class agnostic engine functionality that # requires model interfaces to work. # # An example would be tests for polymorphic associations: # foo = Udongo::BogusModel.new(id: 37, description: 'foobar', hidden?: false) # create(:search_index, searchable: foo, locale: 'nl') class Udongo::BogusModel < OpenStruct attr_reader :id def self.base_class self.class end def self.primary_key :id end def _read_attribute(attribute) nil end def id @id = rand(1..1000) unless @id @id end def destroyed? false end def new_record? false end end
Version data entries
39 entries across 39 versions & 1 rubygems