dchelimsky-rspec 1.1.12 → 1.1.99.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +35 -0
- data/License.txt +1 -1
- data/Manifest.txt +22 -73
- data/README.txt +2 -2
- data/Rakefile +32 -7
- data/TODO.txt +9 -4
- data/bin/spec +1 -1
- data/cucumber.yml +2 -0
- data/examples/failing/spec_helper.rb +1 -1
- data/examples/passing/filtered_formatter.rb +18 -0
- data/examples/passing/filtered_formatter_example.rb +31 -0
- data/examples/passing/spec_helper.rb +1 -1
- data/examples/ruby1.9.compatibility/access_to_constants_spec.rb +17 -18
- data/features/before_and_after_blocks/before_and_after_blocks.feature +4 -4
- data/features/example_groups/autogenerated_docstrings.feature +2 -2
- data/features/example_groups/example_group_with_should_methods.feature +1 -1
- data/features/example_groups/nested_groups.feature +1 -1
- data/features/interop/examples_and_tests_together.feature +1 -1
- data/features/interop/test_but_not_test_unit.feature +1 -1
- data/features/interop/test_case_with_should_methods.feature +1 -1
- data/features/mock_framework_integration/use_flexmock.feature +22 -4
- data/features/mock_framework_integration/use_mocha.feature +27 -0
- data/features/mock_framework_integration/use_rr.feature +27 -0
- data/features/step_definitions/running_rspec.rb +5 -3
- data/features/support/env.rb +1 -1
- data/features-pending/cli/conditional_exclusion.feature +39 -0
- data/lib/{adapters → spec/adapters}/mock_frameworks/flexmock.rb +1 -0
- data/lib/{adapters → spec/adapters}/mock_frameworks/mocha.rb +1 -0
- data/lib/{adapters → spec/adapters}/mock_frameworks/rr.rb +1 -0
- data/lib/{adapters → spec/adapters}/mock_frameworks/rspec.rb +0 -1
- data/lib/spec/autorun.rb +3 -0
- data/lib/spec/example/before_and_after_hooks.rb +5 -20
- data/lib/spec/example/example_description.rb +15 -0
- data/lib/spec/example/example_group.rb +0 -15
- data/lib/spec/example/example_group_factory.rb +34 -46
- data/lib/spec/example/example_group_hierarchy.rb +53 -0
- data/lib/spec/example/example_group_methods.rb +96 -211
- data/lib/spec/example/example_methods.rb +62 -81
- data/lib/spec/example/module_reopening_fix.rb +23 -1
- data/lib/spec/example/predicate_matchers.rb +47 -0
- data/lib/spec/example/subject.rb +91 -0
- data/lib/spec/example.rb +4 -0
- data/lib/spec/expectations/extensions.rb +0 -1
- data/lib/spec/expectations/handler.rb +6 -1
- data/lib/spec/expectations.rb +1 -1
- data/lib/spec/interop/test/unit/testcase.rb +5 -22
- data/lib/spec/interop/test.rb +1 -0
- data/lib/spec/matchers/be.rb +2 -7
- data/lib/spec/matchers/be_close.rb +20 -5
- data/lib/spec/matchers/change.rb +5 -3
- data/lib/spec/matchers/eql.rb +24 -6
- data/lib/spec/matchers/equal.rb +24 -6
- data/lib/spec/matchers/exist.rb +21 -5
- data/lib/spec/matchers/generated_descriptions.rb +2 -2
- data/lib/spec/matchers/has.rb +28 -11
- data/lib/spec/matchers/match.rb +25 -7
- data/lib/spec/matchers/match_array.rb +1 -1
- data/lib/spec/matchers/method_missing.rb +2 -2
- data/lib/spec/matchers/operator_matcher.rb +12 -5
- data/lib/spec/matchers/raise_error.rb +1 -1
- data/lib/spec/matchers/respond_to.rb +1 -1
- data/lib/spec/matchers/satisfy.rb +5 -5
- data/lib/spec/matchers/throw_symbol.rb +1 -3
- data/lib/spec/mocks/argument_expectation.rb +1 -1
- data/lib/spec/mocks/argument_matchers.rb +233 -0
- data/lib/spec/mocks/error_generator.rb +2 -6
- data/lib/spec/mocks/message_expectation.rb +3 -11
- data/lib/spec/mocks/mock.rb +1 -1
- data/lib/spec/mocks/proxy.rb +5 -1
- data/lib/spec/runner/configuration.rb +3 -3
- data/lib/spec/runner/drb_command_line.rb +2 -1
- data/lib/spec/runner/example_group_runner.rb +2 -1
- data/lib/spec/runner/formatter/base_text_formatter.rb +28 -17
- data/lib/spec/runner/formatter/failing_example_groups_formatter.rb +3 -5
- data/lib/spec/runner/formatter/html_formatter.rb +2 -3
- data/lib/spec/runner/formatter/nested_text_formatter.rb +7 -25
- data/lib/spec/runner/formatter/progress_bar_formatter.rb +1 -1
- data/lib/spec/runner/formatter/specdoc_formatter.rb +1 -7
- data/lib/spec/runner/heckle_runner_unsupported.rb +1 -1
- data/lib/spec/runner/option_parser.rb +16 -19
- data/lib/spec/runner/options.rb +28 -26
- data/lib/spec/runner/reporter.rb +8 -9
- data/lib/spec/runner.rb +6 -28
- data/lib/spec/test/unit.rb +10 -0
- data/lib/spec/version.rb +2 -2
- data/{features/support → resources}/helpers/cmdline.rb +2 -2
- data/resources/rake/verify_rcov.rake +1 -1
- data/resources/spec/example_group_with_should_methods.rb +1 -1
- data/resources/spec/simple_spec.rb +1 -1
- data/resources/test/spec_and_test_together.rb +2 -3
- data/resources/test/spec_including_test_but_not_unit.rb +1 -1
- data/resources/test/test_case_with_should_methods.rb +2 -3
- data/rspec.gemspec +5 -5
- data/spec/spec/dsl/main_spec.rb +3 -3
- data/spec/spec/example/example_group_class_definition_spec.rb +11 -14
- data/spec/spec/example/example_group_factory_spec.rb +31 -44
- data/spec/spec/example/example_group_methods_spec.rb +86 -52
- data/spec/spec/example/example_group_spec.rb +16 -75
- data/spec/spec/example/example_matcher_spec.rb +10 -10
- data/spec/spec/example/example_methods_spec.rb +101 -241
- data/spec/spec/example/nested_example_group_spec.rb +2 -2
- data/spec/spec/example/pending_module_spec.rb +1 -1
- data/spec/spec/example/shared_example_group_spec.rb +2 -2
- data/spec/spec/interop/test/unit/resources/spec_that_fails.rb +2 -2
- data/spec/spec/interop/test/unit/resources/spec_that_passes.rb +2 -2
- data/spec/spec/interop/test/unit/resources/spec_with_errors.rb +2 -2
- data/spec/spec/interop/test/unit/resources/spec_with_options_hash.rb +2 -2
- data/spec/spec/interop/test/unit/resources/test_case_that_fails.rb +2 -2
- data/spec/spec/interop/test/unit/resources/test_case_that_passes.rb +2 -2
- data/spec/spec/interop/test/unit/resources/test_case_with_errors.rb +2 -2
- data/spec/spec/interop/test/unit/resources/testsuite_adapter_spec_with_test_unit.rb +2 -2
- data/spec/spec/matchers/change_spec.rb +8 -0
- data/spec/spec/matchers/exist_spec.rb +8 -4
- data/spec/spec/matchers/handler_spec.rb +8 -1
- data/spec/spec/matchers/matcher_methods_spec.rb +1 -1
- data/spec/spec/mocks/{bug_report_496.rb → bug_report_496_spec.rb} +0 -0
- data/spec/spec/mocks/failing_argument_matchers_spec.rb +95 -0
- data/spec/spec/mocks/nil_expectation_warning_spec.rb +1 -1
- data/spec/spec/mocks/passing_argument_matchers_spec.rb +145 -0
- data/spec/spec/runner/configuration_spec.rb +12 -12
- data/spec/spec/runner/formatter/base_text_formatter_spec.rb +72 -1
- data/spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb +8 -8
- data/spec/spec/runner/formatter/failing_examples_formatter_spec.rb +4 -4
- data/spec/spec/runner/formatter/html_formatted-1.8.6.html +8 -8
- data/spec/spec/runner/formatter/html_formatted-1.8.7.html +38 -26
- data/spec/spec/runner/formatter/html_formatted-1.9.1.html +61 -53
- data/spec/spec/runner/formatter/html_formatter_spec.rb +100 -48
- data/spec/spec/runner/formatter/nested_text_formatter_spec.rb +20 -34
- data/spec/spec/runner/formatter/profile_formatter_spec.rb +1 -1
- data/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +8 -6
- data/spec/spec/runner/formatter/specdoc_formatter_spec.rb +6 -6
- data/spec/spec/runner/formatter/text_mate_formatted-1.8.6.html +20 -20
- data/spec/spec/runner/formatter/text_mate_formatted-1.8.7.html +38 -26
- data/spec/spec/runner/formatter/{spec_mate_formatter_spec.rb → text_mate_formatter_spec.rb} +10 -8
- data/spec/spec/runner/heckle_runner_spec.rb +1 -1
- data/spec/spec/runner/option_parser_spec.rb +15 -13
- data/spec/spec/runner/options_spec.rb +34 -0
- data/spec/spec/runner/reporter_spec.rb +65 -61
- data/spec/spec/runner/spec_drb.opts +1 -0
- data/spec/spec/runner_spec.rb +7 -5
- data/spec/spec_helper.rb +23 -0
- metadata +25 -76
- data/examples/passing/legacy_spec.rb +0 -11
- data/features/support/helpers/story_helper.rb +0 -13
- data/lib/spec/expectations/extensions/string_and_symbol.rb +0 -17
- data/resources/spec/spec_with_flexmock.rb +0 -19
- data/spec/spec/spec_spec.rb +0 -21
data/History.txt
CHANGED
@@ -1,3 +1,38 @@
|
|
1
|
+
=== Maintenance
|
2
|
+
|
3
|
+
WARNINGS:
|
4
|
+
|
5
|
+
* If you use the ruby command to run specs instead of the spec command, you'll
|
6
|
+
need to require 'spec/autorun' or they won't run. This won't affect you if
|
7
|
+
you use the spec command or the Spec::Rake::SpecTask that ships with RSpec.
|
8
|
+
|
9
|
+
* require 'spec/test/unit' to invoke test/unit interop if you're using
|
10
|
+
RSpec's core (this is handled implicitly with spec-rails)
|
11
|
+
|
12
|
+
* setup/teardown is gone - use before/after instead
|
13
|
+
|
14
|
+
* you can still use setup/teardown if you're using Test::Unit::TestCase as
|
15
|
+
the base ExampleGroup class (which is implicit in rspec-rails)
|
16
|
+
|
17
|
+
* deprecations
|
18
|
+
|
19
|
+
* BaseTextFormatter#colourize - use colorize_failure instead.
|
20
|
+
* BaseTextFormatter#magenta - use red instead.
|
21
|
+
|
22
|
+
* enhancements
|
23
|
+
|
24
|
+
* allow registering example groups with a path-like key (Pat Maddox)
|
25
|
+
* start DRb service at "druby://localhost:0" (Hongli Lai) - See http://redmine.ruby-lang.org/issues/show/496
|
26
|
+
* consistent reporting of errors as failures
|
27
|
+
* added spec/test/unit as more intuitive path to loading test/unit interop lib
|
28
|
+
* added explicit autorun feature for running specs with ruby command
|
29
|
+
* added handling for does_not_match? for matchers that want to know the context in which they were called
|
30
|
+
|
31
|
+
* bug fixes
|
32
|
+
|
33
|
+
* support delegating operator matchers to subject with should_not
|
34
|
+
* all arguments are included if --drb is specified in spec.opts (Neil Buckley). Closes #671.
|
35
|
+
|
1
36
|
=== Version 1.1.12 / 2009-01-11
|
2
37
|
|
3
38
|
WARNING: there was a stub/mock bug in 1.1.11 that allowed a structure that was
|
data/License.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -7,6 +7,7 @@ Rakefile
|
|
7
7
|
TODO.txt
|
8
8
|
bin/autospec
|
9
9
|
bin/spec
|
10
|
+
cucumber.yml
|
10
11
|
examples/failing/README.txt
|
11
12
|
examples/failing/diffing_spec.rb
|
12
13
|
examples/failing/failing_autogenerated_docstrings_example.rb
|
@@ -31,11 +32,12 @@ examples/passing/custom_formatter.rb
|
|
31
32
|
examples/passing/dynamic_spec.rb
|
32
33
|
examples/passing/file_accessor.rb
|
33
34
|
examples/passing/file_accessor_spec.rb
|
35
|
+
examples/passing/filtered_formatter.rb
|
36
|
+
examples/passing/filtered_formatter_example.rb
|
34
37
|
examples/passing/greeter_spec.rb
|
35
38
|
examples/passing/helper_method_example.rb
|
36
39
|
examples/passing/io_processor.rb
|
37
40
|
examples/passing/io_processor_spec.rb
|
38
|
-
examples/passing/legacy_spec.rb
|
39
41
|
examples/passing/mocking_example.rb
|
40
42
|
examples/passing/multi_threaded_example_group_runner.rb
|
41
43
|
examples/passing/nested_classes_example.rb
|
@@ -53,6 +55,7 @@ examples/passing/stack_spec_with_nested_example_groups.rb
|
|
53
55
|
examples/passing/stubbing_example.rb
|
54
56
|
examples/passing/yielding_example.rb
|
55
57
|
examples/ruby1.9.compatibility/access_to_constants_spec.rb
|
58
|
+
features-pending/cli/conditional_exclusion.feature
|
56
59
|
features/before_and_after_blocks/before_and_after_blocks.feature
|
57
60
|
features/example_groups/autogenerated_docstrings.feature
|
58
61
|
features/example_groups/example_group_with_should_methods.feature
|
@@ -62,38 +65,42 @@ features/interop/examples_and_tests_together.feature
|
|
62
65
|
features/interop/test_but_not_test_unit.feature
|
63
66
|
features/interop/test_case_with_should_methods.feature
|
64
67
|
features/mock_framework_integration/use_flexmock.feature
|
68
|
+
features/mock_framework_integration/use_mocha.feature
|
69
|
+
features/mock_framework_integration/use_rr.feature
|
65
70
|
features/step_definitions/running_rspec.rb
|
66
71
|
features/support/env.rb
|
67
|
-
features/support/helpers/cmdline.rb
|
68
|
-
features/support/helpers/story_helper.rb
|
69
72
|
features/support/matchers/smart_match.rb
|
70
73
|
init.rb
|
71
|
-
lib/adapters/mock_frameworks/flexmock.rb
|
72
|
-
lib/adapters/mock_frameworks/mocha.rb
|
73
|
-
lib/adapters/mock_frameworks/rr.rb
|
74
|
-
lib/adapters/mock_frameworks/rspec.rb
|
75
74
|
lib/autotest/discover.rb
|
76
75
|
lib/autotest/rspec.rb
|
77
76
|
lib/spec.rb
|
77
|
+
lib/spec/adapters/mock_frameworks/flexmock.rb
|
78
|
+
lib/spec/adapters/mock_frameworks/mocha.rb
|
79
|
+
lib/spec/adapters/mock_frameworks/rr.rb
|
80
|
+
lib/spec/adapters/mock_frameworks/rspec.rb
|
81
|
+
lib/spec/autorun.rb
|
78
82
|
lib/spec/dsl.rb
|
79
83
|
lib/spec/dsl/main.rb
|
80
84
|
lib/spec/example.rb
|
81
85
|
lib/spec/example/before_and_after_hooks.rb
|
82
86
|
lib/spec/example/errors.rb
|
87
|
+
lib/spec/example/example_description.rb
|
83
88
|
lib/spec/example/example_group.rb
|
84
89
|
lib/spec/example/example_group_factory.rb
|
90
|
+
lib/spec/example/example_group_hierarchy.rb
|
85
91
|
lib/spec/example/example_group_methods.rb
|
86
92
|
lib/spec/example/example_matcher.rb
|
87
93
|
lib/spec/example/example_methods.rb
|
88
94
|
lib/spec/example/module_reopening_fix.rb
|
89
95
|
lib/spec/example/pending.rb
|
96
|
+
lib/spec/example/predicate_matchers.rb
|
90
97
|
lib/spec/example/shared_example_group.rb
|
98
|
+
lib/spec/example/subject.rb
|
91
99
|
lib/spec/expectations.rb
|
92
100
|
lib/spec/expectations/differs/default.rb
|
93
101
|
lib/spec/expectations/errors.rb
|
94
102
|
lib/spec/expectations/extensions.rb
|
95
103
|
lib/spec/expectations/extensions/object.rb
|
96
|
-
lib/spec/expectations/extensions/string_and_symbol.rb
|
97
104
|
lib/spec/expectations/handler.rb
|
98
105
|
lib/spec/interop/test.rb
|
99
106
|
lib/spec/interop/test/unit/autorunner.rb
|
@@ -124,8 +131,8 @@ lib/spec/matchers/simple_matcher.rb
|
|
124
131
|
lib/spec/matchers/throw_symbol.rb
|
125
132
|
lib/spec/matchers/wrap_expectation.rb
|
126
133
|
lib/spec/mocks.rb
|
127
|
-
lib/spec/mocks/argument_constraints.rb
|
128
134
|
lib/spec/mocks/argument_expectation.rb
|
135
|
+
lib/spec/mocks/argument_matchers.rb
|
129
136
|
lib/spec/mocks/error_generator.rb
|
130
137
|
lib/spec/mocks/errors.rb
|
131
138
|
lib/spec/mocks/extensions.rb
|
@@ -158,9 +165,6 @@ lib/spec/runner/formatter/profile_formatter.rb
|
|
158
165
|
lib/spec/runner/formatter/progress_bar_formatter.rb
|
159
166
|
lib/spec/runner/formatter/snippet_extractor.rb
|
160
167
|
lib/spec/runner/formatter/specdoc_formatter.rb
|
161
|
-
lib/spec/runner/formatter/story/html_formatter.rb
|
162
|
-
lib/spec/runner/formatter/story/plain_text_formatter.rb
|
163
|
-
lib/spec/runner/formatter/story/progress_bar_formatter.rb
|
164
168
|
lib/spec/runner/formatter/text_mate_formatter.rb
|
165
169
|
lib/spec/runner/heckle_runner.rb
|
166
170
|
lib/spec/runner/heckle_runner_unsupported.rb
|
@@ -168,33 +172,15 @@ lib/spec/runner/option_parser.rb
|
|
168
172
|
lib/spec/runner/options.rb
|
169
173
|
lib/spec/runner/reporter.rb
|
170
174
|
lib/spec/runner/spec_parser.rb
|
171
|
-
lib/spec/
|
172
|
-
lib/spec/story/extensions.rb
|
173
|
-
lib/spec/story/extensions/main.rb
|
174
|
-
lib/spec/story/extensions/regexp.rb
|
175
|
-
lib/spec/story/extensions/string.rb
|
176
|
-
lib/spec/story/given_scenario.rb
|
177
|
-
lib/spec/story/runner.rb
|
178
|
-
lib/spec/story/runner/plain_text_story_runner.rb
|
179
|
-
lib/spec/story/runner/scenario_collector.rb
|
180
|
-
lib/spec/story/runner/scenario_runner.rb
|
181
|
-
lib/spec/story/runner/story_mediator.rb
|
182
|
-
lib/spec/story/runner/story_parser.rb
|
183
|
-
lib/spec/story/runner/story_runner.rb
|
184
|
-
lib/spec/story/scenario.rb
|
185
|
-
lib/spec/story/step.rb
|
186
|
-
lib/spec/story/step_group.rb
|
187
|
-
lib/spec/story/step_mother.rb
|
188
|
-
lib/spec/story/story.rb
|
189
|
-
lib/spec/story/world.rb
|
175
|
+
lib/spec/test/unit.rb
|
190
176
|
lib/spec/version.rb
|
177
|
+
resources/helpers/cmdline.rb
|
191
178
|
resources/rake/examples.rake
|
192
179
|
resources/rake/examples_with_rcov.rake
|
193
180
|
resources/rake/failing_examples_with_html.rake
|
194
181
|
resources/rake/verify_rcov.rake
|
195
182
|
resources/spec/example_group_with_should_methods.rb
|
196
183
|
resources/spec/simple_spec.rb
|
197
|
-
resources/spec/spec_with_flexmock.rb
|
198
184
|
resources/test/spec_and_test_together.rb
|
199
185
|
resources/test/spec_including_test_but_not_unit.rb
|
200
186
|
resources/test/test_case_with_should_methods.rb
|
@@ -251,7 +237,6 @@ spec/spec/matchers/include_spec.rb
|
|
251
237
|
spec/spec/matchers/match_array_spec.rb
|
252
238
|
spec/spec/matchers/match_spec.rb
|
253
239
|
spec/spec/matchers/matcher_methods_spec.rb
|
254
|
-
spec/spec/matchers/mock_constraint_matchers_spec.rb
|
255
240
|
spec/spec/matchers/operator_matcher_spec.rb
|
256
241
|
spec/spec/matchers/raise_error_spec.rb
|
257
242
|
spec/spec/matchers/respond_to_spec.rb
|
@@ -266,13 +251,13 @@ spec/spec/mocks/bug_report_10260_spec.rb
|
|
266
251
|
spec/spec/mocks/bug_report_10263_spec.rb
|
267
252
|
spec/spec/mocks/bug_report_11545_spec.rb
|
268
253
|
spec/spec/mocks/bug_report_15719_spec.rb
|
269
|
-
spec/spec/mocks/
|
254
|
+
spec/spec/mocks/bug_report_496_spec.rb
|
270
255
|
spec/spec/mocks/bug_report_600_spec.rb
|
271
256
|
spec/spec/mocks/bug_report_7611_spec.rb
|
272
257
|
spec/spec/mocks/bug_report_7805_spec.rb
|
273
258
|
spec/spec/mocks/bug_report_8165_spec.rb
|
274
259
|
spec/spec/mocks/bug_report_8302_spec.rb
|
275
|
-
spec/spec/mocks/
|
260
|
+
spec/spec/mocks/failing_argument_matchers_spec.rb
|
276
261
|
spec/spec/mocks/hash_including_matcher_spec.rb
|
277
262
|
spec/spec/mocks/hash_not_including_matcher_spec.rb
|
278
263
|
spec/spec/mocks/mock_ordering_spec.rb
|
@@ -285,7 +270,7 @@ spec/spec/mocks/once_counts_spec.rb
|
|
285
270
|
spec/spec/mocks/options_hash_spec.rb
|
286
271
|
spec/spec/mocks/partial_mock_spec.rb
|
287
272
|
spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb
|
288
|
-
spec/spec/mocks/
|
273
|
+
spec/spec/mocks/passing_argument_matchers_spec.rb
|
289
274
|
spec/spec/mocks/precise_counts_spec.rb
|
290
275
|
spec/spec/mocks/record_messages_spec.rb
|
291
276
|
spec/spec/mocks/stub_spec.rb
|
@@ -316,15 +301,12 @@ spec/spec/runner/formatter/nested_text_formatter_spec.rb
|
|
316
301
|
spec/spec/runner/formatter/profile_formatter_spec.rb
|
317
302
|
spec/spec/runner/formatter/progress_bar_formatter_spec.rb
|
318
303
|
spec/spec/runner/formatter/snippet_extractor_spec.rb
|
319
|
-
spec/spec/runner/formatter/spec_mate_formatter_spec.rb
|
320
304
|
spec/spec/runner/formatter/specdoc_formatter_spec.rb
|
321
|
-
spec/spec/runner/formatter/story/html_formatter_spec.rb
|
322
|
-
spec/spec/runner/formatter/story/plain_text_formatter_spec.rb
|
323
|
-
spec/spec/runner/formatter/story/progress_bar_formatter_spec.rb
|
324
305
|
spec/spec/runner/formatter/text_mate_formatted-1.8.4.html
|
325
306
|
spec/spec/runner/formatter/text_mate_formatted-1.8.6.html
|
326
307
|
spec/spec/runner/formatter/text_mate_formatted-1.8.7.html
|
327
308
|
spec/spec/runner/formatter/text_mate_formatted-1.9.1.html
|
309
|
+
spec/spec/runner/formatter/text_mate_formatter_spec.rb
|
328
310
|
spec/spec/runner/heckle_runner_spec.rb
|
329
311
|
spec/spec/runner/heckler_spec.rb
|
330
312
|
spec/spec/runner/noisy_backtrace_tweaker_spec.rb
|
@@ -347,37 +329,4 @@ spec/spec/runner/spec_parser_spec.rb
|
|
347
329
|
spec/spec/runner/spec_spaced.opts
|
348
330
|
spec/spec/runner_spec.rb
|
349
331
|
spec/spec/spec_classes.rb
|
350
|
-
spec/spec/spec_spec.rb
|
351
|
-
spec/spec/story/builders.rb
|
352
|
-
spec/spec/story/extensions/main_spec.rb
|
353
|
-
spec/spec/story/extensions_spec.rb
|
354
|
-
spec/spec/story/given_scenario_spec.rb
|
355
|
-
spec/spec/story/runner/plain_text_story_runner_spec.rb
|
356
|
-
spec/spec/story/runner/scenario_collector_spec.rb
|
357
|
-
spec/spec/story/runner/scenario_runner_spec.rb
|
358
|
-
spec/spec/story/runner/story_mediator_spec.rb
|
359
|
-
spec/spec/story/runner/story_parser_spec.rb
|
360
|
-
spec/spec/story/runner/story_runner_spec.rb
|
361
|
-
spec/spec/story/runner_spec.rb
|
362
|
-
spec/spec/story/scenario_spec.rb
|
363
|
-
spec/spec/story/step_group_spec.rb
|
364
|
-
spec/spec/story/step_mother_spec.rb
|
365
|
-
spec/spec/story/step_spec.rb
|
366
|
-
spec/spec/story/story_helper.rb
|
367
|
-
spec/spec/story/story_spec.rb
|
368
|
-
spec/spec/story/world_spec.rb
|
369
332
|
spec/spec_helper.rb
|
370
|
-
story_server/prototype/javascripts/builder.js
|
371
|
-
story_server/prototype/javascripts/controls.js
|
372
|
-
story_server/prototype/javascripts/dragdrop.js
|
373
|
-
story_server/prototype/javascripts/effects.js
|
374
|
-
story_server/prototype/javascripts/prototype.js
|
375
|
-
story_server/prototype/javascripts/rspec.js
|
376
|
-
story_server/prototype/javascripts/scriptaculous.js
|
377
|
-
story_server/prototype/javascripts/slider.js
|
378
|
-
story_server/prototype/javascripts/sound.js
|
379
|
-
story_server/prototype/javascripts/unittest.js
|
380
|
-
story_server/prototype/lib/server.rb
|
381
|
-
story_server/prototype/stories.html
|
382
|
-
story_server/prototype/stylesheets/rspec.css
|
383
|
-
story_server/prototype/stylesheets/test.css
|
data/README.txt
CHANGED
@@ -12,10 +12,10 @@ examples.
|
|
12
12
|
|
13
13
|
== FEATURES:
|
14
14
|
|
15
|
-
* Spec::Example provides a framework for
|
15
|
+
* Spec::Example provides a framework for organizing executable code examples
|
16
16
|
* Spec::Expectations adds #should and #should_not to every object
|
17
17
|
* Spec::Matchers provides Expression Matchers for use with #should and #should_not
|
18
|
-
* Spec::Mocks is a full featured
|
18
|
+
* Spec::Mocks is a full featured mock object/stubbing library
|
19
19
|
|
20
20
|
== SYNOPSIS:
|
21
21
|
|
data/Rakefile
CHANGED
@@ -28,23 +28,28 @@ end
|
|
28
28
|
Rake.application.instance_variable_get('@tasks').delete(task)
|
29
29
|
end
|
30
30
|
|
31
|
-
|
32
|
-
task :default => :verify_rcov
|
33
|
-
|
34
|
-
# # Some of the tasks are in separate files since they are also part of the website documentation
|
31
|
+
# Some of the tasks are in separate files since they are also part of the website documentation
|
35
32
|
load File.dirname(__FILE__) + '/resources/rake/examples.rake'
|
36
33
|
load File.dirname(__FILE__) + '/resources/rake/examples_with_rcov.rake'
|
37
34
|
load File.dirname(__FILE__) + '/resources/rake/failing_examples_with_html.rake'
|
38
35
|
load File.dirname(__FILE__) + '/resources/rake/verify_rcov.rake'
|
39
36
|
|
37
|
+
task :default => [:verify_rcov, :features]
|
38
|
+
|
40
39
|
desc "Run all specs"
|
41
40
|
Spec::Rake::SpecTask.new do |t|
|
42
41
|
t.spec_files = FileList['spec/**/*_spec.rb']
|
43
42
|
t.spec_opts = ['--options', 'spec/spec.opts']
|
44
|
-
|
43
|
+
end
|
44
|
+
|
45
|
+
namespace :spec do
|
46
|
+
desc "Run all specs with rcov"
|
47
|
+
Spec::Rake::SpecTask.new('rcov') do |t|
|
48
|
+
t.spec_files = FileList['spec/**/*_spec.rb']
|
49
|
+
t.spec_opts = ['--options', 'spec/spec.opts']
|
45
50
|
t.rcov = true
|
46
51
|
t.rcov_dir = 'coverage'
|
47
|
-
t.rcov_opts = ['--
|
52
|
+
t.rcov_opts = ['--exclude', "lib/spec.rb,lib/spec/runner.rb,spec\/spec,bin\/spec,examples,\/gems,\/Library\/Ruby,\.autotest,#{ENV['GEM_HOME']}"]
|
48
53
|
end
|
49
54
|
end
|
50
55
|
|
@@ -86,4 +91,24 @@ task :verify_committed do
|
|
86
91
|
raise "\n!!! Do a git commit first !!!\n\n" if line =~ /^#\s*modified:/
|
87
92
|
end
|
88
93
|
end
|
89
|
-
end
|
94
|
+
end
|
95
|
+
|
96
|
+
namespace :update do
|
97
|
+
desc "update the manfest"
|
98
|
+
task :manifest do
|
99
|
+
system %q[touch Manifest.txt; rake check_manifest | grep -v "(in " | patch]
|
100
|
+
end
|
101
|
+
|
102
|
+
desc "update the gemspec"
|
103
|
+
task :gemspec do
|
104
|
+
system %q[rake debug_gem | grep -v "(in " | grep -v "else" | grep -v "s.add_dependency(%q<hoe" | grep -v "s.add_dependency(%q<cuc" > `basename \\`pwd\\``.gemspec]
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
task :clobber => :clobber_tmp
|
109
|
+
|
110
|
+
task :clobber_tmp do
|
111
|
+
cmd = %q[rm -r tmp]
|
112
|
+
puts cmd
|
113
|
+
system cmd if test ?d, 'tmp'
|
114
|
+
end
|
data/TODO.txt
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
Refactoring for 1.2.0
|
4
4
|
|
5
|
-
* eliminate dependency from Spec::Example to Spec::Runner
|
6
5
|
** global predictate matchers should be stored in run_options
|
7
6
|
* eliminate dependency on global options and configuration
|
8
7
|
** the only place they should exist is in the Runner, which should manage them
|
@@ -10,9 +9,15 @@ Refactoring for 1.2.0
|
|
10
9
|
== Future
|
11
10
|
|
12
11
|
* do SOMETHING with the website
|
13
|
-
* extract spec/story to rspec-stories (new gem)
|
14
|
-
* rename top level namespace to Rspec and commands to 'rspec' and 'autorspec'
|
15
|
-
* continue to support Spec 'spec' and 'autospec' as aliases for a reasonable time
|
16
12
|
* separate the underlying framework from the DSL
|
17
13
|
* be able to do everything with classes and methods
|
18
14
|
* tweak raise_error rdoc to show only one arg
|
15
|
+
|
16
|
+
== Ruby 1.9.1
|
17
|
+
|
18
|
+
* no heckle (for now)
|
19
|
+
|
20
|
+
== rspec-2.0
|
21
|
+
|
22
|
+
* rename top level namespace to Rspec and commands to 'rspec' and 'autorspec'
|
23
|
+
* continue to support Spec 'spec' and 'autospec' as aliases for a reasonable time
|
data/bin/spec
CHANGED
data/cucumber.yml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__), "/../../lib")
|
2
|
+
require 'spec/runner/formatter/nested_text_formatter'
|
3
|
+
|
4
|
+
class FilteredFormatter < Spec::Runner::Formatter::NestedTextFormatter
|
5
|
+
def add_example_group(example_group)
|
6
|
+
if example_group.options[:show] == false
|
7
|
+
@showing = false
|
8
|
+
else
|
9
|
+
@showing = true
|
10
|
+
puts example_group.description
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def example_passed(example)
|
15
|
+
puts " " << example.description if @showing unless example.options[:show] == false
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# This demonstrates how you can write custom formatters to handle arbitrary
|
2
|
+
# options passed to the +describe+ and +it+ methods. To see it in action, stand
|
3
|
+
# in the project root and say:
|
4
|
+
#
|
5
|
+
# bin/spec -r examples/passing/filtered_formatter.rb examples/passing/filtered_formatter_example.rb -f FilteredFormatter
|
6
|
+
#
|
7
|
+
# You should only see the examples and groups below that are not explicitly
|
8
|
+
# marked :show => false
|
9
|
+
#
|
10
|
+
# group 1
|
11
|
+
# example 1 a
|
12
|
+
# group 3
|
13
|
+
# example 3
|
14
|
+
|
15
|
+
|
16
|
+
describe "group 1", :show => true do
|
17
|
+
it "example 1 a", :show => true do
|
18
|
+
end
|
19
|
+
it "example 1 b", :show => false do
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe "group 2", :show => false do
|
24
|
+
it "example 2" do
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe "group 3" do
|
29
|
+
it "example 3" do
|
30
|
+
end
|
31
|
+
end
|
@@ -12,33 +12,33 @@ module Foo
|
|
12
12
|
def method_in_enclosing_module;end
|
13
13
|
CONSTANT_IN_ENCLOSING_MODULE = 0
|
14
14
|
|
15
|
-
describe "Examples trying to access constants defined in an enclosing module" do
|
15
|
+
describe "Examples trying to access constants defined in an enclosing module" do
|
16
16
|
|
17
|
-
it "can access Modules" do
|
17
|
+
it "can access Modules" do
|
18
18
|
ModuleInEnclosingModule
|
19
19
|
end
|
20
|
-
it "can access Classes" do
|
20
|
+
it "can access Classes" do
|
21
21
|
ClassInEnclosingModule.new
|
22
22
|
end
|
23
|
-
it "can access CONSTANTS" do
|
23
|
+
it "can access CONSTANTS" do
|
24
24
|
CONSTANT_IN_ENCLOSING_MODULE
|
25
25
|
end
|
26
|
-
it "can NOT access methods" do
|
26
|
+
it "can NOT access methods" do
|
27
27
|
lambda {method_in_enclosing_module}.should raise_error(/undefined/)
|
28
28
|
end
|
29
29
|
|
30
|
-
describe "from a nested example group" do
|
30
|
+
describe "from a nested example group" do
|
31
31
|
|
32
|
-
it "can access Modules" do
|
32
|
+
it "can access Modules" do
|
33
33
|
ModuleInEnclosingModule
|
34
34
|
end
|
35
|
-
it "can access Classes" do
|
35
|
+
it "can access Classes" do
|
36
36
|
ClassInEnclosingModule.new
|
37
37
|
end
|
38
|
-
it "can access CONSTANTS" do
|
38
|
+
it "can access CONSTANTS" do
|
39
39
|
CONSTANT_IN_ENCLOSING_MODULE
|
40
40
|
end
|
41
|
-
it "can NOT access methods" do
|
41
|
+
it "can NOT access methods" do
|
42
42
|
lambda {method_in_enclosing_module}.should raise_error(/undefined/)
|
43
43
|
end
|
44
44
|
|
@@ -46,7 +46,7 @@ module Foo
|
|
46
46
|
|
47
47
|
end
|
48
48
|
|
49
|
-
describe "Examples trying to access constants defined in the example group" do
|
49
|
+
describe "Examples trying to access constants defined in the example group" do
|
50
50
|
|
51
51
|
module ModuleDefinedInGroup;end
|
52
52
|
class ClassDefinedInGroup; end
|
@@ -56,13 +56,13 @@ module Foo
|
|
56
56
|
it "can access Modules" do
|
57
57
|
ModuleDefinedInGroup
|
58
58
|
end
|
59
|
-
it "can access Classes" do
|
59
|
+
it "can access Classes" do
|
60
60
|
ClassDefinedInGroup.new
|
61
61
|
end
|
62
|
-
it "can access CONSTANTS" do
|
62
|
+
it "can access CONSTANTS" do
|
63
63
|
CONSTANT_DEFINED_IN_GROUP
|
64
64
|
end
|
65
|
-
it "can access methods" do
|
65
|
+
it "can access methods" do
|
66
66
|
method_defined_in_group
|
67
67
|
end
|
68
68
|
|
@@ -70,17 +70,16 @@ module Foo
|
|
70
70
|
it "can access Modules" do
|
71
71
|
ModuleDefinedInGroup
|
72
72
|
end
|
73
|
-
it "can access Classes" do
|
73
|
+
it "can access Classes" do
|
74
74
|
ClassDefinedInGroup.new
|
75
75
|
end
|
76
|
-
it "can access CONSTANTS" do
|
76
|
+
it "can access CONSTANTS" do
|
77
77
|
CONSTANT_DEFINED_IN_GROUP
|
78
78
|
end
|
79
|
-
it "can access methods" do
|
79
|
+
it "can access methods" do
|
80
80
|
method_defined_in_group
|
81
81
|
end
|
82
82
|
end
|
83
83
|
end
|
84
84
|
end
|
85
85
|
end
|
86
|
-
|
@@ -57,7 +57,7 @@ Feature: before and after blocks
|
|
57
57
|
end
|
58
58
|
end
|
59
59
|
"""
|
60
|
-
When I run it with the spec
|
60
|
+
When I run it with the spec command
|
61
61
|
Then the stdout should match "3 examples, 0 failures"
|
62
62
|
|
63
63
|
Scenario: define before(:all) block in example group
|
@@ -89,7 +89,7 @@ Feature: before and after blocks
|
|
89
89
|
end
|
90
90
|
end
|
91
91
|
"""
|
92
|
-
When I run it with the spec
|
92
|
+
When I run it with the spec command
|
93
93
|
Then the stdout should match "3 examples, 0 failures"
|
94
94
|
|
95
95
|
Scenario: define before and after blocks in configuration
|
@@ -125,7 +125,7 @@ Feature: before and after blocks
|
|
125
125
|
end
|
126
126
|
end
|
127
127
|
"""
|
128
|
-
When I run it with the spec
|
128
|
+
When I run it with the spec command
|
129
129
|
Then the stdout should match "3 examples, 0 failures"
|
130
130
|
|
131
131
|
Scenario: before/after blocks are run in order
|
@@ -163,6 +163,6 @@ Feature: before and after blocks
|
|
163
163
|
end
|
164
164
|
"""
|
165
165
|
|
166
|
-
When I run it with the spec
|
166
|
+
When I run it with the spec command
|
167
167
|
Then the stdout should match /before suite\nbefore all\nbefore each\nafter each\n\.after all\n.*after suite/m
|
168
168
|
|
@@ -27,7 +27,7 @@ Feature: autogenerated docstrings
|
|
27
27
|
Scenario: run passing examples with spec
|
28
28
|
Given the file ../../examples/passing/autogenerated_docstrings_example.rb
|
29
29
|
|
30
|
-
When I run it with the spec
|
30
|
+
When I run it with the spec command -fs
|
31
31
|
|
32
32
|
Then the stdout should match /should equal 5/
|
33
33
|
And the stdout should match /should be < 5/
|
@@ -37,7 +37,7 @@ Feature: autogenerated docstrings
|
|
37
37
|
Scenario: run failing examples with spec
|
38
38
|
Given the file ../../examples/failing/failing_autogenerated_docstrings_example.rb
|
39
39
|
|
40
|
-
When I run it with the spec
|
40
|
+
When I run it with the spec command -fs
|
41
41
|
|
42
42
|
Then the stdout should match /should equal 2/
|
43
43
|
And the stdout should match /should be > 5/
|
@@ -12,6 +12,6 @@ Feature: Spec::ExampleGroup with should methods
|
|
12
12
|
|
13
13
|
Scenario: Run with spec
|
14
14
|
Given the file ../../resources/spec/example_group_with_should_methods.rb
|
15
|
-
When I run it with the spec
|
15
|
+
When I run it with the spec command
|
16
16
|
Then the exit code should be 256
|
17
17
|
And the stdout should match "2 examples, 1 failure"
|
@@ -12,6 +12,6 @@ Feature: Nested example groups
|
|
12
12
|
|
13
13
|
Scenario: Run with spec
|
14
14
|
Given the file ../../examples/passing/stack_spec_with_nested_example_groups.rb
|
15
|
-
When I run it with the spec
|
15
|
+
When I run it with the spec command -fs
|
16
16
|
Then the stdout should match /Stack \(empty\)/
|
17
17
|
And the stdout should match /Stack \(full\)/
|
@@ -20,7 +20,7 @@ Feature: Spec and test together
|
|
20
20
|
Scenario: Run with spec
|
21
21
|
Given the file ../../resources/test/spec_and_test_together.rb
|
22
22
|
|
23
|
-
When I run it with the spec
|
23
|
+
When I run it with the spec command -fs
|
24
24
|
|
25
25
|
Then the exit code should be 256
|
26
26
|
And the stdout should match "ATest"
|
@@ -10,5 +10,5 @@ Story: Test is defined, but not Test::Unit
|
|
10
10
|
|
11
11
|
Scenario: Run with spec
|
12
12
|
Given the file ../../resources/test/spec_including_test_but_not_unit.rb
|
13
|
-
When I run it with the spec
|
13
|
+
When I run it with the spec command
|
14
14
|
Then the stderr should not match "Test::Unit"
|
@@ -12,6 +12,6 @@ Story: Test::Unit::TestCase extended by rspec with should methods
|
|
12
12
|
|
13
13
|
Scenario: Run with spec
|
14
14
|
Given the file ../../resources/test/test_case_with_should_methods.rb
|
15
|
-
When I run it with the spec
|
15
|
+
When I run it with the spec command
|
16
16
|
Then the exit code should be 256
|
17
17
|
And the stdout should match "5 examples, 3 failures"
|