Sha256: 6ac79016578f52c7060b8bc8997c9fd6bc1d06202fe8b51f4b02ff3f8abe6313
Contents?: true
Size: 517 Bytes
Versions: 11
Compression:
Stored size: 517 Bytes
Contents
require 'rails_helper' describe "Memory Leak", type: :request, if: RUBY_ENGINE == 'ruby' do def count_instances_of(klass) ObjectSpace.each_object(klass) { } end [ActiveAdmin::Namespace, ActiveAdmin::Resource].each do |klass| it "should not leak #{klass}" do previously_disabled = GC.enable GC.start count = count_instances_of(klass) load_defaults! GC.start GC.disable if previously_disabled expect(count_instances_of klass).to be <= count end end end
Version data entries
11 entries across 11 versions & 3 rubygems