Sha256: dfbc9c2eabb95e406f936f411b045404bef182352e129e3e857e0f3795db8d81

Contents?: true

Size: 649 Bytes

Versions: 47

Compression:

Stored size: 649 Bytes

Contents

require 'spec_helper'

# These tests show the memory leak that is currently in Active Admin. They
# 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)
    ObjectSpace.each_object(klass) { }
  end

  def self.it_should_not_leak(klass)
    it "should not leak #{klass}" do
      GC.start

      count = count_instances_of(klass)

      load_defaults!
      GC.start

      count_instances_of(klass).should <= count
    end
  end

  it_should_not_leak ActiveAdmin::Namespace
  it_should_not_leak ActiveAdmin::Resource

end

Version data entries

47 entries across 47 versions & 2 rubygems

Version Path
lalala-4.0.0.dev.141 vendor/deps/active_admin/spec/integration/memory_spec.rb
lalala-4.0.0.dev.136 vendor/deps/active_admin/spec/integration/memory_spec.rb
lalala-4.0.0.dev.135 vendor/deps/active_admin/spec/integration/memory_spec.rb
lalala-4.0.0.dev.134 vendor/deps/active_admin/spec/integration/memory_spec.rb
lalala-4.0.0.dev.133 vendor/deps/active_admin/spec/integration/memory_spec.rb
lalala-4.0.0.dev.132 vendor/deps/active_admin/spec/integration/memory_spec.rb
lalala-4.0.0.dev.131 vendor/deps/active_admin/spec/integration/memory_spec.rb
lalala-4.0.0.dev.129 vendor/deps/active_admin/spec/integration/memory_spec.rb
lalala-4.0.0.dev.128 vendor/deps/active_admin/spec/integration/memory_spec.rb
lalala-4.0.0.dev.126 vendor/deps/active_admin/spec/integration/memory_spec.rb
lalala-4.0.0.dev.125 vendor/deps/active_admin/spec/integration/memory_spec.rb
lalala-4.0.0.dev.124 vendor/deps/active_admin/spec/integration/memory_spec.rb
lalala-4.0.0.dev.123 vendor/deps/active_admin/spec/integration/memory_spec.rb
lalala-4.0.0.dev.118 vendor/deps/active_admin/spec/integration/memory_spec.rb
lalala-4.0.0.dev.116 vendor/deps/active_admin/spec/integration/memory_spec.rb
lalala-4.0.0.dev.114 vendor/deps/active_admin/spec/integration/memory_spec.rb
lalala-4.0.0.dev.113 vendor/deps/active_admin/spec/integration/memory_spec.rb
lalala-4.0.0.dev.111 vendor/deps/active_admin/spec/integration/memory_spec.rb
lalala-4.0.0.dev.109 vendor/deps/active_admin/spec/integration/memory_spec.rb
lalala-4.0.0.dev.107 vendor/deps/active_admin/spec/integration/memory_spec.rb