rspec-core 2.0.0.beta.22 → 2.6.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 (171) hide show
  1. data/.gitignore +1 -0
  2. data/.rspec +0 -1
  3. data/.travis.yml +7 -0
  4. data/Gemfile +46 -20
  5. data/Guardfile +5 -0
  6. data/License.txt +2 -1
  7. data/{README.markdown → README.md} +23 -5
  8. data/Rakefile +58 -31
  9. data/bin/autospec +13 -0
  10. data/bin/rspec +24 -2
  11. data/cucumber.yml +1 -1
  12. data/features/.nav +57 -0
  13. data/features/Autotest.md +38 -0
  14. data/features/Changelog.md +269 -0
  15. data/features/README.md +17 -0
  16. data/features/Upgrade.md +320 -0
  17. data/features/command_line/README.md +28 -0
  18. data/features/command_line/configure.feature +18 -15
  19. data/features/command_line/example_name_option.feature +37 -23
  20. data/features/command_line/exit_status.feature +16 -31
  21. data/features/command_line/format_option.feature +73 -0
  22. data/features/command_line/line_number_appended_to_path.feature +25 -27
  23. data/features/command_line/line_number_option.feature +11 -10
  24. data/features/command_line/rake_task.feature +68 -0
  25. data/features/command_line/tag.feature +90 -0
  26. data/features/configuration/alias_example_to.feature +48 -0
  27. data/features/configuration/custom_settings.feature +8 -10
  28. data/features/configuration/fail_fast.feature +77 -0
  29. data/features/configuration/read_options_from_file.feature +42 -26
  30. data/features/example_groups/basic_structure.feature +55 -0
  31. data/features/example_groups/shared_context.feature +74 -0
  32. data/features/example_groups/shared_example_group.feature +56 -41
  33. data/features/expectation_framework_integration/configure_expectation_framework.feature +73 -0
  34. data/features/filtering/exclusion_filters.feature +69 -9
  35. data/features/filtering/if_and_unless.feature +168 -0
  36. data/features/filtering/inclusion_filters.feature +58 -26
  37. data/features/filtering/run_all_when_everything_filtered.feature +46 -0
  38. data/features/formatters/custom_formatter.feature +17 -13
  39. data/features/formatters/text_formatter.feature +43 -0
  40. data/features/helper_methods/arbitrary_methods.feature +40 -0
  41. data/features/helper_methods/let.feature +50 -0
  42. data/features/helper_methods/modules.feature +149 -0
  43. data/features/hooks/around_hooks.feature +99 -69
  44. data/features/hooks/before_and_after_hooks.feature +74 -40
  45. data/features/hooks/filtering.feature +227 -0
  46. data/features/metadata/current_example.feature +17 -0
  47. data/features/metadata/described_class.feature +17 -0
  48. data/features/metadata/user_defined.feature +111 -0
  49. data/features/mock_framework_integration/use_any_framework.feature +106 -0
  50. data/features/mock_framework_integration/use_flexmock.feature +84 -11
  51. data/features/mock_framework_integration/use_mocha.feature +85 -11
  52. data/features/mock_framework_integration/use_rr.feature +86 -11
  53. data/features/mock_framework_integration/use_rspec.feature +85 -11
  54. data/features/pending/pending_examples.feature +143 -5
  55. data/features/spec_files/arbitrary_file_suffix.feature +2 -2
  56. data/features/step_definitions/additional_cli_steps.rb +30 -0
  57. data/features/subject/attribute_of_subject.feature +93 -15
  58. data/features/subject/explicit_subject.feature +28 -17
  59. data/features/subject/implicit_receiver.feature +29 -0
  60. data/features/subject/implicit_subject.feature +9 -10
  61. data/features/support/env.rb +6 -1
  62. data/lib/autotest/discover.rb +1 -0
  63. data/lib/autotest/rspec2.rb +15 -11
  64. data/lib/rspec/autorun.rb +2 -0
  65. data/lib/rspec/core/backward_compatibility.rb +33 -4
  66. data/lib/rspec/core/command_line.rb +4 -28
  67. data/lib/rspec/core/command_line_configuration.rb +16 -16
  68. data/lib/rspec/core/configuration.rb +279 -89
  69. data/lib/rspec/core/configuration_options.rb +46 -35
  70. data/lib/rspec/core/deprecation.rb +1 -1
  71. data/lib/rspec/core/drb_command_line.rb +5 -11
  72. data/lib/rspec/core/example.rb +63 -39
  73. data/lib/rspec/core/example_group.rb +109 -59
  74. data/lib/rspec/core/expecting/with_rspec.rb +11 -0
  75. data/lib/rspec/core/expecting/with_stdlib.rb +9 -0
  76. data/lib/rspec/core/extensions/kernel.rb +1 -1
  77. data/lib/rspec/core/extensions/object.rb +1 -3
  78. data/lib/rspec/core/formatters/base_formatter.rb +22 -11
  79. data/lib/rspec/core/formatters/base_text_formatter.rb +46 -30
  80. data/lib/rspec/core/formatters/documentation_formatter.rb +4 -2
  81. data/lib/rspec/core/formatters/helpers.rb +0 -4
  82. data/lib/rspec/core/formatters/html_formatter.rb +146 -41
  83. data/lib/rspec/core/formatters/progress_formatter.rb +1 -0
  84. data/lib/rspec/core/formatters/snippet_extractor.rb +1 -1
  85. data/lib/rspec/core/formatters/text_mate_formatter.rb +3 -1
  86. data/lib/rspec/core/hooks.rb +55 -17
  87. data/lib/rspec/core/metadata.rb +75 -64
  88. data/lib/rspec/core/metadata_hash_builder.rb +93 -0
  89. data/lib/rspec/core/mocking/with_flexmock.rb +2 -0
  90. data/lib/rspec/core/mocking/with_mocha.rb +2 -0
  91. data/lib/rspec/core/mocking/with_rr.rb +2 -0
  92. data/lib/rspec/core/mocking/with_rspec.rb +3 -1
  93. data/lib/rspec/core/option_parser.rb +48 -5
  94. data/lib/rspec/core/pending.rb +22 -4
  95. data/lib/rspec/core/rake_task.rb +64 -28
  96. data/lib/rspec/core/reporter.rb +3 -2
  97. data/lib/rspec/core/ruby_project.rb +2 -2
  98. data/lib/rspec/core/runner.rb +50 -6
  99. data/lib/rspec/core/shared_context.rb +16 -0
  100. data/lib/rspec/core/shared_example_group.rb +19 -4
  101. data/lib/rspec/core/subject.rb +92 -65
  102. data/lib/rspec/core/version.rb +1 -1
  103. data/lib/rspec/core/world.rb +83 -25
  104. data/lib/rspec/core.rb +40 -24
  105. data/lib/rspec/monkey/spork/test_framework/rspec.rb +1 -0
  106. data/rspec-core.gemspec +4 -25
  107. data/script/FullBuildRakeFile +63 -0
  108. data/script/cucumber +1 -0
  109. data/script/full_build +1 -0
  110. data/script/spec +1 -0
  111. data/spec/autotest/discover_spec.rb +19 -0
  112. data/spec/autotest/failed_results_re_spec.rb +25 -9
  113. data/spec/autotest/rspec_spec.rb +32 -41
  114. data/spec/rspec/core/command_line_spec.rb +62 -7
  115. data/spec/rspec/core/configuration_options_spec.rb +184 -148
  116. data/spec/rspec/core/configuration_spec.rb +406 -108
  117. data/spec/rspec/core/deprecations_spec.rb +38 -1
  118. data/spec/rspec/core/drb_command_line_spec.rb +21 -56
  119. data/spec/rspec/core/example_group_spec.rb +366 -127
  120. data/spec/rspec/core/example_spec.rb +125 -45
  121. data/spec/rspec/core/formatters/base_formatter_spec.rb +61 -1
  122. data/spec/rspec/core/formatters/base_text_formatter_spec.rb +39 -5
  123. data/spec/rspec/core/formatters/documentation_formatter_spec.rb +7 -6
  124. data/spec/rspec/core/formatters/helpers_spec.rb +1 -1
  125. data/spec/rspec/core/formatters/html_formatted-1.8.6.html +199 -81
  126. data/spec/rspec/core/formatters/html_formatted-1.8.7-jruby.html +199 -83
  127. data/spec/rspec/core/formatters/html_formatted-1.8.7.html +199 -81
  128. data/spec/rspec/core/formatters/html_formatted-1.9.1.html +206 -81
  129. data/spec/rspec/core/formatters/html_formatted-1.9.2.html +206 -61
  130. data/spec/rspec/core/formatters/html_formatter_spec.rb +17 -9
  131. data/spec/rspec/core/formatters/progress_formatter_spec.rb +1 -1
  132. data/spec/rspec/core/formatters/text_mate_formatted-1.8.6.html +199 -81
  133. data/spec/rspec/core/formatters/text_mate_formatted-1.8.7-jruby.html +199 -81
  134. data/spec/rspec/core/formatters/text_mate_formatted-1.8.7.html +199 -81
  135. data/spec/rspec/core/formatters/text_mate_formatted-1.9.1.html +206 -81
  136. data/spec/rspec/core/formatters/text_mate_formatted-1.9.2.html +206 -81
  137. data/spec/rspec/core/formatters/text_mate_formatter_spec.rb +22 -7
  138. data/spec/rspec/core/hooks_filtering_spec.rb +128 -5
  139. data/spec/rspec/core/hooks_spec.rb +90 -4
  140. data/spec/rspec/core/metadata_spec.rb +176 -163
  141. data/spec/rspec/core/option_parser_spec.rb +73 -6
  142. data/spec/rspec/core/pending_example_spec.rb +137 -35
  143. data/spec/rspec/core/rake_task_spec.rb +62 -29
  144. data/spec/rspec/core/reporter_spec.rb +20 -4
  145. data/spec/rspec/core/resources/formatter_specs.rb +25 -1
  146. data/spec/rspec/core/rspec_matchers_spec.rb +45 -0
  147. data/spec/rspec/core/runner_spec.rb +60 -10
  148. data/spec/rspec/core/shared_context_spec.rb +30 -0
  149. data/spec/rspec/core/shared_example_group_spec.rb +59 -23
  150. data/spec/rspec/core/subject_spec.rb +136 -0
  151. data/spec/rspec/core/world_spec.rb +211 -68
  152. data/spec/rspec/core_spec.rb +28 -0
  153. data/spec/spec_helper.rb +41 -23
  154. data/spec/support/matchers.rb +44 -13
  155. data/spec/support/shared_example_groups.rb +41 -0
  156. data/spec/support/spec_files.rb +44 -0
  157. data/spec.txt +1126 -0
  158. metadata +99 -168
  159. data/.treasure_map.rb +0 -23
  160. data/History.md +0 -30
  161. data/Upgrade.markdown +0 -150
  162. data/autotest/discover.rb +0 -2
  163. data/features/README.markdown +0 -12
  164. data/features/example_groups/describe_aliases.feature +0 -25
  165. data/features/example_groups/nested_groups.feature +0 -44
  166. data/features/hooks/described_class.feature +0 -14
  167. data/features/hooks/halt.feature +0 -26
  168. data/lib/rspec/core/around_proxy.rb +0 -14
  169. data/lib/rspec/core/formatters.rb +0 -8
  170. data/spec/ruby_forker.rb +0 -13
  171. data/specs.watchr +0 -59
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-core
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: true
4
+ hash: 23
5
+ prerelease:
5
6
  segments:
6
7
  - 2
8
+ - 6
7
9
  - 0
8
- - 0
9
- - beta
10
- - 22
11
- version: 2.0.0.beta.22
10
+ version: 2.6.0
12
11
  platform: ruby
13
12
  authors:
14
13
  - Chad Humphries
@@ -17,180 +16,86 @@ autorequire:
17
16
  bindir: bin
18
17
  cert_chain: []
19
18
 
20
- date: 2010-09-12 00:00:00 -05:00
21
- default_executable: rspec
22
- dependencies:
23
- - !ruby/object:Gem::Dependency
24
- name: rspec-expectations
25
- requirement: &id001 !ruby/object:Gem::Requirement
26
- none: false
27
- requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- segments:
31
- - 2
32
- - 0
33
- - 0
34
- - beta
35
- - 22
36
- version: 2.0.0.beta.22
37
- type: :development
38
- prerelease: false
39
- version_requirements: *id001
40
- - !ruby/object:Gem::Dependency
41
- name: rspec-mocks
42
- requirement: &id002 !ruby/object:Gem::Requirement
43
- none: false
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- segments:
48
- - 2
49
- - 0
50
- - 0
51
- - beta
52
- - 22
53
- version: 2.0.0.beta.22
54
- type: :development
55
- prerelease: false
56
- version_requirements: *id002
57
- - !ruby/object:Gem::Dependency
58
- name: cucumber
59
- requirement: &id003 !ruby/object:Gem::Requirement
60
- none: false
61
- requirements:
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- segments:
65
- - 0
66
- - 5
67
- - 3
68
- version: 0.5.3
69
- type: :development
70
- prerelease: false
71
- version_requirements: *id003
72
- - !ruby/object:Gem::Dependency
73
- name: autotest
74
- requirement: &id004 !ruby/object:Gem::Requirement
75
- none: false
76
- requirements:
77
- - - ">="
78
- - !ruby/object:Gem::Version
79
- segments:
80
- - 4
81
- - 2
82
- - 9
83
- version: 4.2.9
84
- type: :development
85
- prerelease: false
86
- version_requirements: *id004
87
- - !ruby/object:Gem::Dependency
88
- name: syntax
89
- requirement: &id005 !ruby/object:Gem::Requirement
90
- none: false
91
- requirements:
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- segments:
95
- - 1
96
- - 0
97
- - 0
98
- version: 1.0.0
99
- type: :development
100
- prerelease: false
101
- version_requirements: *id005
102
- - !ruby/object:Gem::Dependency
103
- name: flexmock
104
- requirement: &id006 !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ">="
108
- - !ruby/object:Gem::Version
109
- segments:
110
- - 0
111
- version: "0"
112
- type: :development
113
- prerelease: false
114
- version_requirements: *id006
115
- - !ruby/object:Gem::Dependency
116
- name: mocha
117
- requirement: &id007 !ruby/object:Gem::Requirement
118
- none: false
119
- requirements:
120
- - - ">="
121
- - !ruby/object:Gem::Version
122
- segments:
123
- - 0
124
- version: "0"
125
- type: :development
126
- prerelease: false
127
- version_requirements: *id007
128
- - !ruby/object:Gem::Dependency
129
- name: rr
130
- requirement: &id008 !ruby/object:Gem::Requirement
131
- none: false
132
- requirements:
133
- - - ">="
134
- - !ruby/object:Gem::Version
135
- segments:
136
- - 0
137
- version: "0"
138
- type: :development
139
- prerelease: false
140
- version_requirements: *id008
141
- description: RSpec runner and example groups
142
- email: dchelimsky@gmail.com;chad.humphries@gmail.com
19
+ date: 2011-05-12 00:00:00 -05:00
20
+ default_executable:
21
+ dependencies: []
22
+
23
+ description: BDD for Ruby. RSpec runner and example groups.
24
+ email: rspec-users@rubyforge.org;
143
25
  executables:
26
+ - autospec
144
27
  - rspec
145
28
  extensions: []
146
29
 
147
30
  extra_rdoc_files:
148
- - README.markdown
31
+ - README.md
149
32
  files:
150
33
  - .document
151
34
  - .gitignore
152
35
  - .rspec
153
- - .treasure_map.rb
36
+ - .travis.yml
154
37
  - Gemfile
155
- - History.md
38
+ - Guardfile
156
39
  - License.txt
157
- - README.markdown
40
+ - README.md
158
41
  - Rakefile
159
- - Upgrade.markdown
160
- - autotest/discover.rb
42
+ - bin/autospec
161
43
  - bin/rspec
162
44
  - cucumber.yml
163
- - features/README.markdown
45
+ - features/.nav
46
+ - features/Autotest.md
47
+ - features/Changelog.md
48
+ - features/README.md
49
+ - features/Upgrade.md
50
+ - features/command_line/README.md
164
51
  - features/command_line/configure.feature
165
52
  - features/command_line/example_name_option.feature
166
53
  - features/command_line/exit_status.feature
54
+ - features/command_line/format_option.feature
167
55
  - features/command_line/line_number_appended_to_path.feature
168
56
  - features/command_line/line_number_option.feature
57
+ - features/command_line/rake_task.feature
58
+ - features/command_line/tag.feature
59
+ - features/configuration/alias_example_to.feature
169
60
  - features/configuration/custom_settings.feature
