Sha256: ff8645af437e6bdbf2cfac664fbf5d8fc76115800c0a86a88cfe8ab37d2ebab7

Contents?: true

Size: 649 Bytes

Versions: 2

Compression:

Stored size: 649 Bytes

Contents

describe "Class Hierarchy" do
  it "should have the right superclasses" do
    BasicObject.superclass.should == nil
    Object.superclass.should == BasicObject
    Module.superclass.should == Object
    Class.superclass.should == Module
  end

  it "should have the right classes" do
    BasicObject.class.should == Class
    Object.class.should == Class
    Class.class.should == Class
    Module.class.should == Class
  end

  it "instances should have the right class" do
    (BasicObject === BasicObject.new).should == true
    Object.new.class.should == Object
    Class.new.class.should == Class
    Module.new.class.should == Module
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
opal-0.3.20 test/opal/runtime/class_hierarchy_spec.rb
opal-0.3.19 test/opal/runtime/class_hierarchy_spec.rb