rspec-expectations 2.14.0 → 3.0.0

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 (143) hide show
  1. checksums.yaml +15 -0
  2. checksums.yaml.gz.sig +0 -0
  3. data/Changelog.md +369 -25
  4. data/License.txt +1 -0
  5. data/README.md +88 -15
  6. data/lib/rspec/{matchers → expectations}/configuration.rb +44 -14
  7. data/lib/rspec/expectations/expectation_target.rb +67 -33
  8. data/lib/rspec/expectations/fail_with.rb +11 -53
  9. data/lib/rspec/expectations/handler.rb +126 -31
  10. data/lib/rspec/expectations/minitest_integration.rb +16 -0
  11. data/lib/rspec/expectations/syntax.rb +60 -94
  12. data/lib/rspec/expectations/version.rb +1 -1
  13. data/lib/rspec/expectations.rb +45 -23
  14. data/lib/rspec/matchers/aliased_matcher.rb +41 -0
  15. data/lib/rspec/matchers/built_in/all.rb +78 -0
  16. data/lib/rspec/matchers/built_in/base_matcher.rb +63 -15
  17. data/lib/rspec/matchers/built_in/be.rb +170 -81
  18. data/lib/rspec/matchers/built_in/be_between.rb +77 -0
  19. data/lib/rspec/matchers/built_in/be_instance_of.rb +11 -3
  20. data/lib/rspec/matchers/built_in/be_kind_of.rb +5 -0
  21. data/lib/rspec/matchers/built_in/be_within.rb +39 -15
  22. data/lib/rspec/matchers/built_in/change.rb +273 -80
  23. data/lib/rspec/matchers/built_in/compound.rb +122 -0
  24. data/lib/rspec/matchers/built_in/contain_exactly.rb +256 -0
  25. data/lib/rspec/matchers/built_in/cover.rb +3 -0
  26. data/lib/rspec/matchers/built_in/eq.rb +60 -6
  27. data/lib/rspec/matchers/built_in/eql.rb +17 -5
  28. data/lib/rspec/matchers/built_in/equal.rb +55 -21
  29. data/lib/rspec/matchers/built_in/exist.rb +74 -10
  30. data/lib/rspec/matchers/built_in/has.rb +71 -15
  31. data/lib/rspec/matchers/built_in/include.rb +64 -27
  32. data/lib/rspec/matchers/built_in/match.rb +19 -1
  33. data/lib/rspec/matchers/built_in/operators.rb +119 -0
  34. data/lib/rspec/matchers/built_in/output.rb +150 -0
  35. data/lib/rspec/matchers/built_in/raise_error.rb +84 -42
  36. data/lib/rspec/matchers/built_in/respond_to.rb +42 -20
  37. data/lib/rspec/matchers/built_in/satisfy.rb +19 -3
  38. data/lib/rspec/matchers/built_in/start_and_end_with.rb +54 -18
  39. data/lib/rspec/matchers/built_in/throw_symbol.rb +38 -8
  40. data/lib/rspec/matchers/built_in/yield.rb +175 -68
  41. data/lib/rspec/matchers/built_in.rb +45 -33
  42. data/lib/rspec/matchers/composable.rb +179 -0
  43. data/lib/rspec/matchers/dsl.rb +362 -5
  44. data/lib/rspec/matchers/generated_descriptions.rb +13 -6
  45. data/lib/rspec/matchers/matcher_delegator.rb +37 -0
  46. data/lib/rspec/matchers/pretty.rb +27 -20
  47. data/lib/rspec/matchers.rb +361 -136
  48. data.tar.gz.sig +1 -0
  49. metadata +99 -215
  50. metadata.gz.sig +0 -0
  51. data/features/README.md +0 -48
  52. data/features/Upgrade.md +0 -53
  53. data/features/built_in_matchers/README.md +0 -90
  54. data/features/built_in_matchers/be.feature +0 -175
  55. data/features/built_in_matchers/be_within.feature +0 -48
  56. data/features/built_in_matchers/cover.feature +0 -47
  57. data/features/built_in_matchers/end_with.feature +0 -48
  58. data/features/built_in_matchers/equality.feature +0 -139
  59. data/features/built_in_matchers/exist.feature +0 -45
  60. data/features/built_in_matchers/expect_change.feature +0 -59
  61. data/features/built_in_matchers/expect_error.feature +0 -144
  62. data/features/built_in_matchers/have.feature +0 -109
  63. data/features/built_in_matchers/include.feature +0 -174
  64. data/features/built_in_matchers/match.feature +0 -52
  65. data/features/built_in_matchers/operators.feature +0 -227
  66. data/features/built_in_matchers/predicates.feature +0 -137
  67. data/features/built_in_matchers/respond_to.feature +0 -84
  68. data/features/built_in_matchers/satisfy.feature +0 -33
  69. data/features/built_in_matchers/start_with.feature +0 -48
  70. data/features/built_in_matchers/throw_symbol.feature +0 -91
  71. data/features/built_in_matchers/types.feature +0 -116
  72. data/features/built_in_matchers/yield.feature +0 -161
  73. data/features/custom_matchers/access_running_example.feature +0 -53
  74. data/features/custom_matchers/define_diffable_matcher.feature +0 -27
  75. data/features/custom_matchers/define_matcher.feature +0 -368
  76. data/features/custom_matchers/define_matcher_outside_rspec.feature +0 -38
  77. data/features/custom_matchers/define_matcher_with_fluent_interface.feature +0 -24
  78. data/features/customized_message.feature +0 -22
  79. data/features/diffing.feature +0 -85
  80. data/features/implicit_docstrings.feature +0 -52
  81. data/features/step_definitions/additional_cli_steps.rb +0 -22
  82. data/features/support/env.rb +0 -14
  83. data/features/syntax_configuration.feature +0 -71
  84. data/features/test_frameworks/test_unit.feature +0 -44
  85. data/lib/rspec/expectations/deprecation.rb +0 -17
  86. data/lib/rspec/expectations/differ.rb +0 -133
  87. data/lib/rspec/expectations/errors.rb +0 -9
  88. data/lib/rspec/expectations/extensions/array.rb +0 -9
  89. data/lib/rspec/expectations/extensions/object.rb +0 -29
  90. data/lib/rspec/expectations/extensions.rb +0 -2
  91. data/lib/rspec/matchers/be_close.rb +0 -9
  92. data/lib/rspec/matchers/built_in/have.rb +0 -124
  93. data/lib/rspec/matchers/built_in/match_array.rb +0 -51
  94. data/lib/rspec/matchers/compatibility.rb +0 -14
  95. data/lib/rspec/matchers/extensions/instance_eval_with_args.rb +0 -39
  96. data/lib/rspec/matchers/matcher.rb +0 -300
  97. data/lib/rspec/matchers/method_missing.rb +0 -12
  98. data/lib/rspec/matchers/operator_matcher.rb +0 -109
  99. data/lib/rspec/matchers/test_unit_integration.rb +0 -11
  100. data/lib/rspec-expectations.rb +0 -1
  101. data/spec/rspec/expectations/differ_spec.rb +0 -192
  102. data/spec/rspec/expectations/expectation_target_spec.rb +0 -82
  103. data/spec/rspec/expectations/extensions/kernel_spec.rb +0 -67
  104. data/spec/rspec/expectations/fail_with_spec.rb +0 -114
  105. data/spec/rspec/expectations/handler_spec.rb +0 -227
  106. data/spec/rspec/expectations/syntax_spec.rb +0 -139
  107. data/spec/rspec/matchers/base_matcher_spec.rb +0 -62
  108. data/spec/rspec/matchers/be_close_spec.rb +0 -22
  109. data/spec/rspec/matchers/be_instance_of_spec.rb +0 -63
  110. data/spec/rspec/matchers/be_kind_of_spec.rb +0 -41
  111. data/spec/rspec/matchers/be_spec.rb +0 -516
  112. data/spec/rspec/matchers/be_within_spec.rb +0 -137
  113. data/spec/rspec/matchers/change_spec.rb +0 -553
  114. data/spec/rspec/matchers/configuration_spec.rb +0 -206
  115. data/spec/rspec/matchers/cover_spec.rb +0 -69
  116. data/spec/rspec/matchers/description_generation_spec.rb +0 -190
  117. data/spec/rspec/matchers/dsl_spec.rb +0 -57
  118. data/spec/rspec/matchers/eq_spec.rb +0 -60
  119. data/spec/rspec/matchers/eql_spec.rb +0 -41
  120. data/spec/rspec/matchers/equal_spec.rb +0 -78
  121. data/spec/rspec/matchers/exist_spec.rb +0 -124
  122. data/spec/rspec/matchers/has_spec.rb +0 -122
  123. data/spec/rspec/matchers/have_spec.rb +0 -455
  124. data/spec/rspec/matchers/include_matcher_integration_spec.rb +0 -30
  125. data/spec/rspec/matchers/include_spec.rb +0 -531
  126. data/spec/rspec/matchers/match_array_spec.rb +0 -194
  127. data/spec/rspec/matchers/match_spec.rb +0 -61
  128. data/spec/rspec/matchers/matcher_spec.rb +0 -471
  129. data/spec/rspec/matchers/matchers_spec.rb +0 -37
  130. data/spec/rspec/matchers/method_missing_spec.rb +0 -28
  131. data/spec/rspec/matchers/operator_matcher_spec.rb +0 -223
  132. data/spec/rspec/matchers/raise_error_spec.rb +0 -485
  133. data/spec/rspec/matchers/respond_to_spec.rb +0 -292
  134. data/spec/rspec/matchers/satisfy_spec.rb +0 -44
  135. data/spec/rspec/matchers/start_with_end_with_spec.rb +0 -186
  136. data/spec/rspec/matchers/throw_symbol_spec.rb +0 -116
  137. data/spec/rspec/matchers/yield_spec.rb +0 -514
  138. data/spec/spec_helper.rb +0 -54
  139. data/spec/support/classes.rb +0 -56
  140. data/spec/support/in_sub_process.rb +0 -38
  141. data/spec/support/matchers.rb +0 -22
  142. data/spec/support/ruby_version.rb +0 -10
  143. data/spec/support/shared_examples.rb +0 -13