61
+ - features/configuration/fail_fast.feature
170
62
  - features/configuration/read_options_from_file.feature
171
- - features/example_groups/describe_aliases.feature
172
- - features/example_groups/nested_groups.feature
63
+ - features/example_groups/basic_structure.feature
64
+ - features/example_groups/shared_context.feature
173
65
  - features/example_groups/shared_example_group.feature
66
+ - features/expectation_framework_integration/configure_expectation_framework.feature
174
67
  - features/filtering/exclusion_filters.feature
68
+ - features/filtering/if_and_unless.feature
175
69
  - features/filtering/inclusion_filters.feature
70
+ - features/filtering/run_all_when_everything_filtered.feature
176
71
  - features/formatters/custom_formatter.feature
72
+ - features/formatters/text_formatter.feature
73
+ - features/helper_methods/arbitrary_methods.feature
74
+ - features/helper_methods/let.feature
75
+ - features/helper_methods/modules.feature
177
76
  - features/hooks/around_hooks.feature
178
77
  - features/hooks/before_and_after_hooks.feature
179
- - features/hooks/described_class.feature
180
- - features/hooks/halt.feature
78
+ - features/hooks/filtering.feature
79
+ - features/metadata/current_example.feature
80
+ - features/metadata/described_class.feature
81
+ - features/metadata/user_defined.feature
82
+ - features/mock_framework_integration/use_any_framework.feature
181
83
  - features/mock_framework_integration/use_flexmock.feature
182
84
  - features/mock_framework_integration/use_mocha.feature
183
85
  - features/mock_framework_integration/use_rr.feature
184
86
  - features/mock_framework_integration/use_rspec.feature
185
87
  - features/pending/pending_examples.feature
186
88
  - features/spec_files/arbitrary_file_suffix.feature
