From 400e443a0a397e559250fa090b5c437e44d01bf8 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 22 Oct 2016 00:01:21 +0900 Subject: [PATCH] Make test cases less susceptible to timeout errors --- test/test_go.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_go.rb b/test/test_go.rb index dd132d3..f34d8b3 100644 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -136,8 +136,10 @@ class Tmux def prepare tries = 0 begin - self.send_keys 'C-u', 'hello', 'Right' - self.until { |lines| lines[-1].end_with?('hello') } + self.until do |lines| + self.send_keys 'C-u', 'hello' + lines[-1].end_with?('hello') + end rescue Exception (tries += 1) < 5 ? retry : raise end