rspec-expectations 2.99.2 → 3.0.0.beta1

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.
Files changed (98) hide show
  1. checksums.yaml +14 -6
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +2 -0
  4. data/Changelog.md +63 -104
  5. data/License.txt +1 -0
  6. data/README.md +14 -8
  7. data/features/README.md +1 -2
  8. data/features/built_in_matchers/README.md +3 -0
  9. data/features/built_in_matchers/be.feature +44 -44
  10. data/features/built_in_matchers/be_within.feature +1 -1
  11. data/features/built_in_matchers/comparisons.feature +97 -0
  12. data/features/built_in_matchers/cover.feature +3 -3
  13. data/features/built_in_matchers/end_with.feature +3 -3
  14. data/features/built_in_matchers/equality.feature +20 -23
  15. data/features/built_in_matchers/exist.feature +5 -5
  16. data/features/built_in_matchers/expect_error.feature +14 -14
  17. data/features/built_in_matchers/include.feature +15 -15
  18. data/features/built_in_matchers/match.feature +4 -5
  19. data/features/built_in_matchers/match_array.feature +37 -0
  20. data/features/built_in_matchers/predicates.feature +30 -6
  21. data/features/built_in_matchers/respond_to.feature +4 -4
  22. data/features/built_in_matchers/satisfy.feature +2 -2
  23. data/features/built_in_matchers/start_with.feature +3 -3
  24. data/features/built_in_matchers/types.feature +6 -6
  25. data/features/custom_matchers/access_running_example.feature +3 -3
  26. data/features/custom_matchers/define_matcher.feature +6 -34
  27. data/features/custom_matchers/define_matcher_outside_rspec.feature +2 -2
  28. data/features/custom_matchers/define_matcher_with_fluent_interface.feature +1 -1
  29. data/features/customized_message.feature +18 -1
  30. data/features/diffing.feature +3 -3
  31. data/features/implicit_docstrings.feature +9 -9
  32. data/features/step_definitions/additional_cli_steps.rb +0 -10
  33. data/features/support/env.rb +10 -3
  34. data/features/test_frameworks/test_unit.feature +0 -40
  35. data/lib/rspec-expectations.rb +0 -5
  36. data/lib/rspec/expectations.rb +4 -18
  37. data/lib/rspec/expectations/expectation_target.rb +10 -77
  38. data/lib/rspec/expectations/extensions.rb +0 -1
  39. data/lib/rspec/expectations/handler.rb +1 -5
  40. data/lib/rspec/expectations/syntax.rb +25 -5
  41. data/lib/rspec/expectations/version.rb +1 -1
  42. data/lib/rspec/matchers.rb +7 -102
  43. data/lib/rspec/matchers/built_in/base_matcher.rb +10 -17
  44. data/lib/rspec/matchers/built_in/be.rb +5 -18
  45. data/lib/rspec/matchers/built_in/be_within.rb +2 -8
  46. data/lib/rspec/matchers/built_in/change.rb +1 -39
  47. data/lib/rspec/matchers/built_in/has.rb +7 -40
  48. data/lib/rspec/matchers/built_in/include.rb +1 -1
  49. data/lib/rspec/matchers/built_in/match_array.rb +1 -1
  50. data/lib/rspec/matchers/built_in/raise_error.rb +44 -23
  51. data/lib/rspec/matchers/built_in/respond_to.rb +1 -7
  52. data/lib/rspec/matchers/built_in/satisfy.rb +1 -7
  53. data/lib/rspec/matchers/built_in/throw_symbol.rb +2 -10
  54. data/lib/rspec/matchers/built_in/yield.rb +4 -25
  55. data/lib/rspec/matchers/compatibility.rb +2 -2
  56. data/lib/rspec/{expectations → matchers}/configuration.rb +9 -6
  57. data/lib/rspec/matchers/dsl.rb +2 -4
  58. data/lib/rspec/matchers/matcher.rb +163 -283
  59. data/lib/rspec/matchers/operator_matcher.rb +57 -71
  60. data/lib/rspec/matchers/pretty.rb +0 -4
  61. data/lib/rspec/matchers/test_unit_integration.rb +5 -22
  62. data/spec/rspec/expectations/expectation_target_spec.rb +0 -62
  63. data/spec/rspec/expectations/extensions/kernel_spec.rb +0 -4
  64. data/spec/rspec/expectations_spec.rb +2 -43
  65. data/spec/rspec/matchers/base_matcher_spec.rb +12 -27
  66. data/spec/rspec/matchers/be_spec.rb +2 -71
  67. data/spec/rspec/matchers/change_spec.rb +1 -76
  68. data/spec/rspec/{expectations → matchers}/configuration_spec.rb +41 -21
  69. data/spec/rspec/matchers/description_generation_spec.rb +2 -21
  70. data/spec/rspec/matchers/equal_spec.rb +0 -26
  71. data/spec/rspec/matchers/has_spec.rb +0 -24
  72. data/spec/rspec/matchers/match_array_spec.rb +0 -13
  73. data/spec/rspec/matchers/matcher_spec.rb +325 -279
  74. data/spec/rspec/matchers/matchers_spec.rb +36 -0
  75. data/spec/rspec/matchers/operator_matcher_spec.rb +8 -27
  76. data/spec/rspec/matchers/raise_error_spec.rb +65 -209
  77. data/spec/rspec/matchers/yield_spec.rb +32 -9
  78. data/spec/spec_helper.rb +21 -6
  79. data/spec/support/classes.rb +7 -7
  80. data/spec/support/in_sub_process.rb +7 -8
  81. data/spec/support/shared_examples.rb +0 -42
  82. metadata +113 -84
  83. metadata.gz.sig +4 -0
  84. data/features/built_in_matchers/have.feature +0 -109
  85. data/features/built_in_matchers/operators.feature +0 -227
  86. data/lib/rspec/expectations/caller_filter.rb +0 -60
  87. data/lib/rspec/expectations/deprecation.rb +0 -27
  88. data/lib/rspec/expectations/extensions/array.rb +0 -9
  89. data/lib/rspec/matchers/be_close.rb +0 -12
  90. data/lib/rspec/matchers/built_in/have.rb +0 -273
  91. data/lib/rspec/matchers/differentiate_block_method_types.rb +0 -55
  92. data/lib/rspec/matchers/extensions/instance_eval_with_args.rb +0 -39
  93. data/lib/rspec/matchers/match_aliases.rb +0 -22
  94. data/spec/rspec/matchers/be_close_spec.rb +0 -25
  95. data/spec/rspec/matchers/differentiate_block_method_types_spec.rb +0 -39
  96. data/spec/rspec/matchers/have_spec.rb +0 -853
  97. data/spec/rspec/matchers/pretty_spec.rb +0 -23
  98. data/spec/support/helper_methods.rb +0 -42
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8c93bd32c3693d2e1fd08d028ae88b28ea444162
4
- data.tar.gz: 47b0eed2398465eb95c5eb34bd2f15ca06f4b9d4
5
- SHA512:
6
- metadata.gz: 408df0caac8b9314b1b27b28cac7dee690d04e5f714d42fc37329bfbc23ca399acbfcbc79616186c19c29f58b3a4a92d79ebe8e740a525aa3ac1bd3ee9b46451
7
- data.tar.gz: e7dbed568204b09863034c56228095cc1a5fc45cbfebb454b0da7f38fcce79da325156a5ceb5ba5deac95ea59f3f81be13a02c40ef1360148ad3a192be44486b
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZTQwOGIzZDdiMmUzMGI5OWQ2NmQzOTBjYmJiZTUzODkyYTAxOGM2YQ==
5
+ data.tar.gz: !binary |-
6
+ YzI4OTM1NjI1ZDRiZTRkYjY3NTJkMTMzMThkMWY3OTY2OWE2MDFiNQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ ODFmYzI4Mjk1MTVmMjYyMjc0NzBiNTE4YTc2MjE2ZjZiMDhhODBlN2Q3ZmZm
10
+ MWFmMzU4NTkxOWZiMTczYzgzMWI5NzU5MTM5M2IyYjBkYmUxNGQ5ZDM0YjVm
11
+ MGJjMWY1ODY4MjU5ZDZmODdmOTY4MzZkMDEzNmI5Y2I5YjljNzM=
12
+ data.tar.gz: !binary |-
13
+ MjA3YWZlNjdmOTA4YzRhYmVjODQ5MDUzMzIxNTJhMTFmMmQwZTk1MTQ3OGM2
14
+ OTNmYjI1NjhlZDMxNDU0NTlhNjljNWQ2ZWE4MTI3YWQzYjA3N2JmZmViNmY1
15
+ MThhZWNkNzZmOGJmY2M3MDBjNDQzMjJmOTkwZDAyZTlhZDJkMjc=
Binary file
@@ -0,0 +1,2 @@
1
+ x�-w��//�ԭ㽞��%s�6�F�+C1[͞*������ ��(2K���8��*��r�%Z׵��X�-d�ي�98l���{�:�4
2
+ {���d3��ReDm���gb=�����/f�u����u�Wh��5�[��y������k��q�ѓ���CWAl�% t-S
@@ -1,83 +1,50 @@
1
- ### 2.99.2 / 2014-07-21
2
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.99.1...2-99-maintenance)
1
+ ### 3.0.0.beta1 / 2013-11-07
2
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.99.0.beta1...v3.0.0.beta1)
3
3
 