89
+ - features/step_definitions/additional_cli_steps.rb
187
90
  - features/subject/attribute_of_subject.feature
188
91
  - features/subject/explicit_subject.feature
92
+ - features/subject/implicit_receiver.feature
189
93
  - features/subject/implicit_subject.feature
190
94
  - features/support/env.rb
95
+ - lib/autotest/discover.rb
191
96
  - lib/autotest/rspec2.rb
97
+ - lib/rspec/autorun.rb
192
98
  - lib/rspec/core.rb
193
- - lib/rspec/core/around_proxy.rb
194
99
  - lib/rspec/core/backward_compatibility.rb
195
100
  - lib/rspec/core/command_line.rb
196
101
  - lib/rspec/core/command_line_configuration.rb
@@ -201,12 +106,13 @@ files:
201
106
  - lib/rspec/core/errors.rb
202
107
  - lib/rspec/core/example.rb
203
108
  - lib/rspec/core/example_group.rb
109
+ - lib/rspec/core/expecting/with_rspec.rb
110
+ - lib/rspec/core/expecting/with_stdlib.rb
204
111
  - lib/rspec/core/extensions.rb
205
112
  - lib/rspec/core/extensions/instance_eval_with_args.rb
206
113
  - lib/rspec/core/extensions/kernel.rb
207
114
  - lib/rspec/core/extensions/module_eval_with_args.rb
208
115
  - lib/rspec/core/extensions/object.rb
209
- - lib/rspec/core/formatters.rb
210
116
  - lib/rspec/core/formatters/base_formatter.rb
211
117
  - lib/rspec/core/formatters/base_text_formatter.rb
212
118
  - lib/rspec/core/formatters/documentation_formatter.rb
@@ -219,6 +125,7 @@ files:
219
125
  - lib/rspec/core/let.rb
220
126
  - lib/rspec/core/load_path.rb
221
127
  - lib/rspec/core/metadata.rb
128
+ - lib/rspec/core/metadata_hash_builder.rb
222
129
  - lib/rspec/core/mocking/with_absolutely_nothing.rb
223
130
  - lib/rspec/core/mocking/with_flexmock.rb
224
131
  - lib/rspec/core/mocking/with_mocha.rb
@@ -230,6 +137,7 @@ files:
230
137
  - lib/rspec/core/reporter.rb
231
138
  - lib/rspec/core/ruby_project.rb
232
139
  - lib/rspec/core/runner.rb
140
+ - lib/rspec/core/shared_context.rb
233
141
  - lib/rspec/core/shared_example_group.rb
234
142
  - lib/rspec/core/subject.rb
235
143
  - lib/rspec/core/version.rb
@@ -237,7 +145,13 @@ files:
237
145
  - lib/rspec/monkey.rb
238
146
  - lib/rspec/monkey/spork/test_framework/rspec.rb
239
147
  - rspec-core.gemspec
148
+ - script/FullBuildRakeFile
240
149
  - script/console
150
+ - script/cucumber
151
+ - script/full_build
152
+ - script/spec
153
+ - spec.txt
154
+ - spec/autotest/discover_spec.rb
241
155
  - spec/autotest/failed_results_re_spec.rb
242
156
  - spec/autotest/rspec_spec.rb
243
157
  - spec/rspec/core/command_line_configuration_spec.rb
@@ -282,30 +196,23 @@ files:
282
196
  - spec/rspec/core/resources/custom_example_group_runner.rb
283
197
  - spec/rspec/core/resources/formatter_specs.rb
284
198
  - spec/rspec/core/resources/utf8_encoded.rb
199
+ - spec/rspec/core/rspec_matchers_spec.rb
285
200
  - spec/rspec/core/ruby_project_spec.rb
286
201
  - spec/rspec/core/runner_spec.rb
202
+ - spec/rspec/core/shared_context_spec.rb
287
203
  - spec/rspec/core/shared_example_group_spec.rb
288
204
  - spec/rspec/core/subject_spec.rb
289
205
  - spec/rspec/core/world_spec.rb
290
206
  - spec/rspec/core_spec.rb
291
- - spec/ruby_forker.rb
292
207
  - spec/spec_helper.rb
293
208
  - spec/support/matchers.rb
294
- - specs.watchr
209
+ - spec/support/shared_example_groups.rb
210
+ - spec/support/spec_files.rb
295
211
  has_rdoc: true
296
- homepage: http://github.com/rspec/rspec-core
212
+ homepage: http://github.com/rspec
297
213
  licenses: []
298
214
 
299
- post_install_message: |
300
- **************************************************
301
-
302
- Thank you for installing rspec-core-2.0.0.beta.22
303
-
304
- Please be sure to look at Upgrade.markdown to see what might have changed
305
- since the last release.
306
-
307
- **************************************************
308
-
215
+ post_install_message:
309
216
  rdoc_options:
310
217
  - --charset=UTF-8
311
218
  require_paths:
@@ -315,56 +222,77 @@ required_ruby_version: !ruby/object:Gem::Requirement
315
222
  requirements:
316
223
  - - ">="
317
224
  - !ruby/object:Gem::Version
318
- hash: 2227276368104417494
225
+ hash: 3
319
226
  segments:
320
227
  - 0
321
228
  version: "0"
322
229
  required_rubygems_version: !ruby/object:Gem::Requirement
323
230
  none: false
324
231
  requirements:
325
- - - ">"
232
+ - - ">="
326
233
  - !ruby/object:Gem::Version
234
+ hash: 3
327
235
  segments:
328
- - 1
329
- - 3
330
- - 1
331
- version: 1.3.1
236
+ - 0
237
+ version: "0"
332
238
  requirements: []
333
239
 
334
240
  rubyforge_project: rspec
335
- rubygems_version: 1.3.7
241
+ rubygems_version: 1.6.2
336
242
  signing_key:
337
243
  specification_version: 3
338
- summary: rspec-core-2.0.0.beta.22
244
+ summary: rspec-core-2.6.0
339
245
  test_files:
340
- - features/README.markdown
246
+ - features/Autotest.md
247
+ - features/Changelog.md
248
+ - features/README.md
249
+ - features/Upgrade.md
250
+ - features/command_line/README.md
341
251
  - features/command_line/configure.feature
342
252
  - features/command_line/example_name_option.feature
343
253
  - features/command_line/exit_status.feature
254
+ - features/command_line/format_option.feature
344
255
  - features/command_line/line_number_appended_to_path.feature
345
256
  - features/command_line/line_number_option.feature
257
+ - features/command_line/rake_task.feature
258
+ - features/command_line/tag.feature
259
+ - features/configuration/alias_example_to.feature
346
260
  - features/configuration/custom_settings.feature
261
+ - features/configuration/fail_fast.feature
347
262
  - features/configuration/read_options_from_file.feature
348
- - features/example_groups/describe_aliases.feature
349
- - features/example_groups/nested_groups.feature
263
+ - features/example_groups/basic_structure.feature
264
+ - features/example_groups/shared_context.feature
350
265
  - features/example_groups/shared_example_group.feature
266
+ - features/expectation_framework_integration/configure_expectation_framework.feature
351
267
  - features/filtering/exclusion_filters.feature
268
+ - features/filtering/if_and_unless.feature
352
269
  - features/filtering/inclusion_filters.feature
270
+ - features/filtering/run_all_when_everything_filtered.feature
353
271
  - features/formatters/custom_formatter.feature
272
+ - features/formatters/text_formatter.feature
273
+ - features/helper_methods/arbitrary_methods.feature
274
+ - features/helper_methods/let.feature
275
+ - features/helper_methods/modules.feature
354
276
  - features/hooks/around_hooks.feature
355
277
  - features/hooks/before_and_after_hooks.feature
356
- - features/hooks/described_class.feature
357
- - features/hooks/halt.feature
278
+ - features/hooks/filtering.feature
279
+ - features/metadata/current_example.feature
280
+ - features/metadata/described_class.feature
281
+ - features/metadata/user_defined.feature
282
+ - features/mock_framework_integration/use_any_framework.feature
358
283
  - features/mock_framework_integration/use_flexmock.feature
359
284
  - features/mock_framework_integration/use_mocha.feature
360
285
  - features/mock_framework_integration/use_rr.feature
361
286
  - features/mock_framework_integration/use_rspec.feature
362
287
  - features/pending/pending_examples.feature
363
288
  - features/spec_files/arbitrary_file_suffix.feature
289
+ - features/step_definitions/additional_cli_steps.rb
364
290
  - features/subject/attribute_of_subject.feature
365
291
  - features/subject/explicit_subject.feature
292
+ - features/subject/implicit_receiver.feature
366
293
  - features/subject/implicit_subject.feature
367
294
  - features/support/env.rb
295
+ - spec/autotest/discover_spec.rb
368
296
  - spec/autotest/failed_results_re_spec.rb
369
297
  - spec/autotest/rspec_spec.rb
370
298
  - spec/rspec/core/command_line_configuration_spec.rb
@@ -409,12 +337,15 @@ test_files:
409
337
  - spec/rspec/core/resources/custom_example_group_runner.rb
410
338
  - spec/rspec/core/resources/formatter_specs.rb
411
339
  - spec/rspec/core/resources/utf8_encoded.rb
340
+ - spec/rspec/core/rspec_matchers_spec.rb
412
341
  - spec/rspec/core/ruby_project_spec.rb