data.tar.gz.sig ADDED
@@ -0,0 +1 @@
1
+ �t�!��Y��#��G����h�[��-[+;K ��\���k�ڜ�Ҍ�d�;�W&n7
metadata CHANGED
@@ -1,226 +1,195 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-expectations
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 2.14.0
4
+ version: 3.0.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Steven Baker
9
8
  - David Chelimsky
9
+ - Myron Marston
10
10
  autorequire:
11
11
  bindir: bin
12
- cert_chain: []
13
- date: 2013-07-06 00:00:00.000000000 Z
12
+ cert_chain:
13
+ - !binary |-
14
+ LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURqakNDQW5hZ0F3SUJB
15
+ Z0lCQVRBTkJna3Foa2lHOXcwQkFRVUZBREJHTVJJd0VBWURWUVFEREFseWMz
16
+ QmwKWXkxa1pYWXhHekFaQmdvSmtpYUprL0lzWkFFWkZndG5iMjluYkdWbmIz
17
+ VndjekVUTUJFR0NnbVNKb21UOGl4awpBUmtXQTJOdmJUQWVGdzB4TXpFeE1E
18
+ Y3hPVFF5TlRsYUZ3MHhOREV4TURjeE9UUXlOVGxhTUVZeEVqQVFCZ05WCkJB
19
+ TU1DWEp6Y0dWakxXUmxkakViTUJrR0NnbVNKb21UOGl4a0FSa1dDMmR2YjJk
20
+ c1pXZHZkWEJ6TVJNd0VRWUsKQ1pJbWlaUHlMR1FCR1JZRFkyOXRNSUlCSWpB
21
+ TkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQQpuaENlWm91
22
+ RExYV081NW5vK0VkWk5DdGpYamZKUTFYOVRiUGN2QkREMjlPeXBJVWNlMmgv
23
+ VmRLWEIyZ0k3WkhzCkY1TmtQZ2dzbFRFckdGbVdBdElpdXI3dTk0M1JWcUhP
24
+ c3lvSXN5MDY1RjlmQ3RyeWtrQSsyMmVsdlREaGE0SXoKUlVDdnVoUTNrbGF0
25
+ WWs0akYrY0d0MWpOT05OVmRMT2l5MGJNeW52Y003aG9WUTJBb213R3MrY0VP
26
+ V1EvNGRrRApKY05WM3FmekY1UUJjVEQyMzcyWE5NNTNiMjVuWVZRU1gyS0g1
27
+ RkY3QmhsS3lvdjMzYk9tMmdBOU0rbVdJdWpXCnFna3l4VmxmcmxFK1pCZ1Yz
28
+ d1huMUNvamcxTHBUcTM1eU9Bcmd3aW95cnd3bFpaSlI5am9OOXMvbkRrbGZy
29
+ NUEKK2R5RVRqRmM2Y21FUFdacnQyY0pCUUlEQVFBQm80R0dNSUdETUFrR0Ex
30
+ VWRFd1FDTUFBd0N3WURWUjBQQkFRRApBZ1N3TUIwR0ExVWREZ1FXQkJTVytX
31
+ RDdobjFzd0oxQTdpOHRidUZldU5DSkNqQWtCZ05WSFJFRUhUQWJnUmx5CmMz
32
+ QmxZeTFrWlhaQVoyOXZaMnhsWjI5MWNITXVZMjl0TUNRR0ExVWRFZ1FkTUJ1
33
+ QkdYSnpjR1ZqTFdSbGRrQm4KYjI5bmJHVm5iM1Z3Y3k1amIyMHdEUVlKS29a
34
+ SWh2Y05BUUVGQlFBRGdnRUJBSDI3akFaOHNEN3ZuWHVwajZZKwpCYUJkZkh0
35
+ Q2tGYXNsTEowYUt1TURJVlh3WXVLZnFvVzE1Y1pQRExtU0lFQnVRRk0zbHc2
36
+ ZC9oRUVMNFVvMmpaCkZ2dG1INU94aWZQRHpGeVV0Q0w0eXA2cWdOZS9YZjZz
37
+ RHNSZzZGbUtjcGdxQ3dOT21zVmlhZjBMUFNVSC9HWVEKM1Rlb3o4UUNhRGJE
38
+ N0FLc2ZmVDdlRHJuYkhuS3dlTzFYZGVtUkpDOTh1L3lZeG5Hek1TV0tFc24w
39
+ OWV0QmxaOQo3SDY3azVaM3VmNmNmTFpnVG9XTDZ6U2h6WlkzTnVuNXI3M1lz
40
+ TmYyL1FaT2U0VVplNHZmR3ZuNmJhdzUzeXM5CjF5SEMxQWNTWXB2aTJkQWJP
41
+ aUhUNWlRRitrcm00d3NlOEtjdFhnVE5uak1zSEVvR0t1bEpTMi9zWmw5MGpj
42
+ Q3oKbXVBPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
43
+ date: 2014-06-02 00:00:00.000000000 Z
14
44
  dependencies:
15
45
  - !ruby/object:Gem::Dependency
46
+ name: rspec-support
47
+ requirement: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ~>
50
+ - !ruby/object:Gem::Version
51
+ version: 3.0.0
52
+ type: :runtime
53
+ prerelease: false
16
54
  version_requirements: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ~>
57
+ - !ruby/object:Gem::Version
58
+ version: 3.0.0
59
+ - !ruby/object:Gem::Dependency
60
+ name: diff-lcs
61
+ requirement: !ruby/object:Gem::Requirement
17
62
  requirements:
18
63
  - - ! '>='
19
64
  - !ruby/object:Gem::Version
20
- version: 1.1.3
65
+ version: 1.2.0
21
66
  - - <
22
67
  - !ruby/object:Gem::Version
23
68
  version: '2.0'
24
- none: false
69
+ type: :runtime
25
70
  prerelease: false
26
- name: diff-lcs
27
- requirement: !ruby/object:Gem::Requirement
71
+ version_requirements: !ruby/object:Gem::Requirement
28
72
  requirements:
29
73
  - - ! '>='
30
74
  - !ruby/object:Gem::Version
31
- version: 1.1.3
75
+ version: 1.2.0
32
76
  - - <
33
77
  - !ruby/object:Gem::Version
34
78
  version: '2.0'
