mocha 2.4.4 → 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: 0a8a30148d21664268060ffa4e5f81d0f604af97f57242abb58acbd30292f111
4
- data.tar.gz: cf698efc280a8ab7a1405934352f94902535321b102b1d4416c7e6fb01da5961
3
+ metadata.gz: ecd327fa9f38f70ce2c055060703fe7e946da3a435d858e3f7a4dfc84cf1869b
4
+ data.tar.gz: aa3f71bdd6b8934e9a6f02361daad1b304f88b33362c77511c1f2810becf255e
5
5
  SHA512:
6
- metadata.gz: 5a33373ad234b00171114c7515411411b1f304c2f570e4732fe3c667e0462cfc88ca18d013c65ad0dc1f6b5a1a87fba47a6bea6079113f44bd996cc8cfec3f50
7
- data.tar.gz: 66cb8130eebc14db769d8752357db57ee55809b25e61646270570f245f1821edd3ea5f11e37f2cb9734a2eca354a616683f1403bbf29c11d4d5c3685d933e261
6
+ metadata.gz: ed7c31bf9f39294a89338718f7139c4ce23883b18b628aa02c8e1ea585a244ed77e6e322db1352431f6d3fd29b01de0f1e39acf2164209633ad62fd18f8d919c
7
+ data.tar.gz: e1380ad00c76d152ca14865f02a9019f4c83e36ff8433182b164ae308b46319859e80a7583b7dd7f8c0269b4da4a36b5f5bd1af6a8404e8870df010bf0ea917a
data/RELEASE.md CHANGED
@@ -1,5 +1,11 @@
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
+
3
9
  ## 2.4.4
4
10
 
5
11
  ### External changes
@@ -39,7 +39,8 @@ module Mocha
39
39
  def matches?(available_parameters)
40
40
  parameter = available_parameters.shift
41
41
  return false unless parameter
42
- return false if @exact && @entries.length != parameter.length
42
+ return false unless parameter.respond_to?(:keys)
43
+ return false if @exact && @entries.length != parameter.keys.length
43
44
 
44
45
  has_entry_matchers = @entries.map { |key, value| HasEntry.new(key, value) }
45
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.4'.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.4
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-23 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