sus 0.20.0 → 0.20.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
- checksums.yaml.gz.sig +0 -0
- data/lib/sus/assertions.rb +8 -9
- data/lib/sus/raise_exception.rb +1 -1
- data/lib/sus/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abff2f6428b5b2a3b86b3ad54d32d73f9b78bf58cd1f81bf010cc7593e1c4bc2
|
4
|
+
data.tar.gz: 4fb6c173ac38b1c2e2053867d7f8ec768a9cfdd90ddfa8db366ef4af799a3211
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23f742731558ca0bb9b3a2a09bc3fb01a6f5d8fb2af4309c41d750866f3e3a9f25be059f1c186670132b1eeafb7896d40262cec04c20d0f8c41e2b73b9255136
|
7
|
+
data.tar.gz: e1e4ba8a789c2ca7c1c8391e975499185a0860afc738c3fc0b94dc380c3d22434daef20a0992a07179740f5568afb88a0dda4ef97c1485e96af56ac67d2cce57
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/sus/assertions.rb
CHANGED
@@ -147,13 +147,13 @@ module Sus
|
|
147
147
|
end
|
148
148
|
|
149
149
|
class Assert
|
150
|
-
def initialize(identity,
|
150
|
+
def initialize(identity, assertions)
|
151
151
|
@identity = identity
|
152
|
-
@
|
152
|
+
@assertions = assertions
|
153
153
|
end
|
154
154
|
|
155
155
|
attr :identity
|
156
|
-
attr :
|
156
|
+
attr :assertions
|
157
157
|
|
158
158
|
def each_failure(&block)
|
159
159
|
yield self
|
@@ -161,7 +161,7 @@ module Sus
|
|
161
161
|
|
162
162
|
def message
|
163
163
|
{
|
164
|
-
text:
|
164
|
+
text: assertions.output.string,
|
165
165
|
location: @identity&.to_location
|
166
166
|
}
|
167
167
|
end
|
@@ -170,21 +170,20 @@ module Sus
|
|
170
170
|
def assert(condition, message = nil)
|
171
171
|
@count += 1
|
172
172
|
|
173
|
-
message ||= self.output.string
|
174
173
|
backtrace = Output::Backtrace.first(@identity)
|
175
174
|
identity = @identity&.scoped
|
176
175
|
|
177
176
|
if condition
|
178
|
-
@passed << Assert.new(identity,
|
177
|
+
@passed << Assert.new(identity, self)
|
179
178
|
|
180
179
|
if !@orientation || @verbose
|
181
|
-
@output.puts(:indent, *pass_prefix, message, backtrace)
|
180
|
+
@output.puts(:indent, *pass_prefix, message || "assertion passed", backtrace)
|
182
181
|
end
|
183
182
|
else
|
184
|
-
@failed << Assert.new(identity,
|
183
|
+
@failed << Assert.new(identity, self)
|
185
184
|
|
186
185
|
if @orientation || @verbose
|
187
|
-
@output.puts(:indent, *fail_prefix, message, backtrace)
|
186
|
+
@output.puts(:indent, *fail_prefix, message || "assertion failed", backtrace)
|
188
187
|
end
|
189
188
|
end
|
190
189
|
end
|
data/lib/sus/raise_exception.rb
CHANGED
data/lib/sus/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.20.
|
4
|
+
version: 0.20.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -38,7 +38,7 @@ cert_chain:
|
|
38
38
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
39
39
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
40
40
|
-----END CERTIFICATE-----
|
41
|
-
date: 2023-
|
41
|
+
date: 2023-03-01 00:00:00.000000000 Z
|
42
42
|
dependencies:
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: bake-test
|
metadata.gz.sig
CHANGED
Binary file
|