35
- none: false
36
- type: :runtime
37
79
  - !ruby/object:Gem::Dependency
38
- version_requirements: !ruby/object:Gem::Requirement
80
+ name: rake
81
+ requirement: !ruby/object:Gem::Requirement
39
82
  requirements:
40
83
  - - ~>
41
84
  - !ruby/object:Gem::Version
42
85
  version: 10.0.0
43
- none: false
86
+ type: :development
44
87
  prerelease: false
45
- name: rake
46
- requirement: !ruby/object:Gem::Requirement
88
+ version_requirements: !ruby/object:Gem::Requirement
47
89
  requirements:
48
90
  - - ~>
49
91
  - !ruby/object:Gem::Version
50
92
  version: 10.0.0
51
- none: false
52
- type: :development
53
93
  - !ruby/object:Gem::Dependency
54
- version_requirements: !ruby/object:Gem::Requirement
94
+ name: cucumber
95
+ requirement: !ruby/object:Gem::Requirement
55
96
  requirements:
56
97
  - - ~>
57
98
  - !ruby/object:Gem::Version
58
- version: 1.1.9
59
- none: false
99
+ version: '1.3'
100
+ type: :development
60
101
  prerelease: false
61
- name: cucumber
102
+ version_requirements: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - ~>
105
+ - !ruby/object:Gem::Version
106
+ version: '1.3'
107
+ - !ruby/object:Gem::Dependency
108
+ name: aruba
62
109
  requirement: !ruby/object:Gem::Requirement
63
110
  requirements:
64
111
  - - ~>
65
112
  - !ruby/object:Gem::Version
66
- version: 1.1.9
67
- none: false
113
+ version: '0.5'
68
114
  type: :development
69
- - !ruby/object:Gem::Dependency
115
+ prerelease: false
70
116
  version_requirements: !ruby/object:Gem::Requirement
71
117
  requirements:
72
118
  - - ~>
73
119
  - !ruby/object:Gem::Version
74
120
  version: '0.5'
75
- none: false
76
- prerelease: false
77
- name: aruba
121
+ - !ruby/object:Gem::Dependency
122
+ name: minitest
78
123
  requirement: !ruby/object:Gem::Requirement
79
124
  requirements:
80
125
  - - ~>
81
126
  - !ruby/object:Gem::Version
82
- version: '0.5'
83
- none: false
127
+ version: '5.2'
84
128
  type: :development
85
- description: rspec expectations (should[_not] and matchers)
86
- email: rspec-users@rubyforge.org
129
+ prerelease: false
130
+ version_requirements: !ruby/object:Gem::Requirement
131
+ requirements:
132
+ - - ~>
133
+ - !ruby/object:Gem::Version
134
+ version: '5.2'
135
+ description: rspec-expectations provides a simple, readable API to express expected
136
+ outcomes of a code example.
137
+ email: rspec@googlegroups.com
87
138
  executables: []
88
139
  extensions: []
89
140
  extra_rdoc_files: []
90
141
  files:
91
- - lib/rspec-expectations.rb
92
142
  - lib/rspec/expectations.rb
93
- - lib/rspec/expectations/deprecation.rb
94
- - lib/rspec/expectations/differ.rb
95
- - lib/rspec/expectations/errors.rb
143
+ - lib/rspec/expectations/configuration.rb
96
144
  - lib/rspec/expectations/expectation_target.rb