4
- Bug Fixes:
5
-
6
- * Fix regression in `Expectations#method_handle_for` where proxy objects
7
- with method delegated would wrongly not return a method handle.
8
- (Jon Rowe, #594)
9
- * Fix issue with detection of generic operator matchers so they work
10
- correctly when undefined. (Myron Marston, #597)
11
-
12
- ### 2.99.1 / 2014-06-19
13
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.99.0...v2.99.1)
14
-
15
- Bug Fixes:
4
+ Breaking Changes for 3.0.0:
16
5
 
17
- * Fix typo in custom matcher `expected` deprecation warning -- it's
18
- `expected_as_array`, not `expected_array`. (Frederick Cheung, #562)
19
-
20
- ### 2.99.0 / 2014-06-01
21
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.99.0.rc1...v2.99.0)
6
+ * Remove explicit support for 1.8.6. (Jon Rowe)
7
+ * Remove the deprecated `be_close` matcher, preferring `be_within` instead.
8
+ (Sam Phippen)
9
+ * Rename `be_true` and `be_false` to `be_truthy` and `be_falsey`. (Sam Phippen)
10
+ * Make `expect { }.to_not raise_error(SomeSpecificClass, message)`,
11
+ `expect { }.to_not raise_error(SomeSpecificClass)` and
12
+ `expect { }.to_not raise_error(message)` invalid, since they are prone
13
+ to hiding failures. Instead, use `expect { }.to_not raise_error` (with no
14
+ args). (Sam Phippen)
15
+ * Within `RSpec::Matchers.define` blocks, helper methods made available
16
+ either via `def self.helper` or `extend HelperModule` are no longer
17
+ available to the `match` block (or any of the others). Instead
18
+ `include` your helper module and define the helper method as an
19
+ instance method. (Myron Marston)
22
20
 
23
21
  Enhancements:
24
22
 
25
- * Special case deprecation message for `errors_on` with `rspec-rails` to be more useful.
26
- (Aaron Kromer)
27
-
28
- ### 2.99.0.rc1 / 2014-05-18
29
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.99.0.beta2...2.99.0.rc1)
30
-
31
- Deprecations:
23
+ * Support `do..end` style block with `raise_error` matcher. (Yuji Nakayama)
24
+ * Rewrote custom matcher DSL to simplify its implementation and solve a
25
+ few issues. (Myron Marston)
26
+ * Allow early `return` from within custom matcher DSL blocks. (Myron
27
+ Marston)
28
+ * The custom matcher DSL's `chain` can now accept a block. (Myron
29
+ Marston)
30
+ * Support setting an expectation on a `raise_error` matcher via a chained
31
+ `with_message` method call. (Sam Phippen)
32
32
 
