rspec-expectations 3.0.0 → 3.0.1
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 +6 -14
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Changelog.md +10 -0
- data/README.md +22 -1
- data/lib/rspec/expectations.rb +0 -1
- data/lib/rspec/expectations/configuration.rb +5 -8
- data/lib/rspec/expectations/expectation_target.rb +4 -6
- data/lib/rspec/expectations/fail_with.rb +5 -8
- data/lib/rspec/expectations/handler.rb +2 -4
- data/lib/rspec/expectations/minitest_integration.rb +5 -4
- data/lib/rspec/expectations/syntax.rb +13 -13
- data/lib/rspec/expectations/version.rb +1 -1
- data/lib/rspec/matchers.rb +10 -11
- data/lib/rspec/matchers/built_in/all.rb +3 -5
- data/lib/rspec/matchers/built_in/base_matcher.rb +3 -4
- data/lib/rspec/matchers/built_in/be.rb +3 -6
- data/lib/rspec/matchers/built_in/be_instance_of.rb +0 -1
- data/lib/rspec/matchers/built_in/be_kind_of.rb +1 -1
- data/lib/rspec/matchers/built_in/change.rb +4 -4
- data/lib/rspec/matchers/built_in/compound.rb +5 -8
- data/lib/rspec/matchers/built_in/contain_exactly.rb +10 -9
- data/lib/rspec/matchers/built_in/eq.rb +0 -1
- data/lib/rspec/matchers/built_in/eql.rb +0 -1
- data/lib/rspec/matchers/built_in/equal.rb +2 -3
- data/lib/rspec/matchers/built_in/exist.rb +0 -4
- data/lib/rspec/matchers/built_in/include.rb +3 -3
- data/lib/rspec/matchers/built_in/match.rb +0 -1
- data/lib/rspec/matchers/built_in/operators.rb +7 -7
- data/lib/rspec/matchers/built_in/output.rb +1 -1
- data/lib/rspec/matchers/built_in/raise_error.rb +15 -12
- data/lib/rspec/matchers/built_in/respond_to.rb +5 -3
- data/lib/rspec/matchers/built_in/start_and_end_with.rb +0 -2
- data/lib/rspec/matchers/built_in/throw_symbol.rb +9 -5
- data/lib/rspec/matchers/built_in/yield.rb +14 -15
- data/lib/rspec/matchers/composable.rb +4 -2
- data/lib/rspec/matchers/dsl.rb +1 -3
- data/lib/rspec/matchers/matcher_delegator.rb +0 -1
- data/lib/rspec/matchers/pretty.rb +11 -11
- metadata +49 -56
- metadata.gz.sig +0 -0
@@ -100,7 +100,9 @@ module RSpec
|
|
100
100
|
if Matchers.is_a_describable_matcher?(item)
|
101
101
|
DescribableItem.new(item)
|
102
102
|
elsif Hash === item
|
103
|
-
Hash[
|
103
|
+
Hash[surface_descriptions_in(item.to_a)]
|
104
|
+
elsif Struct === item
|
105
|
+
item.inspect
|
104
106
|
elsif enumerable?(item)
|
105
107
|
begin
|
106
108
|
item.map { |subitem| surface_descriptions_in(subitem) }
|
@@ -132,7 +134,7 @@ module RSpec
|
|
132
134
|
if Matchers.is_a_matcher?(object)
|
133
135
|
object.clone
|
134
136
|
elsif Hash === object
|
135
|
-
Hash[
|
137
|
+
Hash[with_matchers_cloned(object.to_a)]
|
136
138
|
elsif enumerable?(object)
|
137
139
|
begin
|
138
140
|
object.map { |subobject| with_matchers_cloned(subobject) }
|
data/lib/rspec/matchers/dsl.rb
CHANGED
@@ -11,9 +11,7 @@ module RSpec
|
|
11
11
|
end
|
12
12
|
alias_method :matcher, :define
|
13
13
|
|
14
|
-
if RSpec.respond_to?(:configure)
|
15
|
-
RSpec.configure {|c| c.extend self}
|
16
|
-
end
|
14
|
+
RSpec.configure { |c| c.extend self } if RSpec.respond_to?(:configure)
|
17
15
|
|
18
16
|
# Contains the methods that are available from within the
|
19
17
|
# `RSpec::Matchers.define` DSL for creating custom matchers.
|
@@ -7,7 +7,7 @@ module RSpec
|
|
7
7
|
# @api private
|
8
8
|
# Converts a symbol into an english expression.
|
9
9
|
def split_words(sym)
|
10
|
-
sym.to_s.gsub(/_/,' ')
|
10
|
+
sym.to_s.gsub(/_/, ' ')
|
11
11
|
end
|
12
12
|
module_function :split_words
|
13
13
|
|
@@ -17,14 +17,14 @@ module RSpec
|
|
17
17
|
return " #{words.inspect}" unless words
|
18
18
|
words = Array(words).map { |w| to_word(w) }
|
19
19
|
case words.length
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
20
|
+
when 0
|
21
|
+
""
|
22
|
+
when 1
|
23
|
+
" #{words[0]}"
|
24
|
+
when 2
|
25
|
+
" #{words[0]} and #{words[1]}"
|
26
|
+
else
|
27
|
+
" #{words[0...-1].join(', ')}, and #{words[-1]}"
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
@@ -50,8 +50,8 @@ module RSpec
|
|
50
50
|
# Borrowed from ActiveSupport
|
51
51
|
def underscore(camel_cased_word)
|
52
52
|
word = camel_cased_word.to_s.dup
|
53
|
-
word.gsub!(/([A-Z]+)([A-Z][a-z])/,'\1_\2')
|
54
|
-
word.gsub!(/([a-z\d])([A-Z])/,'\1_\2')
|
53
|
+
word.gsub!(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
|
54
|
+
word.gsub!(/([a-z\d])([A-Z])/, '\1_\2')
|
55
55
|
word.tr!("-", "_")
|
56
56
|
word.downcase!
|
57
57
|
word
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Baker
|
@@ -10,126 +10,119 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain:
|
13
|
-
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-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V3qfzF5QBcTD2372XNM53b25nYVQSX2KH5FF7BhlKyov33bOm2gA9M+mWIujW
|
24
|
+
qgkyxVlfrlE+ZBgV3wXn1Cojg1LpTq35yOArgwioyrwwlZZJR9joN9s/nDklfr5A
|
25
|
+
+dyETjFc6cmEPWZrt2cJBQIDAQABo4GGMIGDMAkGA1UdEwQCMAAwCwYDVR0PBAQD
|
26
|
+
AgSwMB0GA1UdDgQWBBSW+WD7hn1swJ1A7i8tbuFeuNCJCjAkBgNVHREEHTAbgRly
|
27
|
+
c3BlYy1kZXZAZ29vZ2xlZ291cHMuY29tMCQGA1UdEgQdMBuBGXJzcGVjLWRldkBn
|
28
|
+
b29nbGVnb3Vwcy5jb20wDQYJKoZIhvcNAQEFBQADggEBAH27jAZ8sD7vnXupj6Y+
|
29
|
+
BaBdfHtCkFaslLJ0aKuMDIVXwYuKfqoW15cZPDLmSIEBuQFM3lw6d/hEEL4Uo2jZ
|
30
|
+
FvtmH5OxifPDzFyUtCL4yp6qgNe/Xf6sDsRg6FmKcpgqCwNOmsViaf0LPSUH/GYQ
|
31
|
+
3Teoz8QCaDbD7AKsffT7eDrnbHnKweO1XdemRJC98u/yYxnGzMSWKEsn09etBlZ9
|
32
|
+
7H67k5Z3uf6cfLZgToWL6zShzZY3Nun5r73YsNf2/QZOe4UZe4vfGvn6baw53ys9
|
33
|
+
1yHC1AcSYpvi2dAbOiHT5iQF+krm4wse8KctXgTNnjMsHEoGKulJS2/sZl90jcCz
|
34
|
+
muA=
|
35
|
+
-----END CERTIFICATE-----
|
36
|
+
date: 2014-06-12 00:00:00.000000000 Z
|
44
37
|
dependencies:
|
45
38
|
- !ruby/object:Gem::Dependency
|
46
39
|
name: rspec-support
|
47
40
|
requirement: !ruby/object:Gem::Requirement
|
48
41
|
requirements:
|
49
|
-
- - ~>
|
42
|
+
- - "~>"
|
50
43
|
- !ruby/object:Gem::Version
|
51
44
|
version: 3.0.0
|
52
45
|
type: :runtime
|
53
46
|
prerelease: false
|
54
47
|
version_requirements: !ruby/object:Gem::Requirement
|
55
48
|
requirements:
|
56
|
-
- - ~>
|
49
|
+
- - "~>"
|
57
50
|
- !ruby/object:Gem::Version
|
58
51
|
version: 3.0.0
|
59
52
|
- !ruby/object:Gem::Dependency
|
60
53
|
name: diff-lcs
|
61
54
|
requirement: !ruby/object:Gem::Requirement
|
62
55
|
requirements:
|
63
|
-
- -
|
56
|
+
- - ">="
|
64
57
|
- !ruby/object:Gem::Version
|
65
58
|
version: 1.2.0
|
66
|
-
- - <
|
59
|
+
- - "<"
|
67
60
|
- !ruby/object:Gem::Version
|
68
61
|
version: '2.0'
|
69
62
|
type: :runtime
|
70
63
|
prerelease: false
|
71
64
|
version_requirements: !ruby/object:Gem::Requirement
|
72
65
|
requirements:
|
73
|
-
- -
|
66
|
+
- - ">="
|
74
67
|
- !ruby/object:Gem::Version
|
75
68
|
version: 1.2.0
|
76
|
-
- - <
|
69
|
+
- - "<"
|
77
70
|
- !ruby/object:Gem::Version
|
78
71
|
version: '2.0'
|
79
72
|
- !ruby/object:Gem::Dependency
|
80
73
|
name: rake
|
81
74
|
requirement: !ruby/object:Gem::Requirement
|
82
75
|
requirements:
|
83
|
-
- - ~>
|
76
|
+
- - "~>"
|
84
77
|
- !ruby/object:Gem::Version
|
85
78
|
version: 10.0.0
|
86
79
|
type: :development
|
87
80
|
prerelease: false
|
88
81
|
version_requirements: !ruby/object:Gem::Requirement
|
89
82
|
requirements:
|
90
|
-
- - ~>
|
83
|
+
- - "~>"
|
91
84
|
- !ruby/object:Gem::Version
|
92
85
|
version: 10.0.0
|
93
86
|
- !ruby/object:Gem::Dependency
|
94
87
|
name: cucumber
|
95
88
|
requirement: !ruby/object:Gem::Requirement
|
96
89
|
requirements:
|
97
|
-
- - ~>
|
90
|
+
- - "~>"
|
98
91
|
- !ruby/object:Gem::Version
|
99
92
|
version: '1.3'
|
100
93
|
type: :development
|
101
94
|
prerelease: false
|
102
95
|
version_requirements: !ruby/object:Gem::Requirement
|
103
96
|
requirements:
|
104
|
-
- - ~>
|
97
|
+
- - "~>"
|
105
98
|
- !ruby/object:Gem::Version
|
106
99
|
version: '1.3'
|
107
100
|
- !ruby/object:Gem::Dependency
|
108
101
|
name: aruba
|
109
102
|
requirement: !ruby/object:Gem::Requirement
|
110
103
|
requirements:
|
111
|
-
- - ~>
|
104
|
+
- - "~>"
|
112
105
|
- !ruby/object:Gem::Version
|
113
106
|
version: '0.5'
|
114
107
|
type: :development
|
115
108
|
prerelease: false
|
116
109
|
version_requirements: !ruby/object:Gem::Requirement
|
117
110
|
requirements:
|
118
|
-
- - ~>
|
111
|
+
- - "~>"
|
119
112
|
- !ruby/object:Gem::Version
|
120
113
|
version: '0.5'
|
121
114
|
- !ruby/object:Gem::Dependency
|
122
115
|
name: minitest
|
123
116
|
requirement: !ruby/object:Gem::Requirement
|
124
117
|
requirements:
|
125
|
-
- - ~>
|
118
|
+
- - "~>"
|
126
119
|
- !ruby/object:Gem::Version
|
127
120
|
version: '5.2'
|
128
121
|
type: :development
|
129
122
|
prerelease: false
|
130
123
|
version_requirements: !ruby/object:Gem::Requirement
|
131
124
|
requirements:
|
132
|
-
- - ~>
|
125
|
+
- - "~>"
|
133
126
|
- !ruby/object:Gem::Version
|
134
127
|
version: '5.2'
|
135
128
|
description: rspec-expectations provides a simple, readable API to express expected
|
@@ -139,6 +132,11 @@ executables: []
|
|
139
132
|
extensions: []
|
140
133
|
extra_rdoc_files: []
|
141
134
|
files:
|
135
|
+
- ".document"
|
136
|
+
- ".yardopts"
|
137
|
+
- Changelog.md
|
138
|
+
- License.txt
|
139
|
+
- README.md
|
142
140
|
- lib/rspec/expectations.rb
|
143
141
|
- lib/rspec/expectations/configuration.rb
|
144
142
|
- lib/rspec/expectations/expectation_target.rb
|
@@ -181,35 +179,30 @@ files:
|
|
181
179
|
- lib/rspec/matchers/generated_descriptions.rb
|
182
180
|
- lib/rspec/matchers/matcher_delegator.rb
|
183
181
|
- lib/rspec/matchers/pretty.rb
|
184
|
-
- README.md
|
185
|
-
- License.txt
|
186
|
-
- Changelog.md
|
187
|
-
- .yardopts
|
188
|
-
- .document
|
189
182
|
homepage: http://github.com/rspec/rspec-expectations
|
190
183
|
licenses:
|
191
184
|
- MIT
|
192
185
|
metadata: {}
|
193
186
|
post_install_message:
|
194
187
|
rdoc_options:
|
195
|
-
- --charset=UTF-8
|
188
|
+
- "--charset=UTF-8"
|
196
189
|
require_paths:
|
197
190
|
- lib
|
198
191
|
required_ruby_version: !ruby/object:Gem::Requirement
|
199
192
|
requirements:
|
200
|
-
- -
|
193
|
+
- - ">="
|
201
194
|
- !ruby/object:Gem::Version
|
202
195
|
version: 1.8.7
|
203
196
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
204
197
|
requirements:
|
205
|
-
- -
|
198
|
+
- - ">="
|
206
199
|
- !ruby/object:Gem::Version
|
207
200
|
version: '0'
|
208
201
|
requirements: []
|
209
202
|
rubyforge_project: rspec
|
210
|
-
rubygems_version: 2.
|
203
|
+
rubygems_version: 2.2.2
|
211
204
|
signing_key:
|
212
205
|
specification_version: 4
|
213
|
-
summary: rspec-expectations-3.0.
|
206
|
+
summary: rspec-expectations-3.0.1
|
214
207
|
test_files: []
|
215
208
|
has_rdoc:
|
metadata.gz.sig
CHANGED
Binary file
|