From d0feff798d3126feb142824deed9d8676c448d81 Mon Sep 17 00:00:00 2001 From: sb-o <12798735+sb-o@users.noreply.github.com> Date: Tue, 19 Sep 2023 21:15:31 +0100 Subject: [PATCH] Implements test for when buffer is longer than max --- spec/options/buffer_max_size_spec.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/options/buffer_max_size_spec.rb b/spec/options/buffer_max_size_spec.rb index 29ca8bc..d380b0c 100644 --- a/spec/options/buffer_max_size_spec.rb +++ b/spec/options/buffer_max_size_spec.rb @@ -25,6 +25,10 @@ describe 'a suggestion' do wait_for { session.content }.to eq(long_command) end - it 'is not provided when the buffer is longer than the specified length' + it 'is not provided when the buffer is longer than the specified length' do + session.send_string(long_command[0...(buffer_max_size + 1)]) + sleep 1 + expect(session.content).to eq(long_command[0...(buffer_max_size + 1)]) + end end end