mocha 2.4.3 → 2.4.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 20b26576ac50c2162b416a544a08067d42398349077ac592e8e1f950497f8fbd
4
- data.tar.gz: d587d5707e1a636734571b94935a450848303248f232e1d1cab9f4c0ba971460
3
+ metadata.gz: ecd327fa9f38f70ce2c055060703fe7e946da3a435d858e3f7a4dfc84cf1869b
4
+ data.tar.gz: aa3f71bdd6b8934e9a6f02361daad1b304f88b33362c77511c1f2810becf255e
5
5
  SHA512:
6
- metadata.gz: eaa8c9e311cdced9c27bda88ce59e14929e8533c9dbb87913c32ccf4432b499ce28c340c31d4d725bc703419c5c5a3fcf8ef241ab47539ccb4adc224cea3738c
7
- data.tar.gz: e7088d55909895d76db07023f58342913b558cfc8d628779d51b1b46b6132a52f6f6f60ea50b147cc120d7b5a5b1c046567beeb91f272b5701665cd22bc65f83
6
+ metadata.gz: ed7c31bf9f39294a89338718f7139c4ce23883b18b628aa02c8e1ea585a244ed77e6e322db1352431f6d3fd29b01de0f1e39acf2164209633ad62fd18f8d919c
7
+ data.tar.gz: e1380ad00c76d152ca14865f02a9019f4c83e36ff8433182b164ae308b46319859e80a7583b7dd7f8c0269b4da4a36b5f5bd1af6a8404e8870df010bf0ea917a
data/RELEASE.md CHANGED
@@ -1,10 +1,22 @@
1
1
  # Release Notes
2
2
 
3
+ ## 2.4.5
4
+
5
+ ### External changes
6
+
7
+ * Fix regression when stubbed method expects `Hash` but receives `ActionController::Parameters` object (#662, #664) - thanks to @evgeni for reporting and testing
8
+
9
+ ## 2.4.4
10
+
11
+ ### External changes
12
+
13
+ * Fix regression when method expecting `Hash` parameter or keyword arguments is invoked with no arguments (#662, #663) - thanks to @vlad-pisanov for reporting
14
+
3
15
  ## 2.4.3
4
16
 
5
17
  ### External changes
6
18
 
7
- * Fix regression when matching Hash parameter or keyword arguments (#657, #660) - thanks to @josesei for reporting and testing
19
+ * Fix regression when matching `Hash` parameter or keyword arguments (#657, #660) - thanks to @josesei for reporting and testing
8
20
 
9
21
  ## 2.4.2
10
22
 
@@ -38,7 +38,9 @@ module Mocha
38
38
  # @private
39
39
  def matches?(available_parameters)
40
40
  parameter = available_parameters.shift
41
- return false if @exact && @entries.length != parameter.length
41
+ return false unless parameter
42
+ return false unless parameter.respond_to?(:keys)
43
+ return false if @exact && @entries.length != parameter.keys.length
42
44
 
43
45
  has_entry_matchers = @entries.map { |key, value| HasEntry.new(key, value) }
44
46
  AllOf.new(*has_entry_matchers).matches?([parameter])
data/lib/mocha/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mocha
2
- VERSION = '2.4.3'.freeze
2
+ VERSION = '2.4.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mocha
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.3
4
+ version: 2.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Mead
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-22 00:00:00.000000000 Z
11
+ date: 2024-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby2_keywords