33
- * Deprecate `matcher_execution_context` attribute on DSL-defined
34
- custom matchers. (Myron Marston)
35
- * Deprecate `RSpec::Matchers::Pretty#_pretty_print`. (Myron Marston)
36
- * Deprecate `RSpec::Matchers::Pretty#expected_to_sentence`. (Myron Marston)
37
- * Deprecate `RSpec::Matchers::Configuration` in favor of
38
- `RSpec::Expectations::Configuration`. (Myron Marston)
39
- * Deprecate `be_xyz` predicate matcher on an object that doesn't respond to
40
- `xyz?` or `xyzs?`. (Daniel Fone)
41
- * Deprecate `have_xyz` matcher on an object that doesn't respond to `has_xyz?`.
42
- (Daniel Fone)
43
- * Deprecate `have_xyz` matcher on an object that has a private method `has_xyz?`.
44
- (Jon Rowe)
45
- * Issue a deprecation warning when a block expectation expression is
46
- used with a matcher that doesn't explicitly support block expectations
47
- via `supports_block_expectations?`. (Myron Marston)
48
- * Deprecate `require 'rspec-expectations'`. Use
49
- `require 'rspec/expectations'` instead. (Myron Marston)
33
+ Bug Fixes:
50
34
 
51
- ### 2.99.0.beta2 / 2014-02-17
52
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.99.0.beta1...v2.99.0.beta2)
35
+ * Allow `include` and `match` matchers to be used from within a
36
+ DSL-defined custom matcher's `match` block. (Myron Marston)
53
37
 