413
342
  - spec/rspec/core/runner_spec.rb
343
+ - spec/rspec/core/shared_context_spec.rb
414
344
  - spec/rspec/core/shared_example_group_spec.rb
415
345
  - spec/rspec/core/subject_spec.rb
416
346
  - spec/rspec/core/world_spec.rb
417
347
  - spec/rspec/core_spec.rb
418
- - spec/ruby_forker.rb
419
348
  - spec/spec_helper.rb
420
349
  - spec/support/matchers.rb
350
+ - spec/support/shared_example_groups.rb
351
+ - spec/support/spec_files.rb
data/.treasure_map.rb DELETED
@@ -1,23 +0,0 @@
1
- Beholder.runner = 'clear; ruby -Ilib -Ispec'
2
-
3
- map_for(:rspec_core) do |m|
4
-
5
- m.watch 'lib', 'spec', 'example_specs'
6
-
7
- m.add_mapping %r%example_specs/(.*)_spec\.rb% do |match|
8
- ["example_specs/#{match[1]}_spec.rb"]
9
- end
10
-
11
- m.add_mapping %r%spec/(.*)_spec\.rb% do |match|
12
- ["spec/#{match[1]}_spec.rb"]
13
- end
14
-
15
- m.add_mapping %r%spec/spec_helper\.rb% do |match|
16
- Dir["spec/**/*_spec.rb"]
17
- end
18
-
19
- m.add_mapping %r%lib/(.*)\.rb% do |match|
20
- tests_matching match[1]
21
- end
22
-
23
- end
data/History.md DELETED
@@ -1,30 +0,0 @@
1
- ## rspec-core release history (incomplete)
2
-
3
- ### 2.0.0.beta.22 / 2010-09-12
4
-
5
- [full changelog](http://github.com/rspec/rspec-core/compare/v2.0.0.beta.20...v2.0.0.beta.22)
6
-
7
- * Enhancements
8
- * removed at_exit hook
9
- * CTRL-C stops the run (almost) immediately
10
- * first it cleans things up by running the appropriate after(:all) and after(:suite) hooks
11
- * then it reports on any examples that have already run
12
- * cleaned up rake task
13
- * generate correct task under variety of conditions
14
- * options are more consistent
15
- * deprecated redundant options
16
- * run 'bundle exec autotest' when Gemfile is present
17
- * support ERB in .rspec options files (Justin Ko)
18
- * depend on bundler for development tasks (Myron Marsten)
19
- * add example_group_finished to formatters and reporter (Roman Chernyatchik)
20
-
21
- * Bug fixes
22
- * support paths with spaces when using autotest (Andreas Neuhaus)
23
- * fix module_exec with ruby 1.8.6 (Myron Marsten)
24
- * remove context method from top-level
25
- * was conflicting with irb, for example
26
- * errors in before(:all) are now reported correctly (Chad Humphries)
27
-
28
- * Removals
29
- * removed -o --options-file command line option
30
- * use ./.rspec and ~/.rspec
data/Upgrade.markdown DELETED
@@ -1,150 +0,0 @@
1
- # Upgrade to rspec-core-2.0
2
-
3
- ## What's changed since rspec-1
4
-
5
- ### rspec command
6
-
7
- The command to run specs is now `rspec` instead of `spec`.
8
-
9
- rspec ./spec
10
-
11
- ### rake task
12
-
13
- The RSpec rake task has moved to:
14
-
15
- 'rspec/core/rake_task'
16
-
17
- ### autotest
18
-
19
- RSpec-2 works with autotest as follows:
20
-
21
- rspec --configure autotest
22
-
23
- This adds `./autotest/discover.rb` with:
24
-
25
- Autotest.add_discovery { "rspec2" }
26
-
27
- Now, on the command line just type:
28
-
29
- $ autotest
30
-
31
- Or, if you're using bundler:
32
-
33
- $ bundle exec autotest
34
-
35
- The `autospec` command is a thing of the past.
36
-
37
- ### RSpec
38
-
39
- The root namespace (top level module ) is now `RSpec` instead of `Spec`, and
40
- the root directory under `lib` within all of the `rspec` gems is `rspec` instead of `spec`.
41
-
42
- ### Configuration
43
-
44
- Typically in `spec/spec_helper.rb`, configuration is now done like this:
45
-
46
- RSpec.configure do |c|
47
- # ....
48
- end
49
-
50
- ### .rspec
51
-
52
- Command line options can be persisted in a `.rspec` file in a project. You
53
- can also store a `.rspec` file in your home directory (`~/.rspec`) with global
54
- options. Precedence is:
55
-
56
- command line
57
- ./.rspec
58
- ~/.rspec
59
-
60
- ## What's new
61
-
62
- ### Runner
63
-
64
- The new runner for rspec-2 comes from Micronaut.
65
-
66
- ### Metadata!
67
-
68
- In rspec-2, every example and example group comes with metadata information
69
- like the file and line number on which it was declared, the arguments passed to
70
- `describe` and `it`, etc. This metadata can be appended to through a hash
71
- argument passed to `describe` or `it`, allowing us to pre and post-process
72
- each example in a variety of ways.
73
-
74
- ### Filtering
75
-
76
- The most obvious use is for filtering the run. For example:
77
-
78
- # in spec/spec_helper.rb
79
- RSpec.configure do |c|
80
- c.filter_run :focus => true
81
- end
82
-
83
- # in any spec file
84
- describe "something" do
85
- it "does something", :focus => true do
86
- # ....
87
- end
88
- end
89
-
90
- When you run the `rspec` command, rspec will run only the examples that have
91
- `:focus => true` in the hash.
92
-
93
- You can also add `run_all_when_everything_filtered` to the config:
94
-
95
- RSpec.configure do |c|
96
- c.filter_run :focus => true
97
- c.run_all_when_everything_filtered = true
98
- end
99
-
100
- Now if there are no examples tagged with `:focus => true`, all examples
101
- will be run. This makes it really easy to focus on one example for a
102
- while, but then go back to running all of the examples by removing that
103
- argument from `it`. Works with `describe` too, in which case it runs
104
- all of the examples in that group.
105
-
106
- The configuration will accept a lambda, which provides a lot of flexibility
107
- in filtering examples. Say, for example, you have a spec for functionality that
108
- behaves slightly differently in Ruby 1.8 and Ruby 1.9. We have that in
109
- rspec-core, and here's how we're getting the right stuff to run under the
110
- right version:
111
-
112
- # in spec/spec_helper.rb
113
- RSpec.configure do |c|
114
- c.exclusion_filter = { :ruby => lambda {|version|
115
- !(RUBY_VERSION.to_s =~ /^#{version.to_s}/)
116
- }}
117
- end
118
-
119
- # in any spec file
120
- describe "something" do
121
- it "does something", :ruby => 1.8 do
122
- # ....
123
- end
124
-
125
- it "does something", :ruby => 1.9 do
126
- # ....
127
- end
128
- end
129
-
130
- In this case, we're using `exclusion_filter` instead of `filter_run` or
131
- `filter`, which indicate _inclusion_ filters. So each of those examples is
132
- excluded if we're _not_ running the version of Ruby they work with.
133
-
134
- ### Shared example groups
135
-
136
- Shared example groups are now run in a nested group within the including group
137
- (they used to be run in the same group). Nested groups inherit `before`, `after`,
138
- `around`, and `let` hooks, as well as any methods that are defined in the parent
139
- group.
140
-
141
- This new approach provides better encapsulation, better output, and an
142
- opportunity to add contextual information to the shared group via a block
143
- passed to `it_should_behave_like`.
144
-
145
- See [features/example\_groups/shared\_example\_group.feature](http://github.com/rspec/rspec-core/blob/master/features/example_groups/shared_example_group.feature) for more information.
146
-
147
- NOTICE: The including example groups no longer have access to any of the
148
- methods, hooks, or state defined inside a shared group. This will break specs
149
- that were using shared example groups to extend the behavior of including
150
- groups in any way besides their intended purpose: to add examples to a group.
data/autotest/discover.rb DELETED
@@ -1,2 +0,0 @@
1
- Autotest.add_discovery { "rspec2" }
2
-
@@ -1,12 +0,0 @@
1
- # Cucumber features
2
-
3
- RSpec is specified using both RSpec and
4
- [Cucumber](http://github.com/aslakhellesoy/cucumber). Cucumber provides
5
- _executable documentation_. This means that the _.feature_ files below this
6
- directory serve as specification, documentation _and_ regression tests of the
7
- behaviour.
8
-
9
- ## Issues
10
-
11
- If you find this documentation incomplete or confusing, please [submit an
12
- issue](http://github.com/rspec/rspec-core/issues).
@@ -1,25 +0,0 @@
1
- Feature: Nested example groups
2
-
3
- As an RSpec user
4
- I want to use alternate names for describe
5
- So that I can better organize my examples
6
-
7
- Scenario: Using context
8
- Given a file named "context_instead_of_describe_spec.rb" with:
9
- """
10
- require "rspec/expectations"
11
-
12
- describe "Using context" do
13
- context "with nested context" do
14
- it "should do this" do
15
- true.should be_true
16
- end
17
- end
18
- end
19
- """
20
- When I run "rspec ./context_instead_of_describe_spec.rb -fn"
21
- Then the output should contain:
22
- """
23
- Using context
24
- with nested context
25
- """