rspec-expectations 3.5.0.beta3 → 3.5.0.beta4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Changelog.md +24 -8
- data/lib/rspec/expectations/version.rb +1 -1
- data/lib/rspec/matchers/built_in/include.rb +17 -4
- metadata +6 -6
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d95b80f9a64a43b6e1f0e95dcc4e2dfd0cfa1af
|
4
|
+
data.tar.gz: 7afd8be35cbcab028f3099e393c67dd762535b10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26f7c1f25f63e1af63acff047c324213d4c564c37e11f25210552ac3e5006026788b4ea74deeb8b84faf2e5faad4c92430c3b590437ae3f6e73d5ceefd54e6c7
|
7
|
+
data.tar.gz: b6946ee2b2fd09495f45b08977a44c22b1a91721b54092f5a1a16c4210886a5df876d3fe1792f305dca932e7448831c8acf1890908c338690777766d36455c4a
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,14 +1,18 @@
|
|
1
|
-
### 3.5
|
2
|
-
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.5.0.
|
1
|
+
### 3.5 Development
|
2
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.5.0.beta4...master)
|
3
|
+
|
4
|
+
### 3.5.0.beta4 / 2016-06-05
|
5
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.5.0.beta3...v3.5.0.beta4)
|
6
|
+
|
7
|
+
Bug Fixes:
|
8
|
+
|
9
|
+
* Fix `include` matcher so that it provides a valid diff for hashes. (Yuji Nakayama, #916)
|
10
|
+
|
11
|
+
### 3.5.0.beta3 / 2016-04-02
|
12
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.5.0.beta2...v3.5.0.beta3)
|
3
13
|
|
4
14
|
Enhancements:
|
5
15
|
|
6
|
-
* Add the ability to raise an error on encountering false positives via
|
7
|
-
`RSpec::Configuration#on_potential_false_positives = :raise`. (Jon Rowe, #900)
|
8
|
-
* When using the custom matcher DSL, support new
|
9
|
-
`notify_expectation_failures: true` option for the `match` method to
|
10
|
-
allow expectation failures to be raised as normal instead of being
|
11
|
-
converted into a `false` return value for `matches?`. (Jon Rowe, #892)
|
12
16
|
* Make `rspec/expectations/minitest_integration` work on Minitest::Spec
|
13
17
|
5.6+. (Myron Marston, #904)
|
14
18
|
* Add an alias `having_attributes` for `have_attributes` matcher.
|
@@ -16,6 +20,18 @@ Enhancements:
|
|
16
20
|
* Improve `change` matcher error message when block is mis-used.
|
17
21
|
(Alex Altair, #908)
|
18
22
|
|
23
|
+
### 3.5.0.beta2 / 2016-03-10
|
24
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.5.0.beta1...v3.5.0.beta2)
|
25
|
+
|
26
|
+
Enhancements:
|
27
|
+
|
28
|
+
* Add the ability to raise an error on encountering false positives via
|
29
|
+
`RSpec::Configuration#on_potential_false_positives = :raise`. (Jon Rowe, #900)
|
30
|
+
* When using the custom matcher DSL, support new
|
31
|
+
`notify_expectation_failures: true` option for the `match` method to
|
32
|
+
allow expectation failures to be raised as normal instead of being
|
33
|
+
converted into a `false` return value for `matches?`. (Jon Rowe, #892)
|
34
|
+
|
19
35
|
Bug Fixes:
|
20
36
|
|
21
37
|
* Allow `should` deprecation check to work on `BasicObject`s. (James Coleman, #898)
|
@@ -5,8 +5,11 @@ module RSpec
|
|
5
5
|
# Provides the implementation for `include`.
|
6
6
|
# Not intended to be instantiated directly.
|
7
7
|
class Include < BaseMatcher
|
8
|
-
|
9
|
-
|
8
|
+
# @private
|
9
|
+
attr_reader :expecteds
|
10
|
+
|
11
|
+
def initialize(*expecteds)
|
12
|
+
@expecteds = expecteds
|
10
13
|
end
|
11
14
|
|
12
15
|
# @api private
|
@@ -24,7 +27,7 @@ module RSpec
|
|
24
27
|
# @api private
|
25
28
|
# @return [String]
|
26
29
|
def description
|
27
|
-
improve_hash_formatting("include#{readable_list_of(
|
30
|
+
improve_hash_formatting("include#{readable_list_of(expecteds)}")
|
28
31
|
end
|
29
32
|
|
30
33
|
# @api private
|
@@ -45,6 +48,16 @@ module RSpec
|
|
45
48
|
!diff_would_wrongly_highlight_matched_item?
|
46
49
|
end
|
47
50
|
|
51
|
+
# @api private
|
52
|
+
# @return [Array, Hash]
|
53
|
+
def expected
|
54
|
+
if expecteds.one? && Hash === expecteds.first
|
55
|
+
expecteds.first
|
56
|
+
else
|
57
|
+
expecteds
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
48
61
|
private
|
49
62
|
|
50
63
|
def format_failure_message(preposition)
|
@@ -73,7 +86,7 @@ module RSpec
|
|
73
86
|
def excluded_from_actual
|
74
87
|
return [] unless @actual.respond_to?(:include?)
|
75
88
|
|
76
|
-
|
89
|
+
expecteds.inject([]) do |memo, expected_item|
|
77
90
|
if comparing_hash_to_a_subset?(expected_item)
|
78
91
|
expected_item.each do |(key, value)|
|
79
92
|
memo << { key => value } unless yield actual_hash_includes?(key, value)
|
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.5.0.
|
4
|
+
version: 3.5.0.beta4
|
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: 2016-
|
48
|
+
date: 2016-06-05 00:00:00.000000000 Z
|
49
49
|
dependencies:
|
50
50
|
- !ruby/object:Gem::Dependency
|
51
51
|
name: rspec-support
|
@@ -53,14 +53,14 @@ dependencies:
|
|
53
53
|
requirements:
|
54
54
|
- - '='
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 3.5.0.
|
56
|
+
version: 3.5.0.beta4
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - '='
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 3.5.0.
|
63
|
+
version: 3.5.0.beta4
|
64
64
|
- !ruby/object:Gem::Dependency
|
65
65
|
name: diff-lcs
|
66
66
|
requirement: !ruby/object:Gem::Requirement
|
@@ -217,9 +217,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
217
217
|
version: 1.3.1
|
218
218
|
requirements: []
|
219
219
|
rubyforge_project:
|
220
|
-
rubygems_version: 2.
|
220
|
+
rubygems_version: 2.2.2
|
221
221
|
signing_key:
|
222
222
|
specification_version: 4
|
223
|
-
summary: rspec-expectations-3.5.0.
|
223
|
+
summary: rspec-expectations-3.5.0.beta4
|
224
224
|
test_files: []
|
225
225
|
has_rdoc:
|
metadata.gz.sig
CHANGED
Binary file
|