diff options
author | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-07-07 05:13:07 -0300 |
---|---|---|
committer | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-07-07 05:31:51 -0300 |
commit | 902b6e2ca62875b757eaa575696f64f9da65028b (patch) | |
tree | 66f95b0a2d7599fe77e572f5cc9312e7d3ca055a /test | |
parent | 0a14b32d7d8e6d163464dbbdab742843e2f85faf (diff) | |
download | highline-902b6e2ca62875b757eaa575696f64f9da65028b.tar.gz |
Remove literal size computation (rubocop warning)
Diffstat (limited to 'test')
-rwxr-xr-x | test/test_highline.rb | 8 |
1 files 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 |