Sha256: a8ce77b4c80d3861be050f1f981ec7b8c0c7f3a547a01a2a8e8fdc15c03d9f2a

Contents?: true

Size: 338 Bytes

Versions: 2

Compression:

Stored size: 338 Bytes

Contents

module MotionResource
  module SpecHelpers
    def self.extended(base)
      base.after do
        forget_instances_of(MotionResource::Base)
      end
    end
    
    def forget_instances_of(klass)
      klass.identity_map.clear
      klass.subclasses.each do |subklass|
        forget_instances_of(subklass)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
motion-resource-0.1.0 lib/motion-resource/spec_helpers.rb
motion-resource-0.0.2 lib/motion-resource/spec_helpers.rb