rspec 1.1.12 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.autotest +2 -1
- data/.document +7 -0
- data/History.txt +58 -0
- data/License.txt +1 -1
- data/Manifest.txt +45 -82
- data/README.txt +3 -6
- data/Rakefile +33 -13
- data/Ruby1.9.markdown +32 -0
- data/TODO.txt +10 -4
- data/Upgrade.markdown +63 -0
- data/bin/spec +1 -1
- data/cucumber.yml +3 -0
- data/examples/failing/{failing_autogenerated_docstrings_example.rb → failing_implicit_docstrings_example.rb} +0 -0
- data/examples/failing/pending_example.rb +9 -0
- data/examples/failing/spec_helper.rb +1 -1
- data/examples/passing/{custom_expectation_matchers.rb → custom_matchers.rb} +0 -0
- data/examples/passing/filtered_formatter.rb +18 -0
- data/examples/passing/filtered_formatter_example.rb +31 -0
- data/examples/passing/implicit_docstrings_example.rb +18 -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/example_group_with_should_methods.feature +1 -1
- data/features/example_groups/{autogenerated_docstrings.feature → implicit_docstrings.feature} +7 -9
- data/features/example_groups/nested_groups.feature +1 -1
- data/features/heckle/heckle.feature +56 -0
- 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/matchers/create_matcher.feature +115 -0
- 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/mocks/mix_stubs_and_mocks.feature +22 -0
- data/features/pending/pending_examples.feature +81 -0
- data/features/step_definitions/running_rspec.rb +5 -3
- data/features/support/env.rb +1 -1
- data/features/support/matchers/smart_match.rb +2 -2
- data/lib/autotest/rspec.rb +1 -1
- data/lib/spec.rb +1 -1
- data/lib/{adapters → spec/adapters}/mock_frameworks/flexmock.rb +0 -0
- data/lib/{adapters → spec/adapters}/mock_frameworks/mocha.rb +0 -0
- data/lib/{adapters → spec/adapters}/mock_frameworks/rr.rb +0 -0
- data/lib/{adapters → spec/adapters}/mock_frameworks/rspec.rb +0 -1
- data/lib/spec/autorun.rb +3 -0
- data/lib/spec/dsl.rb +3 -1
- data/lib/spec/dsl/matchers.rb +13 -0
- data/lib/spec/example.rb +4 -0
- data/lib/spec/example/before_and_after_hooks.rb +5 -20
- data/lib/spec/example/errors.rb +3 -3
- 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 +101 -211
- data/lib/spec/example/example_methods.rb +61 -81
- data/lib/spec/example/module_reopening_fix.rb +23 -1
- data/lib/spec/example/pending.rb +3 -2
- data/lib/spec/example/predicate_matchers.rb +47 -0
- data/lib/spec/example/subject.rb +91 -0
- data/lib/spec/expectations.rb +1 -1
- data/lib/spec/expectations/differs/default.rb +0 -1
- data/lib/spec/expectations/extensions.rb +0 -1
- data/lib/spec/expectations/handler.rb +13 -6
- data/lib/spec/interop/test.rb +5 -0
- data/lib/spec/interop/test/unit/testcase.rb +5 -22
- data/lib/spec/matchers.rb +22 -8
- data/lib/spec/matchers/be.rb +4 -9
- data/lib/spec/matchers/be_close.rb +20 -5
- data/lib/spec/matchers/be_instance_of.rb +45 -0
- data/lib/spec/matchers/be_kind_of.rb +45 -0
- data/lib/spec/matchers/change.rb +8 -6
- data/lib/spec/matchers/compatibility.rb +14 -0
- 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/extensions/instance_exec.rb +25 -0
- data/lib/spec/matchers/generated_descriptions.rb +2 -2
- data/lib/spec/matchers/has.rb +28 -11
- data/lib/spec/matchers/have.rb +2 -2
- data/lib/spec/matchers/include.rb +2 -2
- data/lib/spec/matchers/match.rb +25 -7
- data/lib/spec/matchers/match_array.rb +3 -3
- data/lib/spec/matchers/matcher.rb +51 -0
- 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 +3 -3
- data/lib/spec/matchers/respond_to.rb +3 -3
- data/lib/spec/matchers/satisfy.rb +7 -7
- data/lib/spec/matchers/throw_symbol.rb +3 -5
- data/lib/spec/mocks.rb +3 -3
- data/lib/spec/mocks/argument_expectation.rb +15 -15
- data/lib/spec/mocks/{argument_constraints.rb → argument_matchers.rb} +19 -23
- data/lib/spec/mocks/error_generator.rb +5 -8
- data/lib/spec/mocks/framework.rb +1 -1
- data/lib/spec/mocks/message_expectation.rb +5 -13
- data/lib/spec/mocks/mock.rb +4 -5
- data/lib/spec/mocks/proxy.rb +9 -5
- data/lib/spec/mocks/spec_methods.rb +10 -1
- data/lib/spec/rake/spectask.rb +0 -1
- data/lib/spec/runner.rb +6 -28
- 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 +3 -2
- data/lib/spec/runner/formatter/base_text_formatter.rb +34 -19
- 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/snippet_extractor.rb +1 -1
- data/lib/spec/runner/formatter/specdoc_formatter.rb +1 -7
- data/lib/spec/runner/heckle_runner.rb +3 -6
- data/lib/spec/runner/heckle_runner_unsupported.rb +1 -1
- data/lib/spec/runner/option_parser.rb +19 -21
- data/lib/spec/runner/options.rb +32 -27
- data/lib/spec/runner/reporter.rb +8 -9
- 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/spec/autotest/autotest_helper.rb +0 -1
- data/spec/autotest/rspec_spec.rb +95 -98
- data/spec/spec/dsl/main_spec.rb +3 -3
- data/spec/spec/dsl/matchers_spec.rb +25 -0
- data/spec/spec/example/example_group_class_definition_spec.rb +14 -15
- 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 +32 -79
- data/spec/spec/example/example_matcher_spec.rb +10 -10
- data/spec/spec/example/example_methods_spec.rb +108 -242
- data/spec/spec/example/nested_example_group_spec.rb +2 -2
- data/spec/spec/example/pending_module_spec.rb +66 -41
- data/spec/spec/example/shared_example_group_spec.rb +4 -4
- data/spec/spec/{matchers → expectations}/handler_spec.rb +52 -4
- 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/interop/test/unit/testcase_spec.rb +0 -4
- data/spec/spec/matchers/be_close_spec.rb +1 -1
- data/spec/spec/matchers/be_instance_of_spec.rb +29 -0
- data/spec/spec/matchers/be_kind_of_spec.rb +29 -0
- data/spec/spec/matchers/change_spec.rb +20 -0
- data/spec/spec/matchers/compatibility_spec.rb +34 -0
- data/spec/spec/matchers/description_generation_spec.rb +0 -12
- data/spec/spec/matchers/eql_spec.rb +2 -2
- data/spec/spec/matchers/equal_spec.rb +2 -2
- data/spec/spec/matchers/exist_spec.rb +8 -4
- data/spec/spec/matchers/have_spec.rb +4 -4
- data/spec/spec/matchers/match_spec.rb +2 -2
- data/spec/spec/matchers/matcher_methods_spec.rb +1 -1
- data/spec/spec/matchers/matcher_spec.rb +97 -0
- data/spec/spec/matchers/throw_symbol_spec.rb +8 -8
- data/spec/spec/mocks/{bug_report_496.rb → bug_report_496_spec.rb} +0 -0
- data/spec/spec/mocks/{failing_mock_argument_constraints_spec.rb → failing_argument_matchers_spec.rb} +2 -2
- data/spec/spec/mocks/hash_including_matcher_spec.rb +4 -4
- data/spec/spec/mocks/hash_not_including_matcher_spec.rb +3 -3
- data/spec/spec/mocks/mock_spec.rb +27 -2
- data/spec/spec/mocks/nil_expectation_warning_spec.rb +1 -1
- data/spec/spec/mocks/partial_mock_spec.rb +18 -3
- data/spec/spec/mocks/{passing_mock_argument_constraints_spec.rb → passing_argument_matchers_spec.rb} +6 -6
- data/spec/spec/mocks/stubbed_message_expectations_spec.rb +13 -1
- data/spec/spec/package/bin_spec_spec.rb +2 -2
- data/spec/spec/runner/configuration_spec.rb +12 -12
- data/spec/spec/runner/drb_command_line_spec.rb +71 -73
- data/spec/spec/runner/formatter/base_text_formatter_spec.rb +82 -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 +2 -1
- data/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +9 -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/text_mate_formatted-1.9.1.html +55 -47
- data/spec/spec/runner/formatter/{spec_mate_formatter_spec.rb → text_mate_formatter_spec.rb} +11 -9
- data/spec/spec/runner/heckle_runner_spec.rb +1 -1
- data/spec/spec/runner/heckler_spec.rb +1 -1
- data/spec/spec/runner/option_parser_spec.rb +28 -11
- data/spec/spec/runner/options_spec.rb +34 -0
- data/spec/spec/runner/reporter_spec.rb +66 -62
- data/spec/spec/runner/resources/utf8_encoded.rb +1 -0
- data/spec/spec/runner/spec_drb.opts +1 -0
- data/spec/spec/runner_spec.rb +7 -5
- data/spec/spec_helper.rb +24 -2
- metadata +49 -90
- data/examples/passing/autogenerated_docstrings_example.rb +0 -25
- data/examples/passing/before_and_after_example.rb +0 -40
- data/examples/passing/behave_as_example.rb +0 -45
- data/examples/passing/legacy_spec.rb +0 -11
- data/examples/passing/priority.txt +0 -1
- data/features/support/helpers/story_helper.rb +0 -16
- data/lib/spec/expectations/extensions/string_and_symbol.rb +0 -17
- data/lib/spec/runner/formatter/story/html_formatter.rb +0 -174
- data/lib/spec/runner/formatter/story/plain_text_formatter.rb +0 -194
- data/lib/spec/runner/formatter/story/progress_bar_formatter.rb +0 -42
- data/lib/spec/story.rb +0 -10
- data/lib/spec/story/extensions.rb +0 -3
- data/lib/spec/story/extensions/main.rb +0 -86
- data/lib/spec/story/extensions/regexp.rb +0 -9
- data/lib/spec/story/extensions/string.rb +0 -9
- data/lib/spec/story/given_scenario.rb +0 -14
- data/lib/spec/story/runner.rb +0 -57
- data/lib/spec/story/runner/plain_text_story_runner.rb +0 -48
- data/lib/spec/story/runner/scenario_collector.rb +0 -18
- data/lib/spec/story/runner/scenario_runner.rb +0 -54
- data/lib/spec/story/runner/story_mediator.rb +0 -137
- data/lib/spec/story/runner/story_parser.rb +0 -247
- data/lib/spec/story/runner/story_runner.rb +0 -74
- data/lib/spec/story/scenario.rb +0 -14
- data/lib/spec/story/step.rb +0 -70
- data/lib/spec/story/step_group.rb +0 -89
- data/lib/spec/story/step_mother.rb +0 -38
- data/lib/spec/story/story.rb +0 -39
- data/lib/spec/story/world.rb +0 -124
- data/resources/spec/spec_with_flexmock.rb +0 -19
- data/rspec.gemspec +0 -32
- data/spec/spec/matchers/mock_constraint_matchers_spec.rb +0 -24
- data/spec/spec/runner/formatter/story/html_formatter_spec.rb +0 -135
- data/spec/spec/runner/formatter/story/plain_text_formatter_spec.rb +0 -600
- data/spec/spec/runner/formatter/story/progress_bar_formatter_spec.rb +0 -82
- data/spec/spec/spec_spec.rb +0 -21
- data/spec/spec/story/builders.rb +0 -46
- data/spec/spec/story/extensions/main_spec.rb +0 -161
- data/spec/spec/story/extensions_spec.rb +0 -14
- data/spec/spec/story/given_scenario_spec.rb +0 -27
- data/spec/spec/story/runner/plain_text_story_runner_spec.rb +0 -90
- data/spec/spec/story/runner/scenario_collector_spec.rb +0 -27
- data/spec/spec/story/runner/scenario_runner_spec.rb +0 -214
- data/spec/spec/story/runner/story_mediator_spec.rb +0 -143
- data/spec/spec/story/runner/story_parser_spec.rb +0 -401
- data/spec/spec/story/runner/story_runner_spec.rb +0 -294
- data/spec/spec/story/runner_spec.rb +0 -93
- data/spec/spec/story/scenario_spec.rb +0 -18
- data/spec/spec/story/step_group_spec.rb +0 -157
- data/spec/spec/story/step_mother_spec.rb +0 -84
- data/spec/spec/story/step_spec.rb +0 -272
- data/spec/spec/story/story_helper.rb +0 -2
- data/spec/spec/story/story_spec.rb +0 -84
- data/spec/spec/story/world_spec.rb +0 -423
- data/story_server/prototype/javascripts/builder.js +0 -136
- data/story_server/prototype/javascripts/controls.js +0 -972
- data/story_server/prototype/javascripts/dragdrop.js +0 -976
- data/story_server/prototype/javascripts/effects.js +0 -1117
- data/story_server/prototype/javascripts/prototype.js +0 -4140
- data/story_server/prototype/javascripts/rspec.js +0 -149
- data/story_server/prototype/javascripts/scriptaculous.js +0 -58
- data/story_server/prototype/javascripts/slider.js +0 -276
- data/story_server/prototype/javascripts/sound.js +0 -55
- data/story_server/prototype/javascripts/unittest.js +0 -568
- data/story_server/prototype/lib/server.rb +0 -24
- data/story_server/prototype/stories.html +0 -176
- data/story_server/prototype/stylesheets/rspec.css +0 -136
- data/story_server/prototype/stylesheets/test.css +0 -90
data/.autotest
CHANGED
data/.document
ADDED
data/History.txt
CHANGED
@@ -1,3 +1,61 @@
|
|
1
|
+
=== Version 1.2.0
|
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 and teardown are gone - use before and after instead
|
13
|
+
|
14
|
+
* you can still use setup and teardown if you're using
|
15
|
+
Test::Unit::TestCase as the base ExampleGroup class (which is implicit
|
16
|
+
in rspec-rails)
|
17
|
+
|
18
|
+
* The matcher protocol has been improved. The old protocol is still
|
19
|
+
supported, so as long as you're not monkey patching rspec's built-in
|
20
|
+
matchers, or using extension libraries that do, this should not affect
|
21
|
+
you. If you run into trouble, you'll just need to change:
|
22
|
+
|
23
|
+
* failure_message => failure_message_for_should
|
24
|
+
* negative_failure_message => failure_message_for_should_not
|
25
|
+
|
26
|
+
* All references to rubygems have been removed from within rspec's code.
|
27
|
+
|
28
|
+
* See http://gist.github.com/54177 for rationale and suggestions on
|
29
|
+
alternative approaches to loading rubygems
|
30
|
+
|
31
|
+
* deprecations
|
32
|
+
|
33
|
+
* BaseTextFormatter#colourize - use colorize_failure instead.
|
34
|
+
* BaseTextFormatter#magenta - use red instead.
|
35
|
+
|
36
|
+
* enhancements
|
37
|
+
|
38
|
+
* cleaner integration with with heckle-1.4.2
|
39
|
+
* allow registering example groups with a path-like key (Pat Maddox)
|
40
|
+
* start DRb service at "druby://localhost:0" (Hongli Lai) - See http://redmine.ruby-lang.org/issues/show/496
|
41
|
+
* consistent reporting of errors as failures
|
42
|
+
* added spec/test/unit as more intuitive path to loading test/unit interop lib
|
43
|
+
* added explicit autorun feature for running specs with ruby command
|
44
|
+
* added handling for does_not_match? for matchers that want to know the context in which they were called
|
45
|
+
* lots of ruby 1.9.1 compatibility fixes from Chad Humprhies
|
46
|
+
* improved feedback from be_kind_of/be_a_kind_of/be_instance_of/be_an_instance_of (Jakub Šťastný)
|
47
|
+
* added --format silent (l) option, which is now the default when running --heckle (Bob Aman)
|
48
|
+
* sexy new custom matcher creation (Corey Haines & David Chelimsky - initial concept by Yehuda Katz)
|
49
|
+
* improved matcher protocol - old one is still supported, but new one is cleaner and prefered
|
50
|
+
|
51
|
+
* bug fixes
|
52
|
+
|
53
|
+
* support delegating operator matchers to subject with should_not
|
54
|
+
* all arguments are included if --drb is specified in spec.opts (Neil Buckley). Closes #671.
|
55
|
+
* added --autospec option hack (used internally) to get --color to work when using --drb and autospec.
|
56
|
+
* Fixed mock framework failure message bug in which similar calls were excluded from the output
|
57
|
+
* cryptic error message on change.rb when the from value is wrong (Michael Murray). Closes #706.
|
58
|
+
|
1
59
|
=== Version 1.1.12 / 2009-01-11
|
2
60
|
|
3
61
|
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
@@ -1,15 +1,19 @@
|
|
1
1
|
.autotest
|
2
|
+
.document
|
2
3
|
History.txt
|
3
4
|
License.txt
|
4
5
|
Manifest.txt
|
5
6
|
README.txt
|
6
7
|
Rakefile
|
8
|
+
Ruby1.9.markdown
|
7
9
|
TODO.txt
|
10
|
+
Upgrade.markdown
|
8
11
|
bin/autospec
|
9
12
|
bin/spec
|
13
|
+
cucumber.yml
|
10
14
|
examples/failing/README.txt
|
11
15
|
examples/failing/diffing_spec.rb
|
12
|
-
examples/failing/
|
16
|
+
examples/failing/failing_implicit_docstrings_example.rb
|
13
17
|
examples/failing/failure_in_after.rb
|
14
18
|
examples/failing/failure_in_before.rb
|
15
19
|
examples/failing/mocking_example.rb
|
@@ -17,32 +21,31 @@ examples/failing/mocking_with_flexmock.rb
|
|
17
21
|
examples/failing/mocking_with_mocha.rb
|
18
22
|
examples/failing/mocking_with_rr.rb
|
19
23
|
examples/failing/partial_mock_example.rb
|
24
|
+
examples/failing/pending_example.rb
|
20
25
|
examples/failing/predicate_example.rb
|
21
26
|
examples/failing/raising_example.rb
|
22
27
|
examples/failing/spec_helper.rb
|
23
28
|
examples/failing/syntax_error_example.rb
|
24
29
|
examples/failing/team_spec.rb
|
25
30
|
examples/failing/timeout_behaviour.rb
|
26
|
-
examples/passing/autogenerated_docstrings_example.rb
|
27
|
-
examples/passing/before_and_after_example.rb
|
28
|
-
examples/passing/behave_as_example.rb
|
29
|
-
examples/passing/custom_expectation_matchers.rb
|
30
31
|
examples/passing/custom_formatter.rb
|
32
|
+
examples/passing/custom_matchers.rb
|
31
33
|
examples/passing/dynamic_spec.rb
|
32
34
|
examples/passing/file_accessor.rb
|
33
35
|
examples/passing/file_accessor_spec.rb
|
36
|
+
examples/passing/filtered_formatter.rb
|
37
|
+
examples/passing/filtered_formatter_example.rb
|
34
38
|
examples/passing/greeter_spec.rb
|
35
39
|
examples/passing/helper_method_example.rb
|
40
|
+
examples/passing/implicit_docstrings_example.rb
|
36
41
|
examples/passing/io_processor.rb
|
37
42
|
examples/passing/io_processor_spec.rb
|
38
|
-
examples/passing/legacy_spec.rb
|
39
43
|
examples/passing/mocking_example.rb
|
40
44
|
examples/passing/multi_threaded_example_group_runner.rb
|
41
45
|
examples/passing/nested_classes_example.rb
|
42
46
|
examples/passing/partial_mock_example.rb
|
43
47
|
examples/passing/pending_example.rb
|
44
48
|
examples/passing/predicate_example.rb
|
45
|
-
examples/passing/priority.txt
|
46
49
|
examples/passing/shared_example_group_example.rb
|
47
50
|
examples/passing/shared_stack_examples.rb
|
48
51
|
examples/passing/simple_matcher_example.rb
|
@@ -54,46 +57,55 @@ examples/passing/stubbing_example.rb
|
|
54
57
|
examples/passing/yielding_example.rb
|
55
58
|
examples/ruby1.9.compatibility/access_to_constants_spec.rb
|
56
59
|
features/before_and_after_blocks/before_and_after_blocks.feature
|
57
|
-
features/example_groups/autogenerated_docstrings.feature
|
58
60
|
features/example_groups/example_group_with_should_methods.feature
|
61
|
+
features/example_groups/implicit_docstrings.feature
|
59
62
|
features/example_groups/nested_groups.feature
|
60
63
|
features/example_groups/output.feature
|
64
|
+
features/heckle/heckle.feature
|
61
65
|
features/interop/examples_and_tests_together.feature
|
62
66
|
features/interop/test_but_not_test_unit.feature
|
63
67
|
features/interop/test_case_with_should_methods.feature
|
68
|
+
features/matchers/create_matcher.feature
|
64
69
|
features/mock_framework_integration/use_flexmock.feature
|
70
|
+
features/mock_framework_integration/use_mocha.feature
|
71
|
+
features/mock_framework_integration/use_rr.feature
|
72
|
+
features/mocks/mix_stubs_and_mocks.feature
|
73
|
+
features/pending/pending_examples.feature
|
65
74
|
features/step_definitions/running_rspec.rb
|
66
75
|
features/support/env.rb
|
67
|
-
features/support/helpers/cmdline.rb
|
68
|
-
features/support/helpers/story_helper.rb
|
69
76
|
features/support/matchers/smart_match.rb
|
70
77
|
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
78
|
lib/autotest/discover.rb
|
76
79
|
lib/autotest/rspec.rb
|
77
80
|
lib/spec.rb
|
81
|
+
lib/spec/adapters/mock_frameworks/flexmock.rb
|
82
|
+
lib/spec/adapters/mock_frameworks/mocha.rb
|
83
|
+
lib/spec/adapters/mock_frameworks/rr.rb
|
84
|
+
lib/spec/adapters/mock_frameworks/rspec.rb
|
85
|
+
lib/spec/autorun.rb
|
78
86
|
lib/spec/dsl.rb
|
79
87
|
lib/spec/dsl/main.rb
|
88
|
+
lib/spec/dsl/matchers.rb
|
80
89
|
lib/spec/example.rb
|
81
90
|
lib/spec/example/before_and_after_hooks.rb
|
82
91
|
lib/spec/example/errors.rb
|
92
|
+
lib/spec/example/example_description.rb
|
83
93
|
lib/spec/example/example_group.rb
|
84
94
|
lib/spec/example/example_group_factory.rb
|
95
|
+
lib/spec/example/example_group_hierarchy.rb
|
85
96
|
lib/spec/example/example_group_methods.rb
|
86
97
|
lib/spec/example/example_matcher.rb
|
87
98
|
lib/spec/example/example_methods.rb
|
88
99
|
lib/spec/example/module_reopening_fix.rb
|
89
100
|
lib/spec/example/pending.rb
|
101
|
+
lib/spec/example/predicate_matchers.rb
|
90
102
|
lib/spec/example/shared_example_group.rb
|
103
|
+
lib/spec/example/subject.rb
|
91
104
|
lib/spec/expectations.rb
|
92
105
|
lib/spec/expectations/differs/default.rb
|
93
106
|
lib/spec/expectations/errors.rb
|
94
107
|
lib/spec/expectations/extensions.rb
|
95
108
|
lib/spec/expectations/extensions/object.rb
|
96
|
-
lib/spec/expectations/extensions/string_and_symbol.rb
|
97
109
|
lib/spec/expectations/handler.rb
|
98
110
|
lib/spec/interop/test.rb
|
99
111
|
lib/spec/interop/test/unit/autorunner.rb
|
@@ -104,17 +116,22 @@ lib/spec/interop/test/unit/ui/console/testrunner.rb
|
|
104
116
|
lib/spec/matchers.rb
|
105
117
|
lib/spec/matchers/be.rb
|
106
118
|
lib/spec/matchers/be_close.rb
|
119
|
+
lib/spec/matchers/be_instance_of.rb
|
120
|
+
lib/spec/matchers/be_kind_of.rb
|
107
121
|
lib/spec/matchers/change.rb
|
122
|
+
lib/spec/matchers/compatibility.rb
|
108
123
|
lib/spec/matchers/eql.rb
|
109
124
|
lib/spec/matchers/equal.rb
|
110
125
|
lib/spec/matchers/errors.rb
|
111
126
|
lib/spec/matchers/exist.rb
|
127
|
+
lib/spec/matchers/extensions/instance_exec.rb
|
112
128
|
lib/spec/matchers/generated_descriptions.rb
|
113
129
|
lib/spec/matchers/has.rb
|
114
130
|
lib/spec/matchers/have.rb
|
115
131
|
lib/spec/matchers/include.rb
|
116
132
|
lib/spec/matchers/match.rb
|
117
133
|
lib/spec/matchers/match_array.rb
|
134
|
+
lib/spec/matchers/matcher.rb
|
118
135
|
lib/spec/matchers/method_missing.rb
|
119
136
|
lib/spec/matchers/operator_matcher.rb
|
120
137
|
lib/spec/matchers/raise_error.rb
|
@@ -124,8 +141,8 @@ lib/spec/matchers/simple_matcher.rb
|
|
124
141
|
lib/spec/matchers/throw_symbol.rb
|
125
142
|
lib/spec/matchers/wrap_expectation.rb
|
126
143
|
lib/spec/mocks.rb
|
127
|
-
lib/spec/mocks/argument_constraints.rb
|
128
144
|
lib/spec/mocks/argument_expectation.rb
|
145
|
+
lib/spec/mocks/argument_matchers.rb
|
129
146
|
lib/spec/mocks/error_generator.rb
|
130
147
|
lib/spec/mocks/errors.rb
|
131
148
|
lib/spec/mocks/extensions.rb
|
@@ -158,9 +175,6 @@ lib/spec/runner/formatter/profile_formatter.rb
|
|
158
175
|
lib/spec/runner/formatter/progress_bar_formatter.rb
|
159
176
|
lib/spec/runner/formatter/snippet_extractor.rb
|
160
177
|
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
178
|
lib/spec/runner/formatter/text_mate_formatter.rb
|
165
179
|
lib/spec/runner/heckle_runner.rb
|
166
180
|
lib/spec/runner/heckle_runner_unsupported.rb
|
@@ -168,37 +182,18 @@ lib/spec/runner/option_parser.rb
|
|
168
182
|
lib/spec/runner/options.rb
|
169
183
|
lib/spec/runner/reporter.rb
|
170
184
|
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
|
185
|
+
lib/spec/test/unit.rb
|
190
186
|
lib/spec/version.rb
|
187
|
+
resources/helpers/cmdline.rb
|
191
188
|
resources/rake/examples.rake
|
192
189
|
resources/rake/examples_with_rcov.rake
|
193
190
|
resources/rake/failing_examples_with_html.rake
|
194
191
|
resources/rake/verify_rcov.rake
|
195
192
|
resources/spec/example_group_with_should_methods.rb
|
196
193
|
resources/spec/simple_spec.rb
|
197
|
-
resources/spec/spec_with_flexmock.rb
|
198
194
|
resources/test/spec_and_test_together.rb
|
199
195
|
resources/test/spec_including_test_but_not_unit.rb
|
200
196
|
resources/test/test_case_with_should_methods.rb
|
201
|
-
rspec.gemspec
|
202
197
|
spec/README.jruby
|
203
198
|
spec/autotest/autotest_helper.rb
|
204
199
|
spec/autotest/autotest_matchers.rb
|
@@ -209,6 +204,7 @@ spec/rspec_suite.rb
|
|
209
204
|
spec/ruby_forker.rb
|
210
205
|
spec/spec.opts
|
211
206
|
spec/spec/dsl/main_spec.rb
|
207
|
+
spec/spec/dsl/matchers_spec.rb
|
212
208
|
spec/spec/example/example_group_class_definition_spec.rb
|
213
209
|
spec/spec/example/example_group_factory_spec.rb
|
214
210
|
spec/spec/example/example_group_methods_spec.rb
|
@@ -224,6 +220,7 @@ spec/spec/example/subclassing_example_group_spec.rb
|
|
224
220
|
spec/spec/expectations/differs/default_spec.rb
|
225
221
|
spec/spec/expectations/extensions/object_spec.rb
|
226
222
|
spec/spec/expectations/fail_with_spec.rb
|
223
|
+
spec/spec/expectations/handler_spec.rb
|
227
224
|
spec/spec/expectations/wrap_expectation_spec.rb
|
228
225
|
spec/spec/interop/test/unit/resources/spec_that_fails.rb
|
229
226
|
spec/spec/interop/test/unit/resources/spec_that_passes.rb
|
@@ -238,20 +235,22 @@ spec/spec/interop/test/unit/test_unit_spec_helper.rb
|
|
238
235
|
spec/spec/interop/test/unit/testcase_spec.rb
|
239
236
|
spec/spec/interop/test/unit/testsuite_adapter_spec.rb
|
240
237
|
spec/spec/matchers/be_close_spec.rb
|
238
|
+
spec/spec/matchers/be_instance_of_spec.rb
|
239
|
+
spec/spec/matchers/be_kind_of_spec.rb
|
241
240
|
spec/spec/matchers/be_spec.rb
|
242
241
|
spec/spec/matchers/change_spec.rb
|
242
|
+
spec/spec/matchers/compatibility_spec.rb
|
243
243
|
spec/spec/matchers/description_generation_spec.rb
|
244
244
|
spec/spec/matchers/eql_spec.rb
|
245
245
|
spec/spec/matchers/equal_spec.rb
|
246
246
|
spec/spec/matchers/exist_spec.rb
|
247
|
-
spec/spec/matchers/handler_spec.rb
|
248
247
|
spec/spec/matchers/has_spec.rb
|
249
248
|
spec/spec/matchers/have_spec.rb
|
250
249
|
spec/spec/matchers/include_spec.rb
|
251
250
|
spec/spec/matchers/match_array_spec.rb
|
252
251
|
spec/spec/matchers/match_spec.rb
|
253
252
|
spec/spec/matchers/matcher_methods_spec.rb
|
254
|
-
spec/spec/matchers/
|
253
|
+
spec/spec/matchers/matcher_spec.rb
|
255
254
|
spec/spec/matchers/operator_matcher_spec.rb
|
256
255
|
spec/spec/matchers/raise_error_spec.rb
|
257
256
|
spec/spec/matchers/respond_to_spec.rb
|
@@ -266,13 +265,13 @@ spec/spec/mocks/bug_report_10260_spec.rb
|
|
266
265
|
spec/spec/mocks/bug_report_10263_spec.rb
|
267
266
|
spec/spec/mocks/bug_report_11545_spec.rb
|
268
267
|
spec/spec/mocks/bug_report_15719_spec.rb
|
269
|
-
spec/spec/mocks/
|
268
|
+
spec/spec/mocks/bug_report_496_spec.rb
|
270
269
|
spec/spec/mocks/bug_report_600_spec.rb
|
271
270
|
spec/spec/mocks/bug_report_7611_spec.rb
|
272
271
|
spec/spec/mocks/bug_report_7805_spec.rb
|
273
272
|
spec/spec/mocks/bug_report_8165_spec.rb
|
274
273
|
spec/spec/mocks/bug_report_8302_spec.rb
|
275
|
-
spec/spec/mocks/
|
274
|
+
spec/spec/mocks/failing_argument_matchers_spec.rb
|
276
275
|
spec/spec/mocks/hash_including_matcher_spec.rb
|
277
276
|
spec/spec/mocks/hash_not_including_matcher_spec.rb
|
278
277
|
spec/spec/mocks/mock_ordering_spec.rb
|
@@ -285,7 +284,7 @@ spec/spec/mocks/once_counts_spec.rb
|
|
285
284
|
spec/spec/mocks/options_hash_spec.rb
|
286
285
|
spec/spec/mocks/partial_mock_spec.rb
|
287
286
|
spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb
|
288
|
-
spec/spec/mocks/
|
287
|
+
spec/spec/mocks/passing_argument_matchers_spec.rb
|
289
288
|
spec/spec/mocks/precise_counts_spec.rb
|
290
289
|
spec/spec/mocks/record_messages_spec.rb
|
291
290
|
spec/spec/mocks/stub_spec.rb
|
@@ -316,15 +315,12 @@ spec/spec/runner/formatter/nested_text_formatter_spec.rb
|
|
316
315
|
spec/spec/runner/formatter/profile_formatter_spec.rb
|
317
316
|
spec/spec/runner/formatter/progress_bar_formatter_spec.rb
|
318
317
|
spec/spec/runner/formatter/snippet_extractor_spec.rb
|
319
|
-
spec/spec/runner/formatter/spec_mate_formatter_spec.rb
|
320
318
|
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
319
|
spec/spec/runner/formatter/text_mate_formatted-1.8.4.html
|
325
320
|
spec/spec/runner/formatter/text_mate_formatted-1.8.6.html
|
326
321
|
spec/spec/runner/formatter/text_mate_formatted-1.8.7.html
|
327
322
|
spec/spec/runner/formatter/text_mate_formatted-1.9.1.html
|
323
|
+
spec/spec/runner/formatter/text_mate_formatter_spec.rb
|
328
324
|
spec/spec/runner/heckle_runner_spec.rb
|
329
325
|
spec/spec/runner/heckler_spec.rb
|
330
326
|
spec/spec/runner/noisy_backtrace_tweaker_spec.rb
|
@@ -347,37 +343,4 @@ spec/spec/runner/spec_parser_spec.rb
|
|
347
343
|
spec/spec/runner/spec_spaced.opts
|
348
344
|
spec/spec/runner_spec.rb
|
349
345
|
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
346
|
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
|
|
@@ -51,7 +51,4 @@ examples.
|
|
51
51
|
|
52
52
|
or
|
53
53
|
|
54
|
-
|
55
|
-
cd rspec
|
56
|
-
rake gem
|
57
|
-
rake install_gem
|
54
|
+
clone, build, install - See http://wiki.github.com/dchelimsky/rspec
|
data/Rakefile
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# -*- ruby -*-
|
2
2
|
|
3
3
|
$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
|
4
|
-
require 'rubygems'
|
5
4
|
require 'hoe'
|
6
5
|
require 'spec/version'
|
7
6
|
require 'spec/rake/spectask'
|
@@ -22,34 +21,40 @@ Hoe.new('rspec', Spec::VERSION::STRING) do |p|
|
|
22
21
|
p.developer('RSpec Development Team', 'rspec-devel@rubyforge.org')
|
23
22
|
p.extra_dev_deps = [["cucumber",">= 0.1.13"]]
|
24
23
|
p.remote_rdoc_dir = "rspec/#{Spec::VERSION::STRING}"
|
24
|
+
p.rspec_options = ['--options', 'spec/spec.opts']
|
25
25
|
end
|
26
26
|
|
27
27
|
['audit','test','test_deps','default','post_blog'].each do |task|
|
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
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
37
|
+
if RUBY_VERSION =~ /^1.8/
|
38
|
+
task :default => [:verify_rcov, :features]
|
39
|
+
else
|
40
|
+
task :default => [:spec, :features]
|
41
|
+
end
|
42
|
+
|
43
|
+
namespace :spec do
|
44
|
+
desc "Run all specs with rcov"
|
45
|
+
Spec::Rake::SpecTask.new('rcov') do |t|
|
46
|
+
t.spec_files = FileList['spec/**/*_spec.rb']
|
47
|
+
t.spec_opts = ['--options', 'spec/spec.opts']
|
45
48
|
t.rcov = true
|
46
49
|
t.rcov_dir = 'coverage'
|
47
|
-
t.rcov_opts = ['--
|
50
|
+
t.rcov_opts = ['--exclude', "instance_exec\.rb,lib/spec.rb,lib/spec/runner.rb,spec/spec,bin/spec,examples,/gems,/Library/Ruby,\.autotest,#{ENV['GEM_HOME']}"]
|
48
51
|
end
|
49
52
|
end
|
50
53
|
|
51
54
|
desc "Run Cucumber features"
|
52
|
-
|
55
|
+
task :features do
|
56
|
+
sh(RUBY_VERSION =~ /^1.8/ ? "cucumber" : "cucumber --profile no_heckle")
|
57
|
+
end
|
53
58
|
|
54
59
|
desc "Run failing examples (see failure output)"
|
55
60
|
Spec::Rake::SpecTask.new('failing_examples') do |t|
|
@@ -86,4 +91,19 @@ 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
|
+
end
|
102
|
+
|
103
|
+
task :clobber => :clobber_tmp
|
104
|
+
|
105
|
+
task :clobber_tmp do
|
106
|
+
cmd = %q[rm -r tmp]
|
107
|
+
puts cmd
|
108
|
+
system cmd if test ?d, 'tmp'
|
109
|
+
end
|