97
- - lib/rspec/expectations/extensions.rb
98
- - lib/rspec/expectations/extensions/array.rb
99
- - lib/rspec/expectations/extensions/object.rb
100
145
  - lib/rspec/expectations/fail_with.rb
101
146
  - lib/rspec/expectations/handler.rb
147
+ - lib/rspec/expectations/minitest_integration.rb
102
148
  - lib/rspec/expectations/syntax.rb
103
149
  - lib/rspec/expectations/version.rb
104
150
  - lib/rspec/matchers.rb
105
- - lib/rspec/matchers/be_close.rb
151
+ - lib/rspec/matchers/aliased_matcher.rb
106
152
  - lib/rspec/matchers/built_in.rb
153
+ - lib/rspec/matchers/built_in/all.rb
107
154
  - lib/rspec/matchers/built_in/base_matcher.rb
108
155
  - lib/rspec/matchers/built_in/be.rb
156
+ - lib/rspec/matchers/built_in/be_between.rb
109
157
  - lib/rspec/matchers/built_in/be_instance_of.rb
110
158
  - lib/rspec/matchers/built_in/be_kind_of.rb
111
159
  - lib/rspec/matchers/built_in/be_within.rb
112
160
  - lib/rspec/matchers/built_in/change.rb
161
+ - lib/rspec/matchers/built_in/compound.rb
162
+ - lib/rspec/matchers/built_in/contain_exactly.rb
113
163
  - lib/rspec/matchers/built_in/cover.rb
114
164
  - lib/rspec/matchers/built_in/eq.rb
115
165
  - lib/rspec/matchers/built_in/eql.rb
116
166
  - lib/rspec/matchers/built_in/equal.rb
117
167
  - lib/rspec/matchers/built_in/exist.rb
118
168
  - lib/rspec/matchers/built_in/has.rb
119
- - lib/rspec/matchers/built_in/have.rb
120
169
  - lib/rspec/matchers/built_in/include.rb
121
170
  - lib/rspec/matchers/built_in/match.rb
122
- - lib/rspec/matchers/built_in/match_array.rb
171
+ - lib/rspec/matchers/built_in/operators.rb
172
+ - lib/rspec/matchers/built_in/output.rb
123
173
  - lib/rspec/matchers/built_in/raise_error.rb
124
174
  - lib/rspec/matchers/built_in/respond_to.rb
125
175
  - lib/rspec/matchers/built_in/satisfy.rb
126
176
  - lib/rspec/matchers/built_in/start_and_end_with.rb
127
177
  - lib/rspec/matchers/built_in/throw_symbol.rb
128
178
  - lib/rspec/matchers/built_in/yield.rb
129
- - lib/rspec/matchers/compatibility.rb
130
- - lib/rspec/matchers/configuration.rb
179
+ - lib/rspec/matchers/composable.rb
131
180
  - lib/rspec/matchers/dsl.rb
132
- - lib/rspec/matchers/extensions/instance_eval_with_args.rb
133
181
  - lib/rspec/matchers/generated_descriptions.rb
134
- - lib/rspec/matchers/matcher.rb
135
- - lib/rspec/matchers/method_missing.rb
136
- - lib/rspec/matchers/operator_matcher.rb
182
+ - lib/rspec/matchers/matcher_delegator.rb
137
183
  - lib/rspec/matchers/pretty.rb
138
- - lib/rspec/matchers/test_unit_integration.rb
139
184
  - README.md
140
185
  - License.txt
141
186
  - Changelog.md
142
187
  - .yardopts
143
188
  - .document
