                     segments.push s
 
             injector.once "finish", ->
-                expect(segments.length).to.eql 3
+                expect(segments.length).to.be.eql 3
                 expect( Number(segments[1].ts) - Number(segments[0].ts) ).to.eql segment_duration
 
                 done()

                    segments.push s

            injector.once "finish", ->
                expect(segments.length).to.eql 3
                expect( Number(segments[0].ts) - Number(segments[1].ts) ).to.eql segment_duration

                done()

                generator.end()

        it "emits mixed segments when given mixed data", (done) ->
            segments = []
            injector.on "readable", ->
                while s = injector.read()
                    segments.push s

            injector.once "finish", ->
                expect(segments).to.have.length.within 6,7

                # sort by ts
                segments = _(segments).sortBy (s) -> Number(s.ts)
