ex_aequo_rspex 0.2.1 → 0.2.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: df01d856c681dd99658fe9134462464a8e3c35806b681132abc4e26bb6aaed98
|
|
4
|
+
data.tar.gz: a523268739cf70aa0c665066610129168015d85ccef6d78b01146f5b671774fe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2a1f5fa8fc018c52353c93913ef6a5cc6a379b914f68df5ff470f934f62889ca951d7adf4debec2788fe45b3944ed081fcd317d7d4b5bbd4f0ec999e615830e5
|
|
7
|
+
data.tar.gz: 3783bef7e4a258a331451b349658014428d340b50b5e5d6649d59e5d7f53e3a293c5663a15c74e2204920d8dc10846e9ba44f8e6367f36d97c1ec8afcc3823a0
|
|
@@ -31,7 +31,7 @@ module ExAequo
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
def it_is_false(&blk) = it_equals(false, &blk)
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
def it_is_falsy(&blk)
|
|
36
36
|
actual = blk ? instance_eval(&blk) : subject
|
|
37
37
|
expect(actual).to be_falsy
|
|
@@ -51,6 +51,22 @@ module ExAequo
|
|
|
51
51
|
expect(actual).not_to send("be_#{predicate}", *args)
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
+
def it_has_same_lines(expected, &blk)
|
|
55
|
+
actual = blk ? instance_eval(&blk) : subject
|
|
56
|
+
|
|
57
|
+
actual = actual.lines(chomp: true) if String === actual
|
|
58
|
+
expected = expected.lines(chomp: true) if String === expected
|
|
59
|
+
|
|
60
|
+
actual.each.with_index do |line, idx|
|
|
61
|
+
expect(line:, idx:).to eq(line: expected[idx], idx:)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
missing = expected.drop(actual.length)
|
|
65
|
+
missing.each do
|
|
66
|
+
expect(it).to be_nil, "#{it} is missing in actual result"
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
54
70
|
def it_matches(matcher, &blk)
|
|
55
71
|
actual = blk ? instance_eval(&blk) : subject
|
|
56
72
|
expect(actual).to match(matcher)
|