```coffeescript
require './setup'

db = null

describe 'api', ->
  afterEach ->
    Ento.object.api(undefined)

  describe 'mock', ->
    beforeEach ->
      db = { foo: 200 }
      Ento.object.api(db)

    it 'api is accessible in model', ->
      Model = Ento()
      expect(Model.api()).eql db

    it 'api is accessible in instance', ->
      Model = Ento()
      instance = new Model()
      expect(instance.api).eql db

    it 'modifying api in model', ->
      db2 = { foo: 300 }

      Model = Ento().api(db2)
      instance = new Model()
      expect(instance.api.foo).eql 300

    it "modifying api in model doesn't affect others", ->
      db2 = { foo: 300 }

      Other = Ento()
      Model = Ento().api(db2)
      instance = new Model()

      expect(new Other().api).eql db
      expect(new Model().api).eql db2
```

Add test for modifying the global API after subclassing.
user
```coffeescript
require './setup'

db = null

describe 'api', ->
  afterEach ->
    Ento.object.api(undefined)

  describe 'mock', ->
    beforeEach ->
      db = { foo: 200 }
      Ento.object.api(db)

    it 'api is accessible in model', ->
      Model = Ento()
      expect(Model.api()).eql db

    it 'api is accessible in instance', ->
      Model = Ento()
      instance = new Model()
      expect(instance.api).eql db

    it 'modifying api in model', ->
      db2 = { foo: 300 }

      Model = Ento().api(db2)
      instance = new Model()
      expect(instance.api.foo).eql 300

    it 'modifying the global API after subclassing', ->
      db2 = { foo: 300 }

      Model = Ento()
      Ento.object.api(db2)
      expect(Model.api()).eq db2

    it "modifying api in model doesn't affect others", ->
      db2 = { foo: 300 }

      Other = Ento()
      Model = Ento().api(db2)
      instance = new Model()

      expect(new Other().api).eql db
      expect(new Model().api).eql db2
```
assistant