 describe 'PodsList', ->
-  subject = null
   beforeEach (done) ->
-    subject = new SeedsStore('test')
-    expect(subject.clear()).eventually.notify(done)
+    @subject = new SeedsStore('test')
+    expect(@subject.clear()).eventually.notify(done)
   it 'counts 0', (done) ->
-    expect(subject.countForAll()).eventually.equal(0).notify(done)
+    expect(@subject.countForAll()).eventually.equal(0).notify(done)
   it 'counts n', (done) ->
-    subject.update([{name: 1},{name: 2},{name: 3}])
-    expect(subject.countForAll()).eventually.equal(3).notify(done)
+    @subject.update([{name: 1},{name: 2},{name: 3}])
+    expect(@subject.countForAll()).eventually.equal(3).notify(done)
   it 'readPod', (done) ->
-    subject.update([{name: 1}, {name: 2}])
-    expect(subject.readPod(1)).eventually.eql([{name: 1}]).notify(done)
+    @subject.update([{name: 1}, {name: 2}])
+    expect(@subject.readPod(1)).eventually.eql([{name: 1}]).notify(done)
   describe 'readsFromAll', ->
     listByName = ->
       [

        list = listByStars()
        sortOrderAsc = true
        it 'from the beginning', (done) ->
          expect(subject.readFromAll(sortBy, sortOrderAsc, 0, 1)).eventually
            .eql([list[0]]).notify(done)
        it 'in the middle', (done) ->
          expect(subject.readFromAll(sortBy, sortOrderAsc, 1, 2)).eventually
            .eql([list[1], list[2]]).notify(done)
        it 'beyond scope', (done) ->
          expect(subject.readFromAll(sortBy, sortOrderAsc, 5, 2)).eventually
            .eql([list[5]]).notify(done)
      describe 'desc', ->
        list = listByStars().reverse()
        sortOrderAsc = false
        it 'from the beginning', (done) ->
          expect(subject.readFromAll(sortBy, sortOrderAsc, 0, 1)).eventually
            .eql([list[0]]).notify(done)
        it 'in the middle', (done) ->
          expect(subject.readFromAll(sortBy, sortOrderAsc, 1, 2)).eventually
            .eql([list[1], list[2]]).notify(done)
        it 'beyond scope', (done) ->
          expect(subject.readFromAll(sortBy, sortOrderAsc, 5, 2)).eventually
            .eql([list[5]]).notify(done)


        list[3]
      ]
    beforeEach (done) ->
      expect(@subject.update(listByName()))
        .eventually.notify(done)
    describe 'name', ->
      sortBy = 'name'
