Skip to content
Snippets Groups Projects
Commit 0a3c98a7 authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files

Update tests for the fact that we would skip one line

parent b07b8a5f
No related branches found
No related tags found
No related merge requests found
Loading
@@ -17,12 +17,12 @@ describe Gitlab::Ci::Trace::Stream do
Loading
@@ -17,12 +17,12 @@ describe Gitlab::Ci::Trace::Stream do
describe '#limit' do describe '#limit' do
let(:stream) do let(:stream) do
described_class.new do described_class.new do
StringIO.new("12345678") StringIO.new((1..8).to_a.join("\n"))
end end
end end
   
it 'if size is larger we start from beginning' do it 'if size is larger we start from beginning' do
stream.limit(10) stream.limit(20)
   
expect(stream.tell).to eq(0) expect(stream.tell).to eq(0)
end end
Loading
@@ -30,7 +30,7 @@ describe Gitlab::Ci::Trace::Stream do
Loading
@@ -30,7 +30,7 @@ describe Gitlab::Ci::Trace::Stream do
it 'if size is smaller we start from the end' do it 'if size is smaller we start from the end' do
stream.limit(2) stream.limit(2)
   
expect(stream.tell).to eq(6) expect(stream.raw).to eq("8")
end end
   
context 'when the trace contains ANSI sequence and Unicode' do context 'when the trace contains ANSI sequence and Unicode' do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment