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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0a6496869e9518ad7b96e0618ee997db0f593545
4
- data.tar.gz: b975ea80a7855d3b8e596e94fb5e474efff707aa
3
+ metadata.gz: 9d95b80f9a64a43b6e1f0e95dcc4e2dfd0cfa1af
4
+ data.tar.gz: 7afd8be35cbcab028f3099e393c67dd762535b10
5
5
  SHA512:
6
- metadata.gz: 9142626323678bbaba0597848663d5c1fdf85f29920507246ce4d376a93f44adc1511f877c43ce7251270e9573c1d8d0b6324898a155d9e25912fe6b71ad0d90
7
- data.tar.gz: 610ed1c18c06411a1506884a13b73d6951d39c7d0035d9360d45d915df721c04676db5ad1257c28d4f2a111aa2629062934f83f3867bc3359dc86e76cfff8813
6
+ metadata.gz: 26f7c1f25f63e1af63acff047c324213d4c564c37e11f25210552ac3e5006026788b4ea74deeb8b84faf2e5faad4c92430c3b590437ae3f6e73d5ceefd54e6c7
7
+ data.tar.gz: b6946ee2b2fd09495f45b08977a44c22b1a91721b54092f5a1a16c4210886a5df876d3fe1792f305dca932e7448831c8acf1890908c338690777766d36455c4a
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,14 +1,18 @@
1
- ### 3.5.0 Development
2
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.5.0.beta1...master)
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)
@@ -2,7 +2,7 @@ module RSpec
2
2
  module Expectations
3
3
  # @private
4
4
  module Version
5
- STRING = '3.5.0.beta3'
5
+ STRING = '3.5.0.beta4'
6
6
  end
7
7
  end
8
8
  end
@@ -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
- def initialize(*expected)
9
- @expected = expected
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(expected)}")
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
- expected.inject([]) do |memo, expected_item|
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.beta3
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-04-02 00:00:00.000000000 Z
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.beta3
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.beta3
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.4.5.1
220
+ rubygems_version: 2.2.2
221
221
  signing_key:
222
222
  specification_version: 4
223
- summary: rspec-expectations-3.5.0.beta3
223
+ summary: rspec-expectations-3.5.0.beta4
224
224
  test_files: []
225
225
  has_rdoc:
metadata.gz.sig CHANGED
Binary file