Sha256: 921f5bab5f2f8d7622b3473bdd83dd1d6d4a0c0d9b85cf7ce198c4dd0e9505ac

Contents?: true

Size: 460 Bytes

Versions: 4

Compression:

Stored size: 460 Bytes

Contents

covers 'facets/kernel/meta_class'

tests Kernel do

  unit :meta_class do
    x = Class.new
    m = (class << x; self; end)
    x.meta_class.assert == m
  end

  unit :metaclass => "non-underscored alias" do
    x = Class.new
    m = (class << x; self; end)
    x.metaclass.assert == m
  end

  unit :meta_class => "class_eval block on meta class" do
    c = Class.new
    c.meta_class do
      def foo; "foo"; end
    end
    c.foo.assert == "foo"
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
facets-2.9.1 test/core/kernel/test_meta_class.rb
facets-2.9.0 test/core/kernel/test_meta_class.rb
facets-2.9.0.pre.2 test/core/kernel/test_meta_class.rb
facets-2.9.0.pre.1 test/core/kernel/test_meta_class.rb