summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbinoam P. Marques Jr <abinoam@gmail.com>2017-07-07 05:13:07 -0300
committerAbinoam P. Marques Jr <abinoam@gmail.com>2017-07-07 05:31:51 -0300
commit902b6e2ca62875b757eaa575696f64f9da65028b (patch)
tree66f95b0a2d7599fe77e572f5cc9312e7d3ca055a
parent0a14b32d7d8e6d163464dbbdab742843e2f85faf (diff)
downloadhighline-902b6e2ca62875b757eaa575696f64f9da65028b.tar.gz
Remove literal size computation (rubocop warning)
-rwxr-xr-xtest/test_highline.rb8
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