ttytest2 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/ttytest/matchers.rb +14 -0
- data/lib/ttytest/version.rb +1 -1
- data/notes.txt +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b9538d393117d0cc417fd097ce965cc0c84612e9c8c244a7462072568ae1f42
|
4
|
+
data.tar.gz: c88ea611163de40b6047faea181a573e767e6e68a3644143a0e4e00dc3401448
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86fa0a0862a158102d08c9d05df218927dee91bf49c73176d1f7979136c626b10496e02af55085f30e336492d1aad3884da8690d908868ed3bfb8b92f179172e
|
7
|
+
data.tar.gz: f2a16dcae9a58b970659e7a5181ba4dfad50b106bdf5efb057cc1ff3ccccc3712c7d7ded8edb49ed10102279244e7059ebd4c02b5d66940fa888fde4bc279fb6
|
data/README.md
CHANGED
@@ -104,6 +104,8 @@ Available assertions:
|
|
104
104
|
|
105
105
|
* `assert_row(row_number, expected_text)`
|
106
106
|
|
107
|
+
* `assert_row_is_empty(row_number)`
|
108
|
+
|
107
109
|
* `assert_row_at(row_number, column_start_position, column_end_position, expected_text)`
|
108
110
|
|
109
111
|
* `assert_row_like(row_number, expected_text)`
|
data/lib/ttytest/matchers.rb
CHANGED
@@ -17,6 +17,20 @@ module TTYtest
|
|
17
17
|
"expected row #{row_number} to be #{expected.inspect} but got #{actual.inspect}\nEntire screen:\n#{self}"
|
18
18
|
end
|
19
19
|
|
20
|
+
def assert_last_row(expected)
|
21
|
+
end
|
22
|
+
|
23
|
+
# Asserts the specified row is empty
|
24
|
+
# @param [Integer] row_number the row (starting from 0) to test against
|
25
|
+
# @raise [MatchError] if the row isn't empty
|
26
|
+
def assert_row_is_empty(row_number)
|
27
|
+
actual = row(row_number)
|
28
|
+
|
29
|
+
return if actual == ''
|
30
|
+
|
31
|
+
raise MatchError, "expected row #{row_number} to be empty but got #{actual.inspect}\nEntire screen:\n#{self}"
|
32
|
+
end
|
33
|
+
|
20
34
|
# Asserts the contents of a single row contains the expected string at a specific position
|
21
35
|
# @param [Integer] row_number the row (starting from 0) to test against
|
22
36
|
# @param [Integer] column_start the column position to start comparing expected against
|
data/lib/ttytest/version.rb
CHANGED
data/notes.txt
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ttytest2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Eski
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|