54
38
  Deprecations:
55
39
 
56
- * Deprecate chaining `by`, `by_at_least`, `by_at_most` or `to` off of
57
- `expect { }.not_to change { }`. The docs have always said these are
58
- not supported for the negative form but now they explicitly raise
59
- errors in RSpec 3. (Myron Marston)
60
- * Change the semantics of `expect { }.not_to change { x }.from(y)`.
61
- In RSpec 2.x, this expectation would only fail if `x` started with
62
- the value of `y` and changed. If it started with a different value
63
- and changed, it would pass. In RSpec 3, it will pass only if the
64
- value starts at `y` and it does not change. (Myron Marston)
65
- * Deprecate `matcher == value` as an alias for `matcher.matches?(value)`,
66
- in favor of `matcher === value`. (Myron Marston)
67
- * Deprecate `RSpec::Matchers::OperatorMatcher` in favor of
68
- `RSpec::Matchers::BuiltIn::OperatorMatcher`. (Myron Marston)
69
- * Deprecate auto-integration with Test::Unit and minitest.
70
- Instead, include `RSpec::Matchers` in the appropriate test case
71
- base class yourself. (Myron Marston)
72
- * Deprecate treating `#expected` on a DSL-generated custom matcher
73
- as an array when only 1 argument is passed to the matcher method.
74
- In RSpec 3 it will be the single value in order to make diffs
75
- work properly. (Jon Rowe)
40
+ * Using the old `:should` syntax without explicitly configuring it is deprecated.
41
+ It will continue to work but will emit a deprecation warning in RSpec 3 if
42
+ you do not explicitly enable it. (Sam Phippen)
76
43
 
77
44
  ### 2.99.0.beta1 / 2013-11-07
78
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.14.4...v2.99.0.beta1)
45
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.14.4...v2.99.0.beta1)
79
46
 
80
- Deprecations:
47
+ Deprecations
81
48
 
82
49
  * Deprecate `have`, `have_at_least` and `have_at_most`. You can continue using those
83
50
  matchers through https://github.com/rspec/rspec-collection_matchers, or
@@ -99,16 +66,8 @@ Deprecations:
99
66
  * RSpec 2.x allowed helper methods defined either way to be used for
100
67
  either purpose, but RSpec 3.0 will not.
101
68
 
102
- ### 2.14.5 / 2014-02-01
103
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.14.4...v2.14.5)
104
-
105
- Bug fixes
106
-
107
- * Fix wrong matcher descriptions with falsey expected value
108
- (yujinakayama)
109
-
110
69
  ### 2.14.4 / 2013-11-06
111
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.14.3...v2.14.4)
70
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.14.3...v2.14.4)
112
71
 
113
72
  Bug fixes
114
73
 
@@ -117,7 +76,7 @@ Bug fixes
117
76
  back to default internal encoding with replacing characters. (Jon Rowe)
118
77
 
119
78
  ### 2.14.3 / 2013-09-22
120
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.14.2...v2.14.3)
79
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.14.2...v2.14.3)
121
80
 
122
81
  Bug fixes
123
82
 
