Sha256: 1256a0a003b0bef2deecfd816dae5ad00e0aa396cfabc49a4175f45734dfba7f

Contents?: true

Size: 714 Bytes

Versions: 3

Compression:

Stored size: 714 Bytes

Contents

require 'spec_helper'
require 'tempfile'

describe IO do
    describe '#tail' do
        it 'returns the specified amount of lines from the bottom of an IO stream' do
            Tempfile.open( 'w' ) do |f|
                f.write <<-EOSTR
                    Test
                    Test2
                    Test3
                    Test4
                    Test5
                EOSTR
                f.flush

                expect(f.tail( 4 )).to eq([
                    '                    Test2',
                    '                    Test3',
                    '                    Test4',
                    '                    Test5'
                ])
            end
        end
    end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
arachni-1.3.2 spec/arachni/ruby/io_spec.rb
arachni-1.3.1 spec/arachni/ruby/io_spec.rb
arachni-1.3 spec/arachni/ruby/io_spec.rb