spec/integration/memory_spec.rb in activeadmin-0.4.4 vs spec/integration/memory_spec.rb in activeadmin-0.5.0.pre

- old
+ new

@@ -4,24 +4,14 @@ # are all marked as pending until they pass. To work on them, comment out the # pending method call in #it_should_not_leak describe "Memory Leak" do def count_instances_of(klass) - count = 0 - - ObjectSpace.each_object do |o| - if o.class == klass - count += 1 - end - end - - count + ObjectSpace.each_object(klass) { } end def self.it_should_not_leak(klass) it "should not leak #{klass}" do - pending - GC.start count = count_instances_of(klass) load_defaults!