@@ -128,7 +87,7 @@ Bug fixes
128
87
  `method_missing` (Jon Rowe)
129
88
 
130
89
  ### 2.14.2 / 2013-08-14
131
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.14.1...v2.14.2)
90
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.14.1...v2.14.2)
132
91
 
133
92
  Bug fixes
134
93
 
@@ -144,7 +103,7 @@ Bug fixes
144
103
  `SomeClass === SomeClass` returns false. (Myron Marston)
145
104
 
146
105
  ### 2.14.1 / 2013-08-08
147
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.14.0...2.14.1)
106
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.14.0...2.14.1)
148
107
 
149
108
  Bug fixes
150
109
 
@@ -153,7 +112,7 @@ Bug fixes
153
112
  errors (Jon Rowe).
154
113
 
155
114
  ### 2.14.0 / 2013-07-06
156
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.14.0.rc1...v2.14.0)
115
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.14.0.rc1...v2.14.0)
157
116
 
158
117
  Bug fixes
159
118
 
@@ -165,7 +124,7 @@ Bug fixes
165
124
  change...` (Sam Phippen).
166
125
 
167
126
  ### 2.14.0.rc1 / 2013-05-27
168
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.13.0...v2.14.0.rc1)
127
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.13.0...v2.14.0.rc1)
169
128
 
170
129
  Enhancements
171
130
 
@@ -199,7 +158,7 @@ Deprecations
199
158
  error_ to pass. (Sam Phippen and David Chelimsky)
200
159
 
201
160
  ### 2.13.0 / 2013-02-23
202
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.12.1...v2.13.0)
161
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.12.1...v2.13.0)
203
162
 
204
163
  Enhancements
205
164
 
@@ -230,7 +189,7 @@ Bug fixes
230
189
  printed for empty diffs (Myron Marston).
231
190
 
232
191
  ### 2.12.1 / 2012-12-15
233
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.12.0...v2.12.1)
192
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.12.0...v2.12.1)
234
193
 
235
194
  Bug fixes
236
195
 
@@ -242,7 +201,7 @@ Bug fixes
242
201
  (Steven Harman)
243
202
 
244
203
  ### 2.12.0 / 2012-11-12
245
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.11.3...v2.12.0)
204
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.11.3...v2.12.0)
246
205
 
247
206
  Enhancements
248
207
 
@@ -265,7 +224,7 @@ Bug fixes
265
224
  (Tom Stuart)
266
225
 
267
226
  ### 2.11.3 / 2012-09-04
268
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.11.2...v2.11.3)
227
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.11.2...v2.11.3)
269
228
 
270
229
  Bug fixes
271
230
 
@@ -281,7 +240,7 @@ Bug fixes
281
240
  }.to change { user.last_emailed_at }.to be_within(1.second).of(Time.zone.now)
282
241
 
283
242
  ### 2.11.2 / 2012-07-25
284
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.11.1...v2.11.2)
243
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.11.1...v2.11.2)
285
244
 
286
245
  Bug fixes
287
246
 
@@ -290,7 +249,7 @@ Bug fixes
290
249
  of the object hierarchy. (Gabriel Gilder)
291
250
 
292
251
  ### 2.11.1 / 2012-07-08
293
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.11.0...v2.11.1)
252
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.11.0...v2.11.1)
294
253
 
295
254
  Bug fixes
296
255
 
@@ -299,7 +258,7 @@ Bug fixes
299
258
  * `Time`, for example, is a legit alternative.
300
259
 
301
260
  ### 2.11.0 / 2012-07-07
302
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.10.0...v2.11.0)
261
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.10.0...v2.11.0)
303
262
 
304
263
  Enhancements
305
264
 
@@ -322,7 +281,7 @@ Bug fixes
322
281
  Marston)
323
282
 
324
283
  ### 2.10.0 / 2012-05-03
325
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.9.1...v2.10.0)
284
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.9.1...v2.10.0)
326
285
 
327
286
  Enhancements
328
287
 
@@ -340,7 +299,7 @@ Bug fixes
340
299
  * Fix message-specific specs to pass on Rubinius (John Firebaugh)
341
300
 
342
301
  ### 2.9.1 / 2012-04-03
343
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.9.0...v2.9.1)
302
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.9.0...v2.9.1)
344
303
 
345
304
  Bug fixes
346
305
 
@@ -351,7 +310,7 @@ Bug fixes
351
310
  * Fix using execution context methods in nested DSL matchers (mirasrael)
352
311
 
353
312
  ### 2.9.0 / 2012-03-17
354
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.8.0...v2.9.0)
313
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.8.0...v2.9.0)
355
314
 
356
315
  Enhancements
357
316
 
@@ -371,7 +330,7 @@ Bug fixes
371
330
 
372
331
  ### 2.8.0 / 2012-01-04
373
332
 
374
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.8.0.rc2...v2.8.0)
333
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.8.0.rc2...v2.8.0)
375
334
 
376
335
  Enhancements
377
336
 
@@ -380,13 +339,13 @@ Enhancements
380
339
 
381
340
  ### 2.8.0.rc2 / 2011-12-19
382
341
 
383
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.8.0.rc1...v2.8.0.rc2)
342
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.8.0.rc1...v2.8.0.rc2)
384
343
 
385
344
  No changes for this release. Just releasing with the other rspec gems.
386
345
 
387
346
  ### 2.8.0.rc1 / 2011-11-06
388
347
 
389
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.7.0...v2.8.0.rc1)
348
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.7.0...v2.8.0.rc1)
390
349
 
391
350
  Enhancements
392
351
 
@@ -395,7 +354,7 @@ Enhancements
395
354
 
396
355
  ### 2.7.0 / 2011-10-16
397
356
 
398
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.6.0...v2.7.0)
357
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.6.0...v2.7.0)
399
358
 
400
359
  Enhancements
401
360
 
@@ -413,7 +372,7 @@ Bug fixes
413
372
 
414
373
  ### 2.6.0 / 2011-05-12
415
374
 
416
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.5.0...v2.6.0)
375
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.5.0...v2.6.0)
417
376
 
418
377
  Enhancements
419
378
 
@@ -431,7 +390,7 @@ Bug fixes
431
390
 
432
391
  ### 2.5.0 / 2011-02-05
433
392
 
434
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.4.0...v2.5.0)
393
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.4.0...v2.5.0)
435
394
 
436
395
  Enhancements
437
396
 
@@ -444,7 +403,7 @@ Documentation
444
403
 
445
404
  ### 2.4.0 / 2011-01-02
446
405
 
447
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.3.0...v2.4.0)
406
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.3.0...v2.4.0)
448
407
 
449
408
  No functional changes in this release, which was made to align with the
450
409
  rspec-core-2.4.0 release.
@@ -455,7 +414,7 @@ Enhancements
455
414
 
456
415
  ### 2.3.0 / 2010-12-12
457
416
 
458
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.2.1...v2.3.0)
417
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.2.1...v2.3.0)
459
418
 
460
419
  Enhancements
461
420
 
@@ -463,11 +422,11 @@ Enhancements
463
422
 
464
423
  ### 2.2.0 / 2010-11-28
465
424
 
466
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.1.0...v2.2.0)
425
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.1.0...v2.2.0)
467
426
 
468
427
  ### 2.1.0 / 2010-11-07
469
428
 
470
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.0.1...v2.1.0)
429
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.0.1...v2.1.0)
471
430
 
472
431
  Enhancements
473
432
 
@@ -486,7 +445,7 @@ Bug fixes
486
445
 
487
446
  ### 2.0.0 / 2010-10-10
488
447
 
489
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.0.0.rc...v2.0.0)
448
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.0.0.rc...v2.0.0)
490
449
 
491
450
  Enhancements
492
451
 
@@ -501,7 +460,7 @@ Bug fixes
501
460
 
502
461
  ### 2.0.0.rc / 2010-10-05
503
462
 
504
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.0.0.beta.22...v2.0.0.rc)
463
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.0.0.beta.22...v2.0.0.rc)
505
464
 
506
465
  Enhancements
507
466
 
@@ -514,7 +473,7 @@ Bug fixes
514
473
 
515
474
  ### 2.0.0.beta.22 / 2010-09-12
516
475
 
517
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.0.0.beta.20...v2.0.0.beta.22)
476
+ [full changelog](http://github.com/rspec/rspec-expectations/compare/v2.0.0.beta.20...v2.0.0.beta.22)
518
477
 
519
478
  Enhancements
520
479
 
@@ -1,5 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
+ Copyright (c) 2012 David Chelimsky, Myron Marston
3
4
  Copyright (c) 2006 David Chelimsky, The RSpec Development Team
4
5
  Copyright (c) 2005 Steven Baker
5
6
 
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # RSpec Expectations [![Build Status](https://secure.travis-ci.org/rspec/rspec-expectations.png?branch=master)](http://travis-ci.org/rspec/rspec-expectations) [![Code Climate](https://codeclimate.com/github/rspec/rspec-expectations.png)](https://codeclimate.com/github/rspec/rspec-expectations)
1
+ # RSpec Expectations [![Build Status](https://secure.travis-ci.org/rspec/rspec-expectations.png?branch=master)](http://travis-ci.org/rspec/rspec-expectations) [![Code Climate](https://codeclimate.com/github/rspec/rspec-expectations.png)](https://codeclimate.com/github/rspec/rspec-expectations) [![Coverage Status](https://coveralls.io/repos/rspec/rspec-expectations/badge.png?branch=master)](https://coveralls.io/r/rspec/rspec-expectations?branch=master)
2
2
 
3
3
  RSpec::Expectations lets you express expected outcomes on an object in an
4
4
  example.
@@ -54,7 +54,7 @@ expect(actual).to eq(expected) # passes if actual == expected
54
54
  expect(actual).to eql(expected) # passes if actual.eql?(expected)
55
55
  ```