144
- - features/README.md
145
- - features/Upgrade.md
146
- - features/built_in_matchers/README.md
147
- - features/built_in_matchers/be.feature
148
- - features/built_in_matchers/be_within.feature
149
- - features/built_in_matchers/cover.feature
150
- - features/built_in_matchers/end_with.feature
151
- - features/built_in_matchers/equality.feature
152
- - features/built_in_matchers/exist.feature
153
- - features/built_in_matchers/expect_change.feature
154
- - features/built_in_matchers/expect_error.feature
155
- - features/built_in_matchers/have.feature
156
- - features/built_in_matchers/include.feature
157
- - features/built_in_matchers/match.feature
158
- - features/built_in_matchers/operators.feature
159
- - features/built_in_matchers/predicates.feature
160
- - features/built_in_matchers/respond_to.feature
161
- - features/built_in_matchers/satisfy.feature
162
- - features/built_in_matchers/start_with.feature
163
- - features/built_in_matchers/throw_symbol.feature
164
- - features/built_in_matchers/types.feature
165
- - features/built_in_matchers/yield.feature
166
- - features/custom_matchers/access_running_example.feature
167
- - features/custom_matchers/define_diffable_matcher.feature
168
- - features/custom_matchers/define_matcher.feature
169
- - features/custom_matchers/define_matcher_outside_rspec.feature
170
- - features/custom_matchers/define_matcher_with_fluent_interface.feature
171
- - features/customized_message.feature
172
- - features/diffing.feature
173
- - features/implicit_docstrings.feature
174
- - features/step_definitions/additional_cli_steps.rb
175
- - features/support/env.rb
176
- - features/syntax_configuration.feature
177
- - features/test_frameworks/test_unit.feature
178
- - spec/rspec/expectations/differ_spec.rb
179
- - spec/rspec/expectations/expectation_target_spec.rb
180
- - spec/rspec/expectations/extensions/kernel_spec.rb
181
- - spec/rspec/expectations/fail_with_spec.rb
182
- - spec/rspec/expectations/handler_spec.rb
183
- - spec/rspec/expectations/syntax_spec.rb
184
- - spec/rspec/matchers/base_matcher_spec.rb
185
- - spec/rspec/matchers/be_close_spec.rb
186
- - spec/rspec/matchers/be_instance_of_spec.rb
187
- - spec/rspec/matchers/be_kind_of_spec.rb
188
- - spec/rspec/matchers/be_spec.rb
189
- - spec/rspec/matchers/be_within_spec.rb
190
- - spec/rspec/matchers/change_spec.rb
191
- - spec/rspec/matchers/configuration_spec.rb
192
- - spec/rspec/matchers/cover_spec.rb
193
- - spec/rspec/matchers/description_generation_spec.rb
194
- - spec/rspec/matchers/dsl_spec.rb
195
- - spec/rspec/matchers/eq_spec.rb
196
- - spec/rspec/matchers/eql_spec.rb
197
- - spec/rspec/matchers/equal_spec.rb
198
- - spec/rspec/matchers/exist_spec.rb
199
- - spec/rspec/matchers/has_spec.rb
200
- - spec/rspec/matchers/have_spec.rb
201
- - spec/rspec/matchers/include_matcher_integration_spec.rb
202
- - spec/rspec/matchers/include_spec.rb
203
- - spec/rspec/matchers/match_array_spec.rb
204
- - spec/rspec/matchers/match_spec.rb
205
- - spec/rspec/matchers/matcher_spec.rb
206
- - spec/rspec/matchers/matchers_spec.rb
207
- - spec/rspec/matchers/method_missing_spec.rb
208
- - spec/rspec/matchers/operator_matcher_spec.rb
209
- - spec/rspec/matchers/raise_error_spec.rb
210
- - spec/rspec/matchers/respond_to_spec.rb
211
- - spec/rspec/matchers/satisfy_spec.rb
212
- - spec/rspec/matchers/start_with_end_with_spec.rb
213
- - spec/rspec/matchers/throw_symbol_spec.rb
214
- - spec/rspec/matchers/yield_spec.rb
215
- - spec/spec_helper.rb
216
- - spec/support/classes.rb
217
- - spec/support/in_sub_process.rb
218
- - spec/support/matchers.rb
219
- - spec/support/ruby_version.rb
220
- - spec/support/shared_examples.rb
221
189
  homepage: http://github.com/rspec/rspec-expectations
222
190
  licenses:
223
191
  - MIT
192
+ metadata: {}
224
193
  post_install_message:
225
194
  rdoc_options:
226
195
  - --charset=UTF-8
@@ -230,102 +199,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
230
199
  requirements:
231
200
  - - ! '>='
232
201
  - !ruby/object:Gem::Version
233
- version: '0'
234
- segments:
235
- - 0
236
- hash: -2919541554530046896
237
- none: false
202
+ version: 1.8.7
238
203
  required_rubygems_version: !ruby/object:Gem::Requirement
239
204
  requirements:
240
205
  - - ! '>='
241
206
  - !ruby/object:Gem::Version
242
207
  version: '0'
243
- segments:
244
- - 0
245
- hash: -2919541554530046896
246
- none: false
247
208
  requirements: []
248
209
  rubyforge_project: rspec
249
- rubygems_version: 1.8.24
210
+ rubygems_version: 2.0.7
250
211
  signing_key:
