     describe 'mro', ->
 
         it 'generates empty linearization for arbitrary object', ->
-            expect(mro {}).to.eql []
+            (mro {}).should.eql []
 
         it 'generates empty linearization for null object', ->
-            expect(mro undefined).to.eql []
-            expect(mro null).to.eql []
+            (mro undefined).should.eql []
+            (mro null).should.eql []
 
         it 'generates a monotonic linearization', ->
-            expect(mro Pedalo).to.eql [
+            (mro Pedalo).should.eql [
                 Pedalo, PedalWheelBoat, EngineLess, SmallCatamaran,
                 SmallMultiHull, DayBoat, WheelBoat, Boat, Object]
 
         it 'respects local precedence', ->
-            expect(mro NewPopupMenu).to.eql [
+            (mro NewPopupMenu).should.eql [
                 NewPopupMenu, Menu, PopupMixin, ChoiceWidget, Object]
 
         it 'respects the extended precedence graph', ->
-            expect(mro EditableScrollablePane).to.eql [
+            (mro EditableScrollablePane).should.eql [
                 EditableScrollablePane, ScrollablePane, EditablePane,
                 Pane, ScrollingMixin, EditingMixin, Object ]
 

# Most test heterarchies are taken from the [original C3
# paper](http://192.220.96.201/dylan/linearization-oopsla96.html)

{expect} = require 'chai'

describe 'heterarchy', ->



        it 'calls super properly in multi case', ->
            obj = new D
            (mro D).should.eql [D, B, C, A, Object]
            obj.method().should.equal "D>B>C>A"

        it 'calls super properly in recursive multi case', ->
            obj = new G
            (mro G).should.eql [G, D, B, F, C, E, A, Object]
            obj.method().should.equal "G>D>B>F>C>E>A"

        it 'gets constructed properly', ->
            obj = new D
            obj.d .should.equal 'd'
            obj.c .should.equal 'c'
            obj.b .should.equal 'b'
            obj.a .should.equal 'a'

        it 'can generates the original hierarchy when possible', ->
            (hierarchy D).should.not.eql mro D
            (hierarchy inherited D).should.not.eql mro(D)[1..]
            (hierarchy inherited inherited D).should.eql mro(D)[2..]

        it 'it memoizes generated superclasses', ->
            (inherited D).should.equal multi B, C

        it 'throws error on inconsistent hierarchy', ->
            (-> multi D, C, B)
                .should.throw "Inconsistent multiple inheritance"

        it 'makes sure the next constructor after a root class', ->
            obj = new Deriv
            obj.base1 .should.equal 'base1'
            obj.base2 .should.equal 'base2'
            obj.deriv .should.equal 'deriv'

    describe 'isinstance', ->

        it 'checks the classes of an object even with multiple inheritance', ->
            (isinstance new D, D).should.be.true
            (isinstance new D, B).should.be.true
            (isinstance new D, C).should.be.true
            (isinstance new D, A).should.be.true
            (isinstance new D, Object).should.be.true
            (isinstance new A, Object).should.be.true
            (isinstance new Object, A).should.be.false
            (isinstance new Pedalo, D).should.be.false
            (isinstance new Pedalo, A).should.be.false
            (isinstance new Pedalo, SmallCatamaran).should.be.true

    describe 'issubclass', ->

        it 'checks the relationships of classes even with multiple inheritance', ->
            (issubclass D, D).should.be.true
            (issubclass D, B).should.be.true
            (issubclass D, C).should.be.true
            (issubclass D, A).should.be.true
            (issubclass D, Object).should.be.true
            (issubclass A, Object).should.be.true
            (issubclass Object, A).should.be.false
            (issubclass Pedalo, D).should.be.false
            (issubclass Pedalo, A).should.be.false
            (issubclass Pedalo, SmallCatamaran).should.be.true

# License
# -------
