sus 0.37.0 → 0.37.1

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: 13490197ec8a1933e204be63306d7073dc91031f91014540d2fb32f28a5a9fe8
4
- data.tar.gz: d95be355e8ee973b7c6873024dea1aca229ead1ca07ac32ee758c1c200cffa2c
3
+ metadata.gz: adb6aea1bd43dd00163501093a72b5e3ed4e599462248a7aacc4bd98732fd35e
4
+ data.tar.gz: 603c5afe02ea770e0826ab158b84543f4b64e2ece0de9c303b8efa22ab092812
5
5
  SHA512:
6
- metadata.gz: e7282096b713bbaf9b6e08839ccc8436c4660c4e2b913c08a9af6867b84ea518f0ba2366db46a67d30e81d20ce845a32dcfb4f13e1712fdc6aabe01e7f67b4af
7
- data.tar.gz: be1584808b3db0e3ef6bfc1c9d06c928ad0ca292244dd8a53633cc619107ac74604240d5fb916329654ac68df5033456e1802db28f9af308528341b17bf899c4
6
+ metadata.gz: 5c3b7d6b3a32c817fa0b4e473556a272acd573a41d3b0a54ff760208f9037944d8b6c07725e70d96399058cc9e0ae6cf25c3f4aa50714e06aeb5a3b1ecd3f436
7
+ data.tar.gz: 11e25dfb46c632ffe7f02ea0a3ccc63b8932749b58cba9564f8d465481b80db4d90504ab1db07e1648a31e7034cd32b99d3a2f9743a35d5032fa750faff2e366
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/sus/mock.rb CHANGED
@@ -90,8 +90,8 @@ module Sus
90
90
 
91
91
  @interceptor.define_method(method) do |*arguments, **options, &block|
92
92
  if execution_context == Thread.current
93
- original = proc do |*arguments, **options|
94
- super(*arguments, **options)
93
+ original = proc do |*arguments, **options, &block|
94
+ super(*arguments, **options, &block)
95
95
  end
96
96
 
97
97
  hook.call(original, *arguments, **options, &block)
data/lib/sus/receive.rb CHANGED
@@ -239,8 +239,7 @@ module Sus
239
239
  # @parameter subject [Proc, nil] The block to check.
240
240
  def call(assertions, subject)
241
241
  assertions.nested(self) do |assertions|
242
-
243
- Expect.new(assertions, subject).not.to(Be == nil)
242
+ Expect.new(assertions, subject).to(@predicate)
244
243
  end
245
244
  end
246
245
  end
data/lib/sus/version.rb CHANGED
@@ -5,5 +5,5 @@
5
5
 
6
6
  # @namespace
7
7
  module Sus
8
- VERSION = "0.37.0"
8
+ VERSION = "0.37.1"
9
9
  end
data/readme.md CHANGED
@@ -33,6 +33,10 @@ Please see the [project documentation](https://socketry.github.io/sus/) for more
33
33
 
34
34
  Please see the [project releases](https://socketry.github.io/sus/releases/index) for all releases.
35
35
 
36
+ ### v0.37.1
37
+
38
+ - Fixed `Sus::Mock#wrap` to forward blocks to the original method, and fixed `receive(...).with_block(...)` to use the supplied predicate.
39
+
36
40
  ### v0.37.0
37
41
 
38
42
  - Long values in verbose (and failure) output are now truncated to a configurable length (default 100 characters), preventing huge objects from flooding the output. Set the `SUS_OUTPUT_VARIABLE_TRUNCATION_LIMIT` environment variable to change the limit, or `0` to disable truncation.
data/releases.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Releases
2
2
 
3
+ ## v0.37.1
4
+
5
+ - Fixed `Sus::Mock#wrap` to forward blocks to the original method, and fixed `receive(...).with_block(...)` to use the supplied predicate.
6
+
3
7
  ## v0.37.0
4
8
 
5
9
  - Long values in verbose (and failure) output are now truncated to a configurable length (default 100 characters), preventing huge objects from flooding the output. Set the `SUS_OUTPUT_VARIABLE_TRUNCATION_LIMIT` environment variable to change the limit, or `0` to disable truncation.
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.37.0
4
+ version: 0.37.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file