Sha256: 7a8a2d03b446c151a4db18dbff650fa83a4f4393b713cf237bdd49e452f2cee7

Contents?: true

Size: 410 Bytes

Versions: 5

Compression:

Stored size: 410 Bytes

Contents

covers 'facets/class/preallocate'

test_case Class do

  method :preallocate do

    setup do
      @c = Class.new do
        def f
          "f"
        end
      end

      @m = Module.new do
        def f
          '{' + super + '}'
        end
      end
    end

    test do
      m = @m
      @c.class_eval do
        preallocate m
      end
      x = @c.new
      x.f.assert == "{f}"
    end

  end

end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
facets-glimmer-3.2.0 test/core/class/test_preallocate.rb
facets-3.1.0 test/core/class/test_preallocate.rb
facets-3.0.0 test/core/class/test_preallocate.rb
facets-2.9.3 test/core/class/test_preallocate.rb
facets-2.9.2 test/core-uncommon/class/test_preallocate.rb