Sha256: 330376cf79163651260533bf69d31eb5baab8845f71b0f7a01219578bcd79c47
Contents?: true
Size: 763 Bytes
Versions: 38
Compression:
Stored size: 763 Bytes
Contents
module Mocha class ObjectReceiver def initialize(object) @object = object end def mocks object = @object mocks = [] while object mocha = object.mocha(false) mocks << mocha if mocha object = object.is_a?(Class) ? object.superclass : nil end mocks end end class AnyInstanceReceiver def initialize(klass) @klass = klass end def mocks klass = @klass mocks = [] while klass mocha = klass.any_instance.mocha(false) mocks << mocha if mocha klass = klass.superclass end mocks end end class DefaultReceiver def initialize(mock) @mock = mock end def mocks [@mock] end end end
Version data entries
38 entries across 38 versions & 3 rubygems