251
- specification_version: 3
252
- summary: rspec-expectations-2.14.0
253
- test_files:
254
- - features/README.md
255
- - features/Upgrade.md
256
- - features/built_in_matchers/README.md
257
- - features/built_in_matchers/be.feature
258
- - features/built_in_matchers/be_within.feature
259
- - features/built_in_matchers/cover.feature
260
- - features/built_in_matchers/end_with.feature
261
- - features/built_in_matchers/equality.feature
262
- - features/built_in_matchers/exist.feature
263
- - features/built_in_matchers/expect_change.feature
264
- - features/built_in_matchers/expect_error.feature
265
- - features/built_in_matchers/have.feature
266
- - features/built_in_matchers/include.feature
267
- - features/built_in_matchers/match.feature
268
- - features/built_in_matchers/operators.feature
269
- - features/built_in_matchers/predicates.feature
270
- - features/built_in_matchers/respond_to.feature
271
- - features/built_in_matchers/satisfy.feature
272
- - features/built_in_matchers/start_with.feature
273
- - features/built_in_matchers/throw_symbol.feature
274
- - features/built_in_matchers/types.feature
275
- - features/built_in_matchers/yield.feature
276
- - features/custom_matchers/access_running_example.feature
277
- - features/custom_matchers/define_diffable_matcher.feature
278
- - features/custom_matchers/define_matcher.feature
279
- - features/custom_matchers/define_matcher_outside_rspec.feature
280
- - features/custom_matchers/define_matcher_with_fluent_interface.feature
281
- - features/customized_message.feature
282
- - features/diffing.feature
283
- - features/implicit_docstrings.feature
284
- - features/step_definitions/additional_cli_steps.rb
285
- - features/support/env.rb
286
- - features/syntax_configuration.feature
287
- - features/test_frameworks/test_unit.feature
288
- - spec/rspec/expectations/differ_spec.rb
289
- - spec/rspec/expectations/expectation_target_spec.rb
290
- - spec/rspec/expectations/extensions/kernel_spec.rb
291
- - spec/rspec/expectations/fail_with_spec.rb
292
- - spec/rspec/expectations/handler_spec.rb
293
- - spec/rspec/expectations/syntax_spec.rb
294
- - spec/rspec/matchers/base_matcher_spec.rb
295
- - spec/rspec/matchers/be_close_spec.rb
296
- - spec/rspec/matchers/be_instance_of_spec.rb
297
- - spec/rspec/matchers/be_kind_of_spec.rb
298
- - spec/rspec/matchers/be_spec.rb
299
- - spec/rspec/matchers/be_within_spec.rb
300
- - spec/rspec/matchers/change_spec.rb
301
- - spec/rspec/matchers/configuration_spec.rb
302
- - spec/rspec/matchers/cover_spec.rb
303
- - spec/rspec/matchers/description_generation_spec.rb
304
- - spec/rspec/matchers/dsl_spec.rb
305
- - spec/rspec/matchers/eq_spec.rb
306
- - spec/rspec/matchers/eql_spec.rb
307
- - spec/rspec/matchers/equal_spec.rb
308
- - spec/rspec/matchers/exist_spec.rb
309
- - spec/rspec/matchers/has_spec.rb
310
- - spec/rspec/matchers/have_spec.rb
311
- - spec/rspec/matchers/include_matcher_integration_spec.rb
312
- - spec/rspec/matchers/include_spec.rb
313
- - spec/rspec/matchers/match_array_spec.rb
314
- - spec/rspec/matchers/match_spec.rb
315
- - spec/rspec/matchers/matcher_spec.rb
316
- - spec/rspec/matchers/matchers_spec.rb
317
- - spec/rspec/matchers/method_missing_spec.rb
318
- - spec/rspec/matchers/operator_matcher_spec.rb
319
- - spec/rspec/matchers/raise_error_spec.rb
320
- - spec/rspec/matchers/respond_to_spec.rb
321
- - spec/rspec/matchers/satisfy_spec.rb
322
- - spec/rspec/matchers/start_with_end_with_spec.rb
323
- - spec/rspec/matchers/throw_symbol_spec.rb
324
- - spec/rspec/matchers/yield_spec.rb
325
- - spec/spec_helper.rb
326
- - spec/support/classes.rb
327
- - spec/support/in_sub_process.rb
328
- - spec/support/matchers.rb
329
- - spec/support/ruby_version.rb
330
- - spec/support/shared_examples.rb
212
+ specification_version: 4
213
+ summary: rspec-expectations-3.0.0
214
+ test_files: []
331
215
  has_rdoc:
