From 902b6e2ca62875b757eaa575696f64f9da65028b Mon Sep 17 00:00:00 2001 From: "Abinoam P. Marques Jr" Date: Fri, 7 Jul 2017 05:13:07 -0300 Subject: Remove literal size computation (rubocop warning) --- test/test_highline.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/test_highline.rb b/test/test_highline.rb index 09b402c..94ab060 100755 --- a/test/test_highline.rb +++ b/test/test_highline.rb @@ -332,7 +332,9 @@ class TestHighLine < Minitest::Test q.echo = "*" end assert_equal("", answer) - assert_equal("apple".size, @output.string.count("\b")) + + # There's only enough backspaces to clear the given string + assert_equal(5, @output.string.count("\b")) end def test_after_some_chars_backspace_does_not_enter_prompt_when_utf8 @@ -342,7 +344,9 @@ class TestHighLine < Minitest::Test q.echo = "*" end assert_equal("", answer) - assert_equal("maçã".size, @output.string.count("\b")) + + # There's only enough backspaces to clear the given string + assert_equal(4, @output.string.count("\b")) end def test_readline_mode -- cgit v1.2.1