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

    subject.update([{name: 1}, {name: 2}])
    expect(subject.readPod(1)).eventually.eql([{name: 1}]).notify(done)
  describe 'readsFromAll', ->
    listByName = [
      {name: 1, category: "a", stars: 1},
      {name: 2, category: "c", stars: 5},
      {name: 3, category: "b", stars: 4},
      {name: 4, category: "c", stars: 6},
      {name: 5, category: "c", stars: 3},
      {name: 6, category: "c", stars: 2}
    ]
    listByCategory = [
      listByName[0],
      listByName[2],
      listByName[1],
      listByName[3],
      listByName[4],
      listByName[5]
    ]
    listByStars = [
      listByName[0],
      listByName[5],
      listByName[4],
      listByName[2],
      listByName[1],
      listByName[3]
    ]
    beforeEach (done) ->
      expect(subject.update(listByName))
        .eventually.notify(done)
    describe 'name', ->
      list = listByName
      sortBy = 'name'
      describe 'asc', ->
        sortOrderAsc = true
        it 'from the beginning', (done) ->
          expect(subject.readFromAll(sortBy, sortOrderAsc, 0, 1)).eventually

          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)

