rspec-expectations 3.8.0 → 3.8.1

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
  SHA1:
3
- metadata.gz: c64b53ac0865670b12407e85b12dfef41a915675
4
- data.tar.gz: 72290b7d0bfa0774d0a75ba08c9c4f87b3684e9b
3
+ metadata.gz: 5737c19409b8e70dee4183a783d6d0e9c45154c6
4
+ data.tar.gz: 56dbd188a758b2d09d544f5f77038c563d05f206
5
5
  SHA512:
6
- metadata.gz: 9c98a819df168dca33a9a74275a8b8034d7670c22e9bf40cfa4c4e483fe0c78d1aba80ff6a846024153b8e31e60fcecfd3b8473ff12172bb58801cea842c921f
7
- data.tar.gz: 1901f329e2f9c3023e25a2bd198c0a5aa89efbbf40e33dbd25e31d56c5584bcd30472878fb07a19fa9ca24d743c7f6c60744081c76ab4aeb0081f73efaae5207
6
+ metadata.gz: 1af8946afaf9d3ea6e02ac7a2af209766fd31244b87d2f8dbc210f356b72e125d5c5e5e78b6b190991ce1652158502b93eb9ec75bfcfe9da605bdb269a9639ba
7
+ data.tar.gz: b0314509df480db80384b8bed96cb0d478e7518a824c502fe8828787b39b4e794afbd6fa64885ebcf36a10c22b881b824c773527a8a5a673e175230ed8a77cee
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,12 @@
1
+ ### 3.8.1 / 2018-08-06
2
+ [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.8.0...v3.8.1)
3
+
4
+ Bug Fixes:
5
+
6
+ * Fix regression in `include` matcher so stopped
7
+ `expect(hash.with_indifferent_access).to include(:symbol_key)`
8
+ from working. (Eito Katagiri, #1069)
9
+
1
10
  ### 3.8.0 / 2018-08-04
2
11
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.7.0...v3.8.0)
3
12
 
@@ -2,7 +2,7 @@ module RSpec
2
2
  module Expectations
3
3
  # @private
4
4
  module Version
5
- STRING = '3.8.0'
5
+ STRING = '3.8.1'
6
6
  end
7
7
  end
8
8
  end
@@ -15,14 +15,14 @@ module RSpec
15
15
  # @api private
16
16
  # @return [Boolean]
17
17
  def matches?(actual)
18
- actual = actual.to_hash if actual.respond_to?(:to_hash)
18
+ actual = actual.to_hash if convert_to_hash?(actual)
19
19
  perform_match(actual) { |v| v }
20
20
  end
21
21
 
22
22
  # @api private
23
23
  # @return [Boolean]
24
24
  def does_not_match?(actual)
25
- actual = actual.to_hash if actual.respond_to?(:to_hash)
25
+ actual = actual.to_hash if convert_to_hash?(actual)
26
26
  perform_match(actual) { |v| !v }
27
27
  end
28
28
 
@@ -139,6 +139,10 @@ module RSpec
139
139
  actual.include?(str) && lines.none? { |line| line == str }
140
140
  end
141
141
  end
142
+
143
+ def convert_to_hash?(obj)
144
+ !(::Hash === obj) && obj.respond_to?(:to_hash)
145
+ end
142
146
  end
143
147
  end
144
148
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-expectations
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.0
4
+ version: 3.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Baker
@@ -45,7 +45,7 @@ cert_chain:
45
45
  ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
46
46
  F3MdtaDehhjC
47
47
  -----END CERTIFICATE-----
48
- date: 2018-08-04 00:00:00.000000000 Z
48
+ date: 2018-08-07 00:00:00.000000000 Z
49
49
  dependencies:
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: rspec-support
@@ -221,5 +221,5 @@ rubyforge_project:
221
221
  rubygems_version: 2.6.13
222
222
  signing_key:
223
223
  specification_version: 4
224
- summary: rspec-expectations-3.8.0
224
+ summary: rspec-expectations-3.8.1
225
225
  test_files: []
metadata.gz.sig CHANGED
Binary file