56
56
 
57
- Note: The new `expect` syntax no longer supports `==` matcher.
57
+ Note: The new `expect` syntax no longer supports the `==` matcher.
58
58
 
59
59
  ### Identity
60
60
 
@@ -71,6 +71,7 @@ expect(actual).to be >= expected
71
71
  expect(actual).to be <= expected
72
72
  expect(actual).to be < expected
73
73
  expect(actual).to be_within(delta).of(expected)
74
+ expect(array).to match_array(expected)
74
75
  ```
75
76
 
76
77
  ### Regular expressions
@@ -79,21 +80,25 @@ expect(actual).to be_within(delta).of(expected)
79
80
  expect(actual).to match(/expression/)
80
81
  ```
81
82
 
82
- Note: The new `expect` syntax no longer supports `=~` matcher.
83
+ Note: The new `expect` syntax no longer supports the `=~` matcher.
83
84
 
84
85
  ### Types/classes
85
86
 
86
87
  ```ruby
87
- expect(actual).to be_an_instance_of(expected)
88
- expect(actual).to be_a_kind_of(expected)
88
+ expect(actual).to be_an_instance_of(expected) # passes if actual.class == expected
89
+ expect(actual).to be_a(expected) # passes if actual.is_a?(expected)
90
+ expect(actual).to be_an(expected) # an alias for be_a
91
+ expect(actual).to be_a_kind_of(expected) # another alias
89
92
  ```
90
93
 
91
94
  ### Truthiness
92
95
 
93
96
  ```ruby
94
- expect(actual).to be_true # passes if actual is truthy (not nil or false)
95
- expect(actual).to be_false # passes if actual is falsy (nil or false)
96
- expect(actual).to be_nil # passes if actual is nil
97
+ expect(actual).to be_truthy # passes if actual is truthy (not nil or false)
98
+ expect(actual).to be true # passes if actual == true
99
+ expect(actual).to be_falsy # passes if actual is falsy (nil or false)
100
+ expect(actual).to be false # passes if actual == false
101
+ expect(actual).to be_nil # passes if actual is nil
97
102
  ```
98
103
 
99
104
  ### Expecting errors
@@ -182,3 +187,4 @@ See [detailed information on the `should` syntax and its usage.](https://github.
182
187
  * [http://github.com/rspec/rspec](http://github.com/rspec/rspec)
183
188
  * [http://github.com/rspec/rspec-core](http://github.com/rspec/rspec-core)
184
189
  * [http://github.com/rspec/rspec-mocks](http://github.com/rspec/rspec-mocks)
190
+ * [http://github.com/rspec/rspec-collection_matchers](https://github.com/rspec/rspec-collection_matchers)