Browse code

Upgrade to ttytest 0.3.0

John Hawthorn authored on 29/12/2016 10:27:18
Showing 2 changed files

... ...
@@ -2,7 +2,7 @@ GEM
2 2
   remote: https://rubygems.org/
3 3
   specs:
4 4
     minitest (5.10.1)
5
-    ttytest (0.2.0)
5
+    ttytest (0.3.0)
6 6
 
7 7
 PLATFORMS
8 8
   ruby
... ...
@@ -12,7 +12,7 @@ class FzyTest < Minitest::Test
12 12
   end
13 13
 
14 14
   def test_empty_list
15
-    @tty = TTYtest.driver.new_terminal(%{echo placeholder;echo -n "" | #{FZY_PATH}})
15
+    @tty = TTYtest.new_terminal(%{echo placeholder;echo -n "" | #{FZY_PATH}})
16 16
     @tty.assert_row(0, 'placeholder')
17 17
     @tty.assert_row(1, '>')
18 18
     @tty.assert_row(2, '')
... ...
@@ -37,7 +37,7 @@ class FzyTest < Minitest::Test
37 37
   end
38 38
 
39 39
   def test_one_item
40
-    @tty = TTYtest.driver.new_terminal(%{echo placeholder;echo -n "test" | #{FZY_PATH}})
40
+    @tty = TTYtest.new_terminal(%{echo placeholder;echo -n "test" | #{FZY_PATH}})
41 41
     @tty.assert_row(0, 'placeholder')
42 42
     @tty.assert_row(1, '>')
43 43
     @tty.assert_row(2, 'test')
... ...
@@ -65,7 +65,7 @@ class FzyTest < Minitest::Test
65 65
   end
66 66
 
67 67
   def test_two_items
68
-    @tty = TTYtest.driver.new_terminal(%{echo placeholder;echo -n "test\nfoo" | #{FZY_PATH}})
68
+    @tty = TTYtest.new_terminal(%{echo placeholder;echo -n "test\nfoo" | #{FZY_PATH}})
69 69
     @tty.assert_row(0, 'placeholder')
70 70
     @tty.assert_row(1, '>')
71 71
     @tty.assert_row(2, 'test')
... ...
@@ -98,7 +98,7 @@ class FzyTest < Minitest::Test
98 98
   end
99 99
 
100 100
   def test_editing
101
-    @tty = TTYtest.driver.new_terminal(%{echo placeholder;echo -n "test\nfoo" | #{FZY_PATH}})
101
+    @tty = TTYtest.new_terminal(%{echo placeholder;echo -n "test\nfoo" | #{FZY_PATH}})
102 102
     @tty.assert_row(0, 'placeholder')
103 103
     @tty.assert_row(1, '>')
104 104
     @tty.assert_cursor_position(y: 1, x: 2)
... ...
@@ -125,7 +125,7 @@ class FzyTest < Minitest::Test
125 125
   end
126 126
 
127 127
   def test_ctrl_d
128
-    @tty = TTYtest.driver.new_terminal(%{echo -n "foo\nbar" | #{FZY_PATH}})
128
+    @tty = TTYtest.new_terminal(%{echo -n "foo\nbar" | #{FZY_PATH}})
129 129
     @tty.assert_row(0, '>')
130 130
 
131 131
     @tty.send_keys('foo')
... ...
@@ -139,7 +139,7 @@ class FzyTest < Minitest::Test
139 139
   end
140 140
 
141 141
   def test_ctrl_c
142
-    @tty = TTYtest.driver.new_terminal(%{echo -n "foo\nbar" | #{FZY_PATH}})
142
+    @tty = TTYtest.new_terminal(%{echo -n "foo\nbar" | #{FZY_PATH}})
143 143
     @tty.assert_row(0, '>')
144 144
 
145 145
     @tty.send_keys('foo')