rspec-expectations 3.0.3 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b63a1c9a9ef47104ac9e590f2bf2c36fe5a5222
4
- data.tar.gz: 9cb49a6e9f9dd9c0b4d6468d4a0833c2f39d4f46
3
+ metadata.gz: effc74da27b6c9c3e1848c1aa153d7cb9bb2741f
4
+ data.tar.gz: 273bbb72209bc00f42208e6afbd429e557989229
5
5
  SHA512:
6
- metadata.gz: b63f7dbcf9ff4cc5657fa3cabe7fb7c75f99d199fbafccf447f0d096fc9be7aec12b241f3b3c6a06985449bd4baa61114590265a4dc50111e579e48eae89f2f3
7
- data.tar.gz: 9ea99df5cf9d15fb61683e5e194508e3dd38475966c478ac157695c6615c30c92480a8e91256b4153a65e5d8a03c6ba59d85b92014572632b31487a8fdb4f03d
6
+ metadata.gz: ffda9a9a4e44c478f14a87750353a98ef006a7797d82d45cc86606e9a8ba3affffd45aa095195258808417afb6a8012a8c9698b21fc6f0f0c3051e6c72b9d956
7
+ data.tar.gz: da81d97b60f639f6bf33f6d4a14ec76f8f4e6113844753d4cc8829e09cd5c13beeec25a7bf40ed7c7039f43730289cf91ad5d54e77dfc53c0a9c7433382cc746
@@ -1 +1 @@
1
- ��d0<�;���
1
+ h�J����vP�T�v��YI��Gw�ȏ��z�wQ�:CU�������l�[Wz}HZim�ՅB����m�G�����'��Da܏� �y�k`q
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,16 @@
1
+ ### 3.0.4 / 2014-08-14
2
+ [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.0.3...v3.0.4)
3
+
4
+ Bug Fixes:
5
+
6
+ * Fix `start_with` and `end_with` so that they work properly with
7
+ structs. (Myron Marston, #620)
8
+ * Fix failure message generation so that structs are printed properly
9
+ in failures. Previously failure messages would represent them as
10
+ an array. (Myron Marston, #620)
11
+ * Fix composable matcher support so that it does not wrongly treat
12
+ structs as arrays. (Myron Marston, #620)
13
+
1
14
  ### 3.0.3 / 2014-07-21
2
15
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.0.2...v3.0.3)
3
16
 
@@ -242,7 +255,7 @@ Deprecations:
242
255
  you do not explicitly enable it. (Sam Phippen)
243
256
 
244
257
  ### 2.99.2 / 2014-07-21
245
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.99.1...2-99-maintenance)
258
+ [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.99.1...v2.99.2)
246
259
 
247
260
  Bug Fixes:
248
261
 
@@ -48,7 +48,7 @@ module RSpec
48
48
  # ...the `not_to` method (also available as `to_not`) invokes the equivalent of
49
49
  # `include.matches?(order.entries)`, but it interprets `false` as success, and
50
50
  # `true` as a failure, using the message generated by
51
- # `eq.failure_message_when_negated`.
51
+ # `include.failure_message_when_negated`.
52
52
  #
53
53
  # rspec-expectations ships with a standard set of useful matchers, and writing
54
54
  # your own matchers is quite simple.
@@ -2,7 +2,7 @@ module RSpec
2
2
  module Expectations
3
3
  # @private
4
4
  module Version
5
- STRING = '3.0.3'
5
+ STRING = '3.0.4'
6
6
  end
7
7
  end
8
8
  end
@@ -31,8 +31,7 @@ module RSpec
31
31
  # @api private
32
32
  # @return [String]
33
33
  def description
34
- described_items = surface_descriptions_in(matcher)
35
- improve_hash_formatting "all#{to_sentence(described_items)}"
34
+ improve_hash_formatting "all #{description_of matcher}"
36
35
  end
37
36
 
38
37
  private
@@ -35,7 +35,7 @@ module RSpec
35
35
  return false unless actual.respond_to?(:[])
36
36
 
37
37
  begin
38
- return subset_matches? if expected.respond_to?(:length)
38
+ return subset_matches? if !(Struct === expected) && expected.respond_to?(:length)
39
39
  element_matches?
40
40
  rescue ArgumentError
41
41
  @actual_does_not_have_ordered_elements = true
@@ -135,6 +135,8 @@ module RSpec
135
135
  object.clone
136
136
  elsif Hash === object
137
137
  Hash[with_matchers_cloned(object.to_a)]
138
+ elsif Struct === object
139
+ object
138
140
  elsif enumerable?(object)
139
141
  begin
140
142
  object.map { |subobject| with_matchers_cloned(subobject) }
@@ -14,7 +14,7 @@ module RSpec
14
14
  # @api private
15
15
  # Converts a collection of objects into an english expression.
16
16
  def to_sentence(words)
17
- return " #{words.inspect}" unless words
17
+ return " #{words.inspect}" if !words || Struct === words
18
18
  words = Array(words).map { |w| to_word(w) }
19
19
  case words.length
20
20
  when 0
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.0.3
4
+ version: 3.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Baker
@@ -33,7 +33,7 @@ cert_chain:
33
33
  1yHC1AcSYpvi2dAbOiHT5iQF+krm4wse8KctXgTNnjMsHEoGKulJS2/sZl90jcCz
34
34
  muA=
35
35
  -----END CERTIFICATE-----
36
- date: 2014-07-21 00:00:00.000000000 Z
36
+ date: 2014-08-14 00:00:00.000000000 Z
37
37
  dependencies:
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: rspec-support
@@ -203,6 +203,6 @@ rubyforge_project: rspec
203
203
  rubygems_version: 2.2.2
204
204
  signing_key:
205
205
  specification_version: 4
206
- summary: rspec-expectations-3.0.3
206
+ summary: rspec-expectations-3.0.4
207
207
  test_files: []
208
208
  has_rdoc:
metadata.gz.sig CHANGED
Binary file