metadata.gz.sig ADDED
Binary file
data/features/README.md DELETED
@@ -1,48 +0,0 @@
1
- rspec-expectations is used to define expected outcomes.
2
-
3
- describe Account do
4
- it "has a balance of zero when first created" do
5
- expect(Account.new.balance).to eq(Money.new(0))
6
- end
7
- end
8
-
9
- ## Basic structure
10
-
11
- The basic structure of an rspec expectation is:
12
-
13
- expect(actual).to matcher(expected)
14
- expect(actual).not_to matcher(expected)
15
-
16
- Note: You can also use `expect(..).to_not` instead of `expect(..).not_to`.
17
- One is an alias to the other, so you can use whichever reads better to you.
18
-
19
- #### Examples
20
-
21
- expect(5).to eq(5)
22
- expect(5).not_to eq(4)
23
-
24
- ## What is a matcher?
25
-
26
- A Matcher is any object that responds to the following methods:
27
-
28
- matches?(actual)
29
- failure_message_for_should
30
-
31
- These methods are also part of the matcher protocol, but are optional:
32
-
33
- does_not_match?(actual)
34
- failure_message_for_should_not
35
- description
36
-
37
- RSpec ships with a number of built-in matchers and a DSL for writing custom
38
- matchers.
39
-
40
- ## Issues
41
-
42
- The documentation for rspec-expectations is a work in progress. We'll be adding
43
- Cucumber features over time, and clarifying existing ones. If you have
44
- specific features you'd like to see added, find the existing documentation
45
- incomplete or confusing, or, better yet, wish to write a missing Cucumber
46
- feature yourself, please [submit an
47
- issue](http://github.com/rspec/rspec-expectations/issues) or a [pull
48
- request](http://github.com/rspec/rspec-expectations).
data/features/Upgrade.md DELETED
@@ -1,53 +0,0 @@
1
- # Upgrade to rspec-expectations-2.0
2
-
3
- ## What's new
4
-
5
- ### New `eq` matcher.
6
-
7
- `RSpec::Matchers` now offers you two approaches to differentiating between
8
- object identity. You can use the rspec-1 approach:
9
-
10
- actual.should == expected # object equality
11
- actual.should equal(expected) # object identity
12
-
13
- ... or, if you prefer:
14
-
15
- actual.should eq(expected) # object equality
16
- actual.should be(expected) # object identity
17
-
18
- ## What's been removed
19
-
20
- ### simple_matcher
21
-
22
- Use RSpec::Matchers.define instead. For example, if you had:
23
-
24
- def eat_cheese
25
- simple_matcher("eat cheese") do |actual|
26
- actual.eat?(:cheese)
27
- end
28
- end
29
-
30
- Change it to:
31
-
32
- RSpec::Matchers.define :eat_cheese do
33
- match do |actual|
34
- actual.eat?(:cheese)
35
- end
36
- end
37
-
38
- ### wrap_expectation
39
-
40
- Use RSpec::Matchers.define instead.
41
-
42
- RSpec::Matchers.define :eat_cheese do
43
- match do |actual|
44
- actual.should eat?(:cheese)
45
- end
46
- end
47
-
48
- RSpec::Matchers.define :eat_cheese do
49
- include MyCheesyAssertions
50
- match_unless_raises Test::Unit::AssertionFailedError do |actual|
51
- assert_eats_chesse actual
52
- end
53
- end
@@ -1,90 +0,0 @@
1
- # Built-in Matchers
2
-
3
- rspec-expectations ships with a number of built-in matchers.
4
- Each matcher can be used with `expect(..).to` or `expect(..).not_to` to define
5
- positive and negative expectations respectively on an object. Most matchers can
6
- also be accessed using the `(...).should` and `(...).should_not` syntax, see
7
- [using should syntax](https://github.com/rspec/rspec-expectations/blob/master/Should.md)
8
- for why we recommend using `expect`.
9
-
10
- e.g.
11
-
12
- expect(result).to eq(3)
13
- expect(list).not_to be_empty
14
- pi.should be > 3
15
-
16
- ## Object identity
17
-
18
- expect(actual).to be(expected) # passes if actual.equal?(expected)
19
-
20
- ## Object equivalence
21
-
22
- expect(actual).to eq(expected) # passes if actual == expected
23
-
24
- ## Optional APIs for identity/equivalence
25
-
26
- expect(actual).to eql(expected) # passes if actual.eql?(expected)
27
- expect(actual).to equal(expected) # passes if actual.equal?(expected)
28
-
29
- # NOTE: `expect` does not support `==` matcher.
30
-
31
- ## Comparisons
32
-
33
- expect(actual).to be > expected
34
- expect(actual).to be >= expected
35
- expect(actual).to be <= expected
36
- expect(actual).to be < expected
37
- expect(actual).to match(/expression/)
38
- expect(actual).to be_within(delta).of(expected)
39
-
40
- # NOTE: `expect` does not support `=~` matcher.
41
-
42
- ## Types/classes
43
-
44
- expect(actual).to be_instance_of(expected)
45
- expect(actual).to be_kind_of(expected)
46
-
47
- ## Truthiness and existentialism
48
-
49
- expect(actual).to be_true # passes if actual is truthy (not nil or false)
50
- expect(actual).to be_false # passes if actual is falsy (nil or false)
51
- expect(actual).to be_nil # passes if actual is nil
52
- expect(actual).to be # passes if actual is truthy (not nil or false)
53
-
54
- ## Expecting errors
55
-
56
- expect { ... }.to raise_error
57
- expect { ... }.to raise_error(ErrorClass)
58
- expect { ... }.to raise_error("message")
59
- expect { ... }.to raise_error(ErrorClass, "message")
60
-
61
- ## Expecting throws
62
-
63
- expect { ... }.to throw_symbol
64
- expect { ... }.to throw_symbol(:symbol)
65
- expect { ... }.to throw_symbol(:symbol, 'value')
66
-
67
- ## Predicate matchers
68
-
69
- expect(actual).to be_xxx # passes if actual.xxx?
70
- expect(actual).to have_xxx(:arg) # passes if actual.has_xxx?(:arg)
71
-
72
- ### Examples
73
-
74
- expect([]).to be_empty
75
- expect(:a => 1).to have_key(:a)
76
-
77
- ## Collection membership
78
-
79
- expect(actual).to include(expected)
80
-
81
- ### Examples
82
-
83
- expect([1,2,3]).to include(1)
84
- expect([1,2,3]).to include(1, 2)
85
- expect(:a => 'b').to include(:a => 'b')
86
- expect("this string").to include("is str")
87
-
88
- ## Ranges (1.9 only)
89
-
90
- expect(1..10).to cover(3)