rspec-expectations 3.0.3 → 3.0.4
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 +1 -1
- data.tar.gz.sig +0 -0
- data/Changelog.md +14 -1
- data/lib/rspec/expectations.rb +1 -1
- data/lib/rspec/expectations/version.rb +1 -1
- data/lib/rspec/matchers/built_in/all.rb +1 -2
- data/lib/rspec/matchers/built_in/start_and_end_with.rb +1 -1
- data/lib/rspec/matchers/composable.rb +2 -0
- data/lib/rspec/matchers/pretty.rb +1 -1
- metadata +3 -3
- 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: effc74da27b6c9c3e1848c1aa153d7cb9bb2741f
|
4
|
+
data.tar.gz: 273bbb72209bc00f42208e6afbd429e557989229
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffda9a9a4e44c478f14a87750353a98ef006a7797d82d45cc86606e9a8ba3affffd45aa095195258808417afb6a8012a8c9698b21fc6f0f0c3051e6c72b9d956
|
7
|
+
data.tar.gz: da81d97b60f639f6bf33f6d4a14ec76f8f4e6113844753d4cc8829e09cd5c13beeec25a7bf40ed7c7039f43730289cf91ad5d54e77dfc53c0a9c7433382cc746
|
checksums.yaml.gz.sig
CHANGED
@@ -1 +1 @@
|
|
1
|
-
��
|
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
|
data/Changelog.md
CHANGED
@@ -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
|
258
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.99.1...v2.99.2)
|
246
259
|
|
247
260
|
Bug Fixes:
|
248
261
|
|
data/lib/rspec/expectations.rb
CHANGED
@@ -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
|
-
# `
|
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.
|
@@ -31,8 +31,7 @@ module RSpec
|
|
31
31
|
# @api private
|
32
32
|
# @return [String]
|
33
33
|
def description
|
34
|
-
|
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
|
@@ -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}"
|
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.
|
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-
|
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.
|
206
|
+
summary: rspec-expectations-3.0.4
|
207
207
|
test_files: []
|
208
208
|
has_rdoc:
|
metadata.gz.sig
CHANGED
Binary file
|