<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/tasks/rspec.rake</filename>
    </added>
    <added>
      <filename>script/autospec</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/.gitignore</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/History.txt</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/License.txt</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/Manifest.txt</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/README.txt</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/Rakefile</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec/CHANGES</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec/rspec_generator.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec/templates/all_stories.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec/templates/previous_failures.txt</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec/templates/rcov.opts</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec/templates/rspec.rake</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec/templates/script/autospec</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec/templates/script/spec</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec/templates/script/spec_server</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec/templates/spec.opts</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec/templates/spec_helper.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec/templates/stories_helper.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec_controller/USAGE</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec_controller/rspec_controller_generator.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec_controller/templates/controller_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec_controller/templates/helper_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec_controller/templates/view_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec_default_values.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec_model/USAGE</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec_model/rspec_model_generator.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec_model/templates/model_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec_scaffold/rspec_scaffold_generator.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/controller_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/edit_erb_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/helper_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/index_erb_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/new_erb_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/routing_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/show_erb_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/init.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/autotest/discover.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/autotest/rails_rspec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/example.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/example/assigns_hash_proxy.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/example/controller_example_group.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/example/cookies_proxy.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/example/functional_example_group.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/example/helper_example_group.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/example/model_example_group.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/example/rails_example_group.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/example/render_observer.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/example/view_example_group.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/extensions.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/extensions/action_controller/base.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/extensions/action_controller/rescue.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/extensions/action_controller/test_response.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/extensions/action_view/base.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/extensions/active_record/base.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/extensions/object.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/extensions/spec/example/configuration.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/extensions/spec/matchers/have.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/interop/testcase.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/matchers.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/matchers/assert_select.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/matchers/change.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/matchers/have_text.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/matchers/include_text.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/matchers/redirect_to.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/matchers/render_template.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/mocks.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/story_adapter.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/lib/spec/rails/version.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/rspec-rails.gemspec</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/autotest/mappings_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/example/assigns_hash_proxy_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/example/configuration_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/example/controller_isolation_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/example/controller_spec_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/example/cookies_proxy_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/example/example_group_factory_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/example/helper_spec_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/example/model_spec_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/example/shared_behaviour_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/example/test_unit_assertion_accessibility_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/example/view_spec_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/extensions/action_controller_rescue_action_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/extensions/action_view_base_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/extensions/active_record_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/interop/testcase_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/matchers/assert_select_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/matchers/description_generation_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/matchers/errors_on_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/matchers/have_text_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/matchers/include_text_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/matchers/redirect_to_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/matchers/render_template_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/matchers/should_change_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/mocks/ar_classes.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/mocks/mock_model_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/mocks/stub_model_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/sample_modified_fixture.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/sample_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/spec_server_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails/spec_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/rails_suite.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/controllers/action_view_base_spec_controller.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/controllers/controller_spec_controller.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/controllers/redirect_spec_controller.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/controllers/render_spec_controller.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/controllers/rjs_spec_controller.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/helpers/addition_helper.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/helpers/explicit_helper.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/helpers/more_explicit_helper.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/helpers/plugin_application_helper.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/helpers/view_spec_helper.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/controller_spec/_partial.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/controller_spec/action_setting_flash_after_session_reset.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/controller_spec/action_setting_flash_before_session_reset.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/controller_spec/action_setting_the_assigns_hash.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/controller_spec/action_with_errors_in_template.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/controller_spec/action_with_template.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/layouts/application.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/layouts/simple.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/objects/_object.html.erb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/render_spec/_a_partial.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/render_spec/action_with_alternate_layout.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/render_spec/some_action.js.rjs</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/render_spec/some_action.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/render_spec/some_action.rjs</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/rjs_spec/_replacement_partial.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/rjs_spec/hide_div.rjs</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/rjs_spec/hide_page_element.rjs</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/rjs_spec/insert_html.rjs</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/rjs_spec/replace.rjs</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/rjs_spec/replace_html.rjs</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/rjs_spec/replace_html_with_partial.rjs</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/rjs_spec/visual_effect.rjs</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/rjs_spec/visual_toggle_effect.rjs</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/tag_spec/no_tags.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/tag_spec/single_div_with_no_attributes.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/tag_spec/single_div_with_one_attribute.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/view_spec/_partial.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/view_spec/_partial_used_twice.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/view_spec/_partial_with_local_variable.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/view_spec/_partial_with_sub_partial.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/view_spec/_spacer.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/view_spec/accessor.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/view_spec/block_helper.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/view_spec/entry_form.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/view_spec/explicit_helper.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/view_spec/foo/show.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/view_spec/implicit_helper.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/view_spec/multiple_helpers.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/view_spec/path_params.html.erb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/view_spec/should_not_receive.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/view_spec/template_with_partial.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/view_spec/template_with_partial_using_collection.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/resources/views/view_spec/template_with_partial_with_array.rhtml</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/spec/spec_helper.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/stories/all.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/stories/configuration/stories.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/stories/helper.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/stories/steps/people.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/stories/transactions_should_rollback</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec-rails/stories/transactions_should_rollback.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/.autotest</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/.gitignore</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/History.txt</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/License.txt</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/Manifest.txt</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/README.txt</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/TODO.txt</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/bin/autospec</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/failing/README.txt</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/failing/diffing_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/failing/failing_autogenerated_docstrings_example.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/failing/failure_in_setup.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/failing/failure_in_teardown.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/failing/mocking_example.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/failing/mocking_with_flexmock.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/failing/mocking_with_mocha.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/failing/mocking_with_rr.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/failing/partial_mock_example.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/failing/predicate_example.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/failing/raising_example.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/failing/spec_helper.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/failing/syntax_error_example.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/failing/team_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/failing/timeout_behaviour.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/autogenerated_docstrings_example.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/before_and_after_example.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/behave_as_example.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/custom_expectation_matchers.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/custom_formatter.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/dynamic_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/file_accessor.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/file_accessor_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/greeter_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/helper_method_example.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/io_processor.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/io_processor_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/legacy_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/mocking_example.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/multi_threaded_behaviour_runner.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/nested_classes_example.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/partial_mock_example.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/pending_example.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/predicate_example.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/priority.txt</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/shared_example_group_example.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/shared_stack_examples.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/simple_matcher_example.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/spec_helper.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/stack.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/stack_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/stack_spec_with_nested_example_groups.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/stubbing_example.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/examples/passing/yielding_example.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/adapters.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/adapters/ruby_engine.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/adapters/ruby_engine/mri.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/adapters/ruby_engine/rubinius.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/dsl.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/dsl/main.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/example/before_and_after_hooks.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/expectations/wrap_expectation.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/interop/test.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/interop/test/unit/autorunner.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/interop/test/unit/testcase.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/interop/test/unit/testresult.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/interop/test/unit/testsuite_adapter.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/interop/test/unit/ui/console/testrunner.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/matchers/errors.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/matchers/exist.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/matchers/generated_descriptions.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/matchers/match_array.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/matchers/method_missing.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/mocks/argument_constraints.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/mocks/extensions.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/mocks/framework.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/runner/formatter/failing_example_groups_formatter.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/runner/formatter/nested_text_formatter.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/runner/formatter/story/progress_bar_formatter.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/story/extensions/regexp.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/lib/spec/story/extensions/string.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/rspec.gemspec</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/autotest/autotest_helper.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/autotest/autotest_matchers.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/autotest/failed_results_re_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/ruby_forker.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec.opts</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/adapters/ruby_engine_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/dsl/main_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/example/example_group_methods_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/example/helper_method_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/example/subclassing_example_group_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/expectations/wrap_expectation_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/interop/test/unit/resources/spec_that_fails.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/interop/test/unit/resources/spec_that_passes.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/interop/test/unit/resources/spec_with_errors.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/interop/test/unit/resources/spec_with_options_hash.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/interop/test/unit/resources/test_case_that_fails.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/interop/test/unit/resources/test_case_that_passes.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/interop/test/unit/resources/test_case_with_errors.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/interop/test/unit/resources/testsuite_adapter_spec_with_test_unit.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/interop/test/unit/spec_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/interop/test/unit/test_unit_spec_helper.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/interop/test/unit/testcase_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/interop/test/unit/testsuite_adapter_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/matchers/match_array_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/mocks/bug_report_10263_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/mocks/bug_report_496.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/mocks/bug_report_600_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/mocks/hash_including_matcher_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/mocks/nil_expectation_warning_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/runner/formatter/base_formatter_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/runner/formatter/base_text_formatter_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/runner/formatter/nested_text_formatter_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/runner/formatter/story/progress_bar_formatter_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/runner/resources/a_bar.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/runner/resources/a_foo.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/runner/resources/a_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/runner/spec_drb.opts</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/runner/spec_parser/spec_parser_fixture.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/spec/spec/spec_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/configuration/before_blocks.story</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/configuration/stories.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/example_groups/autogenerated_docstrings</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/example_groups/example_group_with_should_methods</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/example_groups/nested_groups</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/example_groups/output</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/example_groups/stories.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/helper.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/interop/examples_and_tests_together</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/interop/stories.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/interop/test_but_not_test_unit</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/interop/test_case_with_should_methods</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/mock_framework_integration/stories.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/mock_framework_integration/use_flexmock.story</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/pending_stories/README</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/resources/helpers/cmdline.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/resources/helpers/story_helper.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/resources/matchers/smart_match.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/resources/spec/before_blocks_example.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/resources/spec/example_group_with_should_methods.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/resources/spec/simple_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/resources/spec/spec_with_flexmock.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/resources/steps/running_rspec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/resources/stories/failing_story.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/resources/test/spec_and_test_together.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/resources/test/spec_including_test_but_not_unit.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/resources/test/test_case_with_should_methods.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/stories/multiline_steps.story</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/stories/steps/multiline_steps.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/stories/stories/stories.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/story_server/prototype/javascripts/rspec.js</filename>
    </added>
    <added>
      <filename>vendor/plugins/rspec/story_server/prototype/stylesheets/rspec.css</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,5 @@
 #!/usr/bin/env ruby
 $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + &quot;/../vendor/plugins/rspec/lib&quot;))
+require 'rubygems'
 require 'spec'
 exit ::Spec::Runner::CommandLine.run(::Spec::Runner::OptionParser.parse(ARGV, STDERR, STDOUT))</diff>
      <filename>script/spec</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,4 @@
 #!/usr/bin/env ruby
-$LOAD_PATH.unshift File.dirname(__FILE__) + '/../../rspec/lib' # For svn
 $LOAD_PATH.unshift File.dirname(__FILE__) + '/../vendor/plugins/rspec/lib' # For rspec installed as plugin
 require 'rubygems'
 require 'drb/drb'
@@ -23,17 +22,29 @@ module Spec
               active_connections.delete(name)
             end
           end
-        end        
+        end
 
-        if ::Dispatcher.respond_to?(:cleanup_application)
-          ::Dispatcher.cleanup_application
+        if ActionController.const_defined?(:Dispatcher)
+          dispatcher = ::ActionController::Dispatcher.new($stdout)
+          dispatcher.cleanup_application
         elsif ::Dispatcher.respond_to?(:reset_application!)
           ::Dispatcher.reset_application!
+        else
+          raise &quot;Application reloading failed&quot;
+        end
+        if Object.const_defined?(:Fixtures) &amp;&amp; Fixtures.respond_to?(:reset_cache)
+          Fixtures.reset_cache
         end
+
         ::Dependencies.mechanism = :load
         require_dependency('application.rb') unless Object.const_defined?(:ApplicationController)
         load File.dirname(__FILE__) + '/../spec/spec_helper.rb'
 
+        if in_memory_database?
+          load &quot;#{RAILS_ROOT}/db/schema.rb&quot; # use db agnostic schema by default
+          ActiveRecord::Migrator.up('db/migrate') # use migrations
+        end
+
         ::Spec::Runner::CommandLine.run(
           ::Spec::Runner::OptionParser.parse(
             argv,
@@ -42,6 +53,12 @@ module Spec
           )
         )
       end
+
+      def in_memory_database?
+        ENV[&quot;RAILS_ENV&quot;] == &quot;test&quot; and
+        ::ActiveRecord::Base.connection.class.to_s == &quot;ActiveRecord::ConnectionAdapters::SQLite3Adapter&quot; and
+        ::Rails::Configuration.new.database_configuration['test']['database'] == ':memory:'
+      end
     end
   end
 end
@@ -88,7 +105,7 @@ opts.parse!(ARGV)
 puts &quot;Ready&quot;
 exec_server = lambda {
   trap(&quot;USR2&quot;) { restart_test_server } if Signal.list.has_key?(&quot;USR2&quot;)
-  DRb.start_service(&quot;druby://localhost:8989&quot;, Spec::Runner::RailsSpecServer.new)
+  DRb.start_service(&quot;druby://127.0.0.1:8989&quot;, Spec::Runner::RailsSpecServer.new)
   DRb.thread.join
 }
 </diff>
      <filename>script/spec_server</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,4 @@
 --colour
---format
-progress
---loadby
-mtime
+--format progress
+--loadby mtime
 --reverse
---backtrace
\ No newline at end of file</diff>
      <filename>spec/spec.opts</filename>
    </modified>
    <modified>
      <diff>@@ -1,108 +1,60 @@
-$:.unshift('lib')
+# -*- ruby -*-
+
+$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
 require 'rubygems'
-require 'rake/gempackagetask'
-require 'rake/contrib/rubyforgepublisher'
-require 'rake/clean'
-require 'rake/rdoctask'
-require 'rake/testtask'
+require 'hoe'
 require 'spec/version'
-dir = File.dirname(__FILE__)
-$LOAD_PATH.unshift(File.expand_path(&quot;#{dir}/../pre_commit/lib&quot;))
-require &quot;pre_commit&quot;
+require 'spec/rake/spectask'
 
-# Some of the tasks are in separate files since they are also part of the website documentation
+class Hoe
+  def extra_deps
+    @extra_deps.reject! { |x| Array(x).first == 'hoe' }
+    @extra_deps
+  end
+end
+
+Hoe.new('rspec', Spec::VERSION::STRING) do |p|
+  p.summary = Spec::VERSION::SUMMARY
+  p.url = 'http://rspec.info/'
+  p.description = &quot;Behaviour Driven Development for Ruby.&quot;
+  p.rubyforge_name = 'rspec'
+  p.developer('RSpec Development Team', 'rspec-devel@rubyforge.org')
+  p.remote_rdoc_dir = &quot;rspec/#{Spec::VERSION::STRING}&quot;
+end
+
+['audit','test','test_deps','default','post_blog'].each do |task|
+  Rake.application.instance_variable_get('@tasks').delete(task)
+end
+
+task :verify_rcov =&gt; [:spec, :stories]
+task :default =&gt; :verify_rcov
+
+# # Some of the tasks are in separate files since they are also part of the website documentation
 load File.dirname(__FILE__) + '/rake_tasks/examples.rake'
 load File.dirname(__FILE__) + '/rake_tasks/examples_with_rcov.rake'
 load File.dirname(__FILE__) + '/rake_tasks/failing_examples_with_html.rake'
 load File.dirname(__FILE__) + '/rake_tasks/verify_rcov.rake'
 
-PKG_NAME = &quot;rspec&quot;
-PKG_VERSION   = Spec::VERSION::STRING
-PKG_FILE_NAME = &quot;#{PKG_NAME}-#{PKG_VERSION}&quot;
-PKG_FILES = FileList[
-  '[A-Z]*',
-  'lib/**/*.rb', 
-  'spec/**/*.rb', 
-  'examples/**/*',
-  'plugins/**/*',
-  'stories/**/*'
-]
-
-task :default =&gt; [:verify_rcov]
-task :verify_rcov =&gt; [:spec, :stories]
-
 desc &quot;Run all specs&quot;
 Spec::Rake::SpecTask.new do |t|
   t.spec_files = FileList['spec/**/*_spec.rb']
-  t.spec_opts = ['--options', 'spec.opts']
-  t.rcov = true
-  t.rcov_dir = '../doc/output/coverage'
-  t.rcov_opts = ['--exclude', 'spec\/spec,bin\/spec,examples,\/var\/lib\/gems,\/Library\/Ruby,\.autotest']
+  t.spec_opts = ['--options', 'spec/spec.opts']
+  unless ENV['NO_RCOV']
+    t.rcov = true
+    t.rcov_dir = 'coverage'
+    t.rcov_opts = ['--text-report', '--exclude', &quot;lib/spec.rb,lib/spec/runner.rb,spec\/spec,bin\/spec,examples,\/var\/lib\/gems,\/Library\/Ruby,\.autotest,#{ENV['GEM_HOME']}&quot;]
+  end
 end
 
 desc &quot;Run all stories&quot;
 task :stories do
-  html = 'story_server/prototype/rspec_stories.html'
-  ruby &quot;stories/all.rb --colour --format plain --format html:#{html}&quot;
-  unless IO.read(html) =~ /&lt;span class=&quot;param&quot;&gt;/m
-    raise 'highlighted parameters are broken in story HTML'
-  end
-end
-
-desc &quot;Run all specs and store html output in doc/output/report.html&quot;
-Spec::Rake::SpecTask.new('spec_html') do |t|
-  t.spec_files = FileList['spec/**/*_spec.rb', '../../RSpec.tmbundle/Support/spec/*_spec.rb']
-  t.spec_opts = ['--format html:../doc/output/report.html','--backtrace']
+  ruby &quot;stories/all.rb --colour --format plain&quot;
 end
 
-desc &quot;Run all failing examples&quot;
+desc &quot;Run failing examples (see failure output)&quot;
 Spec::Rake::SpecTask.new('failing_examples') do |t|
   t.spec_files = FileList['failing_examples/**/*_spec.rb']
-end
-
-desc 'Generate HTML documentation for website'
-task :webgen do
-  core.webgen
-end
-
-desc 'Generate RDoc'
-rd = Rake::RDocTask.new do |rdoc|
-  rdoc.rdoc_dir = '../doc/output/rdoc'
-  rdoc.options &lt;&lt; '--title' &lt;&lt; 'RSpec' &lt;&lt; '--line-numbers' &lt;&lt; '--inline-source' &lt;&lt; '--main' &lt;&lt; 'README'
-  rdoc.rdoc_files.include('README', 'CHANGES', 'MIT-LICENSE', 'UPGRADE', 'lib/**/*.rb')
-end
-
-spec = Gem::Specification.new do |s|
-  s.name = PKG_NAME
-  s.version = PKG_VERSION
-  s.summary = Spec::VERSION::DESCRIPTION
-  s.description = &lt;&lt;-EOF
-    RSpec is a behaviour driven development (BDD) framework for Ruby.  RSpec was
-    created in response to Dave Astels' article _A New Look at Test Driven Development_
-    which can be read at: http://daveastels.com/index.php?p=5  RSpec is intended to
-    provide the features discussed in Dave's article.
-  EOF
-
-  s.files = PKG_FILES.to_a
-  s.require_path = 'lib'
-
-  s.has_rdoc = true
-  s.rdoc_options = rd.options
-  s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$|^EXAMPLES.rd$/ }.to_a
-
-  s.autorequire = 'spec'
-  s.bindir = 'bin'
-  s.executables = ['spec', 'spec_translator']
-  s.default_executable = 'spec'
-  s.author = &quot;RSpec Development Team&quot;
-  s.email = &quot;rspec-devel@rubyforge.org&quot;
-  s.homepage = &quot;http://rspec.rubyforge.org&quot;
-  s.rubyforge_project = &quot;rspec&quot;
-end
-
-Rake::GemPackageTask.new(spec) do |pkg|
-  pkg.need_zip = true
-  pkg.need_tar = true
+  t.spec_opts = ['--options', 'spec/spec.opts']
 end
 
 def egrep(pattern)
@@ -124,158 +76,14 @@ task :todo do
   egrep /(FIXME|TODO|TBD)/
 end
 
-task :clobber do
-  core.clobber
-end
-
-task :release =&gt; [:clobber, :verify_committed, :verify_user, :spec, :publish_packages, :tag, :publish_website, :publish_news]
+desc &quot;verify_committed, verify_rcov, post_news, release&quot;
+task :complete_release =&gt; [:verify_committed, :verify_rcov, :post_news, :release]
 
 desc &quot;Verifies that there is no uncommitted code&quot;
 task :verify_committed do
-  IO.popen('svn stat') do |io|
+  IO.popen('git status') do |io|
     io.each_line do |line|
-      raise &quot;\n!!! Do a svn commit first !!!\n\n&quot; if line =~ /^\s*M\s*/
-    end
-  end
-end
-
-desc &quot;Creates a tag in svn&quot;
-task :tag do
-  from = `svn info #{File.dirname(__FILE__)}`.match(/URL: (.*)\/rspec/n)[1]
-  to = from.gsub(/trunk/, &quot;tags/#{Spec::VERSION::TAG}&quot;)
-  current = from.gsub(/trunk/, &quot;tags/CURRENT&quot;)
-
-  puts &quot;Creating tag in SVN&quot;
-  tag_cmd = &quot;svn cp #{from} #{to} -m \&quot;Tag release #{Spec::VERSION::FULL_VERSION}\&quot;&quot;
-  `#{tag_cmd}` ; raise &quot;ERROR: #{tag_cmd}&quot; unless $? == 0
-
-  puts &quot;Removing CURRENT&quot;
-  remove_current_cmd = &quot;svn rm #{current} -m \&quot;Remove tags/CURRENT\&quot;&quot;
-  `#{remove_current_cmd}` ; raise &quot;ERROR: #{remove_current_cmd}&quot; unless $? == 0
-
-  puts &quot;Re-Creating CURRENT&quot;
-  create_current_cmd = &quot;svn cp #{to} #{current} -m \&quot;Copy #{Spec::VERSION::TAG} to tags/CURRENT\&quot;&quot;
-  `#{create_current_cmd}` ; &quot;ERROR: #{create_current_cmd}&quot; unless $? == 0
-end
-
-desc &quot;Run this task before you commit. You should see 'OK TO COMMIT'&quot;
-task(:pre_commit) {core.pre_commit}
-
-desc &quot;Build the website, but do not publish it&quot;
-task(:website) {core.website}
-
-task(:rdoc_rails) {core.rdoc_rails}
-
-task :verify_user do
-  raise &quot;RUBYFORGE_USER environment variable not set!&quot; unless ENV['RUBYFORGE_USER']
-end
-
-desc &quot;Upload Website to RubyForge&quot;
-task :publish_website =&gt; [:verify_user, :website] do
-  unless Spec::VERSION::RELEASE_CANDIDATE
-    publisher = Rake::SshDirPublisher.new(
-      &quot;rspec-website@rubyforge.org&quot;,
-      &quot;/var/www/gforge-projects/#{PKG_NAME}&quot;,
-      &quot;../doc/output&quot;
-    )
-    publisher.upload
-  else
-    puts &quot;** Not publishing packages to RubyForge - this is a prerelease&quot;
-  end
-end
-
-desc &quot;Upload Website archive to RubyForge&quot;
-task :archive_website =&gt; [:verify_user, :website] do
-  publisher = Rake::SshDirPublisher.new(
-    &quot;rspec-website@rubyforge.org&quot;,
-    &quot;/var/www/gforge-projects/#{PKG_NAME}/#{Spec::VERSION::TAG}&quot;,
-    &quot;../doc/output&quot;
-  )
-  publisher.upload
-end
-
-desc &quot;Package the Rails plugin&quot;
-task :package_rspec_on_rails do
-  mkdir 'pkg' rescue nil
-  rm_rf 'pkg/rspec_on_rails' rescue nil
-  `svn export ../rspec_on_rails pkg/rspec_on_rails-#{PKG_VERSION}`
-  Dir.chdir 'pkg' do
-    `tar cvzf rspec_on_rails-#{PKG_VERSION}.tgz rspec_on_rails-#{PKG_VERSION}`
-  end
-end
-task :pkg =&gt; :package_rspec_on_rails
-
-desc &quot;Package the RSpec.tmbundle&quot;
-task :package_tmbundle do
-  mkdir 'pkg' rescue nil
-  rm_rf 'pkg/RSpec.tmbundle' rescue nil
-  `svn export ../RSpec.tmbundle pkg/RSpec.tmbundle`
-  Dir.chdir 'pkg' do
-    `tar cvzf RSpec-#{PKG_VERSION}.tmbundle.tgz RSpec.tmbundle`
-  end
-end
-task :pkg =&gt; :package_tmbundle
-
-desc &quot;Publish gem+tgz+zip on RubyForge. You must make sure lib/version.rb is aligned with the CHANGELOG file&quot;
-task :publish_packages =&gt; [:verify_user, :package] do
-  require File.dirname(__FILE__) + '/../spec_ui/lib/spec/ui/version'
-  release_files = FileList[
-    &quot;pkg/#{PKG_FILE_NAME}.gem&quot;,
-    &quot;pkg/#{PKG_FILE_NAME}.tgz&quot;,
-    &quot;pkg/rspec_on_rails-#{PKG_VERSION}.tgz&quot;,
-    &quot;pkg/#{PKG_FILE_NAME}.zip&quot;,
-    &quot;pkg/RSpec-#{PKG_VERSION}.tmbundle.tgz&quot;,
-    &quot;../spec_ui/pkg/spec_ui-#{Spec::Ui::VERSION::STRING}.gem&quot;
-  ]
-  unless Spec::VERSION::RELEASE_CANDIDATE
-    require 'meta_project'
-    require 'rake/contrib/xforge'
-
-    Rake::XForge::Release.new(MetaProject::Project::XForge::RubyForge.new(PKG_NAME)) do |xf|
-      # Never hardcode user name and password in the Rakefile!
-      xf.user_name = ENV['RUBYFORGE_USER']
-      xf.files = release_files.to_a
-      xf.release_name = &quot;RSpec #{PKG_VERSION}&quot;
-    end
-  else
-    puts &quot;SINCE THIS IS A PRERELEASE, FILES ARE UPLOADED WITH SSH, NOT TO THE RUBYFORGE FILE SECTION&quot;
-    puts &quot;YOU MUST TYPE THE PASSWORD #{release_files.length} TIMES...&quot;
-
-    host = &quot;rspec-website@rubyforge.org&quot;
-    remote_dir = &quot;/var/www/gforge-projects/#{PKG_NAME}&quot;
-
-    publisher = Rake::SshFilePublisher.new(
-      host,
-      remote_dir,
-      File.dirname(__FILE__),
-      *release_files
-    )
-    publisher.upload
-
-    puts &quot;UPLADED THE FOLLOWING FILES:&quot;
-    release_files.each do |file|
-      name = file.match(/pkg\/(.*)/)[1]
-      puts &quot;* http://rspec.rubyforge.org/#{name}&quot;
+      raise &quot;\n!!! Do a git commit first !!!\n\n&quot; if line =~ /^#\s*modified:/
     end
-
-    puts &quot;They are not linked to anywhere, so don't forget to tell people!&quot;
-  end
-end
-
-desc &quot;Publish news on RubyForge&quot;
-task :publish_news =&gt; [:verify_user] do
-  unless Spec::VERSION::RELEASE_CANDIDATE
-    require 'meta_project'
-    require 'rake/contrib/xforge'
-    Rake::XForge::NewsPublisher.new(MetaProject::Project::XForge::RubyForge.new(PKG_NAME)) do |news|
-      # Never hardcode user name and password in the Rakefile!
-      news.user_name = ENV['RUBYFORGE_USER']
-    end
-  else
-    puts &quot;** Not publishing news to RubyForge - this is a prerelease&quot;
   end
-end
-
-def core
-  PreCommit::Core.new(self)
-end
+end
\ No newline at end of file</diff>
      <filename>vendor/plugins/rspec/Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,4 @@
+#!/usr/bin/env ruby
 $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + &quot;/../lib&quot;))
 require 'spec'
-exit ::Spec::Runner::CommandLine.run(rspec_options)
+exit ::Spec::Runner::CommandLine.run</diff>
      <filename>vendor/plugins/rspec/bin/spec</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,3 @@
 Autotest.add_discovery do
-  &quot;rspec&quot; if File.exist?('spec')
+  &quot;rspec&quot; if File.directory?('spec') &amp;&amp; ENV['RSPEC']
 end</diff>
      <filename>vendor/plugins/rspec/lib/autotest/discover.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,94 +1,47 @@
 require 'autotest'
 
+Autotest.add_hook :initialize do |at|
+  at.clear_mappings
+  # watch out: Ruby bug (1.8.6):
+  # %r(/) != /\//
+  at.add_mapping(%r%^spec/.*_spec.rb$%) { |filename, _| 
+    filename 
+  }
+  at.add_mapping(%r%^lib/(.*)\.rb$%) { |_, m| 
+    [&quot;spec/#{m[1]}_spec.rb&quot;]
+  }
+  at.add_mapping(%r%^spec/(spec_helper|shared/.*)\.rb$%) { 
+    at.files_matching %r%^spec/.*_spec\.rb$%
+  }
+end
+
 class RspecCommandError &lt; StandardError; end
 
 class Autotest::Rspec &lt; Autotest
-  
-  def initialize(kernel=Kernel, separator=File::SEPARATOR, alt_separator=File::ALT_SEPARATOR) # :nodoc:
-    super()
-    @kernel, @separator, @alt_separator = kernel, separator, alt_separator
-    @spec_command = spec_command
 
-    # watch out: Ruby bug (1.8.6):
-    # %r(/) != /\//
-    # since Ruby compares the REGEXP source, not the resulting pattern
-    @test_mappings = {
-      %r%^spec/.*\.rb$% =&gt; kernel.proc { |filename, _| 
-        filename 
-      },
-      %r%^lib/(.*)\.rb$% =&gt; kernel.proc { |_, m| 
-        [&quot;spec/#{m[1]}_spec.rb&quot;] 
-      },
-      %r%^spec/(spec_helper|shared/.*)\.rb$% =&gt; kernel.proc { 
-        files_matching %r%^spec/.*_spec\.rb$% 
-      }
-    }
-  end
-  
-  def tests_for_file(filename)
-    super.select { |f| @files.has_key? f }
+  def initialize
+    super
+    self.failed_results_re = /^\d+\)\n(?:\e\[\d*m)?(?:.*?in )?'([^\n]*)'(?: FAILED)?(?:\e\[\d*m)?\n(.*?)\n\n/m
+    self.completed_re = /\n(?:\e\[\d*m)?\d* examples?/m
   end
   
-  alias :specs_for_file :tests_for_file
-  
-  def failed_results(results)
-    results.scan(/^\d+\)\n(?:\e\[\d*m)?(?:.*?Error in )?'([^\n]*)'(?: FAILED)?(?:\e\[\d*m)?\n(.*?)\n\n/m)
-  end
-
-  def handle_results(results)
-    @files_to_test = consolidate_failures failed_results(results)
-    unless @files_to_test.empty? then
-      hook :red
-    else
-      hook :green
-    end unless $TESTING
-    @tainted = true unless @files_to_test.empty?
-  end
-
   def consolidate_failures(failed)
-    filters = Hash.new { |h,k| h[k] = [] }
-    failed.each do |spec, failed_trace|
-      @files.keys.select{|f| f =~ /spec\//}.each do |f|
-        if failed_trace =~ Regexp.new(f)
-          filters[f] &lt;&lt; spec
-          break
-        end
+    filters = new_hash_of_arrays
+    failed.each do |spec, trace|
+      if trace =~ /\n(\.\/)?(.*spec\.rb):[\d]+:/
+        filters[$2] &lt;&lt; spec
       end
     end
     return filters
   end
 
   def make_test_cmd(files_to_test)
-    return &quot;#{ruby} -S #{@spec_command} #{add_options_if_present} #{files_to_test.keys.flatten.join(' ')}&quot;
+    return '' if files_to_test.empty?
+    spec_program = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'bin', 'spec'))
+    return &quot;#{ruby} #{spec_program} #{files_to_test.keys.flatten.join(' ')} #{add_options_if_present}&quot;
   end
   
-  def add_options_if_present
+  def add_options_if_present # :nodoc:
     File.exist?(&quot;spec/spec.opts&quot;) ? &quot;-O spec/spec.opts &quot; : &quot;&quot;
   end
-
-  # Finds the proper spec command to use.  Precendence
-  # is set in the lazily-evaluated method spec_commands.  Alias + Override
-  # that in ~/.autotest to provide a different spec command
-  # then the default paths provided.
-  def spec_command
-    spec_commands.each do |command|
-      if File.exists?(command)
-        return @alt_separator ? (command.gsub @separator, @alt_separator) : command
-      end
-    end
-    raise RspecCommandError, &quot;No spec command could be found!&quot;
-  end
-  
-  # Autotest will look for spec commands in the following
-  # locations, in this order:
-  #
-  #   * bin/spec
-  #   * default spec bin/loader installed in Rubygems
-  def spec_commands
-    [
-      File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'bin', 'spec')),
-      File.join(Config::CONFIG['bindir'], 'spec')
-    ]
-  end
-
 end</diff>
      <filename>vendor/plugins/rspec/lib/autotest/rspec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,38 +1,34 @@
-require 'spec/version'
 require 'spec/matchers'
 require 'spec/expectations'
-require 'spec/translator'
 require 'spec/example'
-require 'spec/extensions'
 require 'spec/runner'
-require 'spec/story'
+require 'spec/adapters'
+require 'spec/version'
+require 'spec/dsl'
 
-if Object.const_defined?(:Test); \
-  require 'spec/extensions/test'; \
-end
 module Spec
-  class &lt;&lt; self
-    def run?
-      @run || rspec_options.examples_run?
-    end
+  def self.test_unit_defined?
+    Object.const_defined?(:Test) &amp;&amp; Test.const_defined?(:Unit) &amp;&amp; Test::Unit.respond_to?(:run?)
+  end
 
-    def run; \
-      return true if run?; \
-      result = rspec_options.run_examples; \
-      @run = true; \
-      result; \
-    end
-    attr_writer :run
+  def self.run?
+    Runner.options.examples_run?
+  end
 
-    def exit?; \
-      !Object.const_defined?(:Test) || Test::Unit.run?; \
-    end
+  def self.run
+    return true if run?
+    Runner.options.run_examples
+  end
+  
+  def self.exit?
+    !test_unit_defined? || Test::Unit.run?
+  end
+
+  def self.spec_command?
+    $0.split('/').last == 'spec'
   end
 end
 
-at_exit do \
-  unless $! || Spec.run?; \
-    success = Spec.run; \
-    exit success if Spec.exit?; \
-  end \
-end
\ No newline at end of file
+if Spec::test_unit_defined?
+  require 'spec/interop/test'
+end</diff>
      <filename>vendor/plugins/rspec/lib/spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,16 +1,38 @@
+module Spec
+  module Example
+    def self.args_and_options(*args)
+      with_options_from(args) do |options|
+        return args, options
+      end
+    end
+
+    def self.scope_from(*args)
+      args[0] || :each
+    end
+
+    def self.scope_and_options(*args)
+      args, options = args_and_options(*args)
+      return scope_from(*args), options
+    end
+
+  private
+    
+    def self.with_options_from(args)
+      yield Hash === args.last ? args.pop : {} if block_given?
+    end
+  end
+end
+
 require 'timeout'
-require 'forwardable'
+require 'spec/example/before_and_after_hooks'
 require 'spec/example/pending'
 require 'spec/example/module_reopening_fix'
 require 'spec/example/example_group_methods'
 require 'spec/example/example_methods'
 require 'spec/example/example_group'
-require 'spec/example/example_group_description'
 require 'spec/example/shared_example_group'
 require 'spec/example/example_group_factory'
 require 'spec/example/errors'
 require 'spec/example/configuration'
-require 'spec/example/example_suite'
-require 'spec/example/example'
-require 'spec/example/example_runner'
 require 'spec/example/example_matcher'
+</diff>
      <filename>vendor/plugins/rspec/lib/spec/example.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,14 +7,20 @@ module Spec
       #     config.mock_with :rspec, :mocha, :flexmock, or :rr
       #   end
       #
-      # To use any other mock framework, you'll have to provide
-      # your own adapter. This is simply a module that responds to
-      # setup_mocks_for_rspec, verify_mocks_for_rspec and teardown_mocks_for_rspec.
+      # To use any other mock framework, you'll have to provide your own
+      # adapter. This is simply a module that responds to the following
+      # methods:
+      #
+      #   setup_mocks_for_rspec
+      #   verify_mocks_for_rspec
+      #   teardown_mocks_for_rspec.
+      #
       # These are your hooks into the lifecycle of a given example. RSpec will
-      # call setup_mocks_for_rspec before running anything else in each Example.
-      # After executing the #after methods, RSpec will then call verify_mocks_for_rspec
-      # and teardown_mocks_for_rspec (this is guaranteed to run even if there are
-      # failures in verify_mocks_for_rspec).
+      # call setup_mocks_for_rspec before running anything else in each
+      # Example. After executing the #after methods, RSpec will then call
+      # verify_mocks_for_rspec and teardown_mocks_for_rspec (this is
+      # guaranteed to run even if there are failures in
+      # verify_mocks_for_rspec).
       #
       # Once you've defined this module, you can pass that to mock_with:
       #
@@ -35,93 +41,122 @@ module Spec
         @mock_framework ||= mock_framework_path(&quot;rspec&quot;)
       end
       
-      # Declares modules to be included in all behaviours (&lt;tt&gt;describe&lt;/tt&gt; blocks).
+      # :call-seq:
+      #   include(Some::Helpers)
+      #   include(Some::Helpers, More::Helpers)
+      #   include(My::Helpers, :type =&gt; :key)
+      #
+      # Declares modules to be included in multiple example groups
+      # (&lt;tt&gt;describe&lt;/tt&gt; blocks). With no &lt;tt&gt;:type&lt;/tt&gt;, the modules listed
+      # will be included in all example groups.
       #
-      #   config.include(My::Bottle, My::Cup)
+      # Use &lt;tt&gt;:type&lt;/tt&gt; to restrict
+      # the inclusion to a subset of example groups. The value assigned to
+      # &lt;tt&gt;:type&lt;/tt&gt; should be a key that maps to a class that is either a
+      # subclass of Spec::Example::ExampleGroup or extends
+      # Spec::Example::ExampleGroupMethods and includes
+      # Spec::Example::ExampleMethods.
       #
-      # If you want to restrict the inclusion to a subset of all the behaviours then
-      # specify this in a Hash as the last argument:
+      # For example, the rspec-rails gem/plugin extends Test::Unit::TestCase
+      # with Spec::Example::ExampleGroupMethods and includes
+      # Spec::Example::ExampleMethods in it. So if you have a module of helper
+      # methods for controller examples, you could do this:
       #
-      #   config.include(My::Pony, My::Horse, :behaviour_type =&gt; :farm)
+      #   config.include(ControllerExampleHelpers, :type =&gt; :controller)
       #
-      # Only behaviours that have that type will get the modules included:
+      # Only example groups that have that type will get the modules included:
       #
-      #   describe &quot;Downtown&quot;, :behaviour_type =&gt; :city do
-      #     # Will *not* get My::Pony and My::Horse included
+      #   describe Account, :type =&gt; :model do
+      #     # Will *not* include ControllerExampleHelpers
       #   end
       #
-      #   describe &quot;Old Mac Donald&quot;, :behaviour_type =&gt; :farm do
-      #     # *Will* get My::Pony and My::Horse included
+      #   describe AccountsController, :type =&gt; :controller do
+      #     # *Will* include ControllerExampleHelpers
       #   end
       #
       def include(*args)
-        args &lt;&lt; {} unless Hash === args.last
-        modules, options = args_and_options(*args)
-        required_behaviour_type = options[:behaviour_type]
-        required_behaviour_type = required_behaviour_type.to_sym if required_behaviour_type
-        modules.each do |mod|
-          ExampleGroupFactory.get!(required_behaviour_type).send(:include, mod)
-        end
+        include_or_extend(:include, *args)
       end
-
+      
+      # :call-seq:
+      #   extend(Some::Helpers)
+      #   extend(Some::Helpers, More::Helpers)
+      #   extend(My::Helpers, :type =&gt; :key)
+      #
+      # Works just like #include, but extends the example groups
+      # with the modules rather than including them.
+      def extend(*args)
+        include_or_extend(:extend, *args)
+      end
+      
       # Defines global predicate matchers. Example:
       #
       #   config.predicate_matchers[:swim] = :can_swim?
       #
       # This makes it possible to say:
       #
-      #   person.should swim # passes if person.should_swim? returns true
+      #   person.should swim # passes if person.can_swim? returns true
       #
       def predicate_matchers
         @predicate_matchers ||= {}
       end
       
-      # Prepends a global &lt;tt&gt;before&lt;/tt&gt; block to all behaviours.
+      # Prepends a global &lt;tt&gt;before&lt;/tt&gt; block to all example groups.
       # See #append_before for filtering semantics.
       def prepend_before(*args, &amp;proc)
-        scope, options = scope_and_options(*args)
-        behaviour_type = ExampleGroupFactory.get!(options[:behaviour_type])
-        behaviour_type.prepend_before(scope, &amp;proc)
+        add_callback(:prepend_before, *args, &amp;proc)
       end
-      # Appends a global &lt;tt&gt;before&lt;/tt&gt; block to all behaviours.
+      
+      # Appends a global &lt;tt&gt;before&lt;/tt&gt; block to all example groups.
       #
-      # If you want to restrict the block to a subset of all the behaviours then
-      # specify this in a Hash as the last argument:
+      # If you want to restrict the block to a subset of all the example
+      # groups then specify this in a Hash as the last argument:
       #
-      #   config.prepend_before(:all, :behaviour_type =&gt; :farm)
+      #   config.prepend_before(:all, :type =&gt; :farm)
       #
       # or
       #
-      #   config.prepend_before(:behaviour_type =&gt; :farm)
+      #   config.prepend_before(:type =&gt; :farm)
       #
       def append_before(*args, &amp;proc)
-        scope, options = scope_and_options(*args)
-        behaviour_type = ExampleGroupFactory.get!(options[:behaviour_type])
-        behaviour_type.append_before(scope, &amp;proc)
+        add_callback(:append_before, *args, &amp;proc)
       end
       alias_method :before, :append_before
 
-      # Prepends a global &lt;tt&gt;after&lt;/tt&gt; block to all behaviours.
+      # Prepends a global &lt;tt&gt;after&lt;/tt&gt; block to all example groups.
       # See #append_before for filtering semantics.
       def prepend_after(*args, &amp;proc)
-        scope, options = scope_and_options(*args)
-        behaviour_type = ExampleGroupFactory.get!(options[:behaviour_type])
-        behaviour_type.prepend_after(scope, &amp;proc)
+        add_callback(:prepend_after, *args, &amp;proc)
       end
       alias_method :after, :prepend_after
-      # Appends a global &lt;tt&gt;after&lt;/tt&gt; block to all behaviours.
+      
+      # Appends a global &lt;tt&gt;after&lt;/tt&gt; block to all example groups.
       # See #append_before for filtering semantics.
       def append_after(*args, &amp;proc)
-        scope, options = scope_and_options(*args)
-        behaviour_type = ExampleGroupFactory.get!(options[:behaviour_type])
-        behaviour_type.append_after(scope, &amp;proc)
+        add_callback(:append_after, *args, &amp;proc)
       end
 
     private
+    
+      def include_or_extend(*args)
+        action = args.shift
+        args &lt;&lt; {} unless Hash === args.last
+        modules, options = Spec::Example.args_and_options(*args)
+        required_example_group = get_type_from_options(options)
+        required_example_group = required_example_group.to_sym if required_example_group
+        modules.each do |mod|
+          ExampleGroupFactory.get(required_example_group).__send__(action, mod)
+        end
+      end
+
+      def add_callback(sym, *args, &amp;proc)
+        scope, options = Spec::Example.scope_and_options(*args)
+        example_group = ExampleGroupFactory.get(get_type_from_options(options))
+        example_group.__send__(sym, scope, &amp;proc)
+      end
 
-      def scope_and_options(*args)
-        args, options = args_and_options(*args)
-        scope = (args[0] || :each), options
+      def get_type_from_options(options)
+        options[:type] || options[:behaviour_type]
       end
     
       def mock_framework_path(framework_name)</diff>
      <filename>vendor/plugins/rspec/lib/spec/example/configuration.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,30 @@
 module Spec
   module Example
     class ExamplePendingError &lt; StandardError
-    end
+      attr_reader :pending_caller
 
-    class PendingExampleFixedError &lt; StandardError
+      def initialize(message=nil)
+        super
+        @pending_caller = caller[2]
+      end
+    end
+    
+    class NotYetImplementedError &lt; ExamplePendingError
+      MESSAGE = &quot;Not Yet Implemented&quot;
+      RSPEC_ROOT_LIB = File.expand_path(File.dirname(__FILE__) + &quot;/../..&quot;)
+      
+      def initialize(backtrace)
+        super(MESSAGE)
+        @pending_caller = pending_caller_from(backtrace)
+      end
+      
+    private
+      
+      def pending_caller_from(backtrace)
+        backtrace.detect {|line| !line.include?(RSPEC_ROOT_LIB) }
+      end
     end
+
+    class PendingExampleFixedError &lt; StandardError; end
   end
 end</diff>
      <filename>vendor/plugins/rspec/lib/spec/example/errors.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,13 +1,23 @@
 module Spec
   module Example
-    # The superclass for all regular RSpec examples.
-    # See also Test::Unit::TestCase::ExampleGroup
+    # Base class for customized example groups. Use this if you
+    # want to make a custom example group.
     class ExampleGroup
       extend Spec::Example::ExampleGroupMethods
       include Spec::Example::ExampleMethods
 
-      def initialize(example) #:nodoc:
-        @_example = example
+      def initialize(defined_description, options={}, &amp;implementation)
+        @_options = options
+        @_defined_description = defined_description
+        @_implementation = implementation || pending_implementation
+        @_backtrace = caller
+      end
+      
+    private
+      
+      def pending_implementation
+        error = NotYetImplementedError.new(caller)
+        lambda { raise(error) }
       end
     end
   end</diff>
      <filename>vendor/plugins/rspec/lib/spec/example/example_group.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,103 +1,82 @@
 module Spec
   module Example
     class ExampleGroupFactory
-      class &lt;&lt; self
+      module ClassMethods
         def reset
-          @example_group_types = {
-            :default =&gt; Spec::Example::ExampleGroup,
-            :shared =&gt; Spec::Example::SharedExampleGroup
-          }
+          @example_group_types = nil
+          default(ExampleGroup)
         end
 
-        # Registers an example group class +klass+ with the symbol
-        # +type+. For example:
+        def registered_or_ancestor_of_registered?(example_group_classes) # :nodoc:
+          example_group_classes.each do |example_group_class|
+            return false unless registered_types.any? do |registered_type|
+              registered_type.ancestors.include? example_group_class
+            end
+          end
+          return true
+        end
+
+        # Registers an example group class +klass+ with the symbol +type+. For
+        # example:
         #
-        #   Spec::Example::ExampleGroupFactory.register(:farm, Spec::Farm::Example::FarmExampleGroup)
+        #   Spec::Example::ExampleGroupFactory.register(:farm, FarmExampleGroup)
         #
-        # This will cause Main#describe from a file living in 
-        # &lt;tt&gt;spec/farm&lt;/tt&gt; to create example group instances of type
-        # Spec::Farm::Example::FarmExampleGroup.
-        def register(id, behaviour)
-          @example_group_types[id] = behaviour
+        # With that you can append a hash with :type =&gt; :farm to the describe
+        # method and it will load an instance of FarmExampleGroup.
+        #
+        #   describe Pig, :type =&gt; :farm do
+        #     ...
+        #
+        # If you don't use the hash explicitly, &lt;tt&gt;describe&lt;/tt&gt; will
+        # implicitly use an instance of FarmExampleGroup for any file loaded
+        # from the &lt;tt&gt;./spec/farm&lt;/tt&gt; directory.
+        def register(key, example_group_class)
+          @example_group_types[key] = example_group_class
+        end
+        
+        # Sets the default ExampleGroup class
+        def default(example_group_class)
+          old = @example_group_types
+          @example_group_types = Hash.new(example_group_class)
+          @example_group_types.merge!(old) if old
         end
 
-        def get(id=:default)
-          id ||= :default
-          if @example_group_types.values.include?(id)
-            return id
+        def get(key=nil)
+          if @example_group_types.values.include?(key)
+            key
           else
-            return @example_group_types[id]
+            @example_group_types[key]
           end
         end
         
-        def get!(id=:default)
-          example_group_class = get(id)
-          unless example_group_class
-            raise &quot;ExampleGroup #{id.inspect} is not registered. Use ::Spec::Example::ExampleGroupFactory.register&quot;
-          end
-          return example_group_class
-        end  
-
-        # Dynamically creates a class 
         def create_example_group(*args, &amp;block)
-          opts = Hash === args.last ? args.last : {}
-          if opts[:shared]
-            return create_shared_example_group(*args, &amp;block)
-          else
-            superclass = determine_superclass(opts)
-            create_example_group_class(superclass, *args, &amp;block)
-          end
+          raise ArgumentError if args.empty?
+          raise ArgumentError unless block
+          args &lt;&lt; {} unless Hash === args.last
+          args.last[:spec_path] ||= File.expand_path(caller(0)[2])
+          superclass = determine_superclass(args.last)
+          superclass.describe(*args, &amp;block)
         end
-
-        protected
+        
+      protected
 
         def determine_superclass(opts)
-          # new: replaces behaviour_type
-          if opts[:type]
-            id = opts[:type]
-
-          #backwards compatibility
-          elsif opts[:behaviour_type]
-            id = opts[:behaviour_type]
-
+          key = if opts[:type]
+            opts[:type]
           elsif opts[:spec_path] =~ /spec(\\|\/)(#{@example_group_types.keys.join('|')})/
-            id = $2.to_sym
-          else
-            id = :default
-          end
-          get(id)
-        end
-
-        def create_example_group_class(superclass, *args, &amp;block)
-          create_uniquely_named_class(superclass) do
-            describe(*args)
-            register
-            module_eval(&amp;block)
+            $2 == '' ? nil : $2.to_sym
           end
+          get(key)
         end
         
-        def create_uniquely_named_class(superclass, &amp;block)
-          example_group_class = Class.new(superclass)
-          class_name = &quot;Subclass_#{class_count}&quot;
-          superclass.instance_eval do
-            const_set(class_name, example_group_class)
-          end
-          example_group_class.instance_eval(&amp;block)
-          example_group_class
-        end
+      private
         
-        def create_shared_example_group(*args, &amp;block)
-          shared_example_group = @example_group_types[:shared].new(*args, &amp;block)
-          shared_example_group.register
-          shared_example_group
+        def registered_types
+          @example_group_types.values
         end
 
-        def class_count
-          @class_count ||= 0
-          @class_count += 1
-          @class_count
-        end
       end
+      extend ClassMethods
       self.reset
     end
   end</diff>
      <filename>vendor/plugins/rspec/lib/spec/example/example_group_factory.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,18 +1,51 @@
 module Spec
   module Example
 
-    # See http://rspec.rubyforge.org/documentation/before_and_after.html
     module ExampleGroupMethods
-      attr_accessor :description
+      include Spec::Example::BeforeAndAfterHooks
+      
+      def self.matcher_class
+        @matcher_class
+      end
+      
+      def self.matcher_class=(matcher_class)
+        @matcher_class = matcher_class
+      end
 
-      def inherited(klass)
-        super
-        unless klass.name.to_s == &quot;&quot;
-          klass.describe(klass.name)
-          klass.register
+      def self.description_text(*args)
+        args.inject(&quot;&quot;) do |description, arg|
+          description &lt;&lt; &quot; &quot; unless (description == &quot;&quot; || arg.to_s =~ /^(\s|\.|#)/)
+          description &lt;&lt; arg.to_s
         end
       end
 
+      attr_reader :description_options, :spec_path
+      alias :options :description_options
+      
+      # Provides the backtrace up to where this example_group was declared.
+      def backtrace
+        @backtrace
+      end
+
+      # Deprecated - use +backtrace()+
+      def example_group_backtrace
+        Kernel.warn &lt;&lt;-WARNING
+ExampleGroupMethods#example_group_backtrace is deprecated and will be removed
+from a future version. Please use ExampleGroupMethods#backtrace instead.
+WARNING
+        backtrace
+      end
+      
+      def description_args
+        @description_args ||= []
+      end
+
+      def inherited(klass)
+        super
+        klass.register
+        Spec::Runner.register_at_exit_hook
+      end
+      
       # Makes the describe/it syntax available from a class. For example:
       #
       #   class StackSpec &lt; Spec::ExampleGroup
@@ -28,34 +61,57 @@ module Spec
       #   end
       #
       def describe(*args, &amp;example_group_block)
+        args &lt;&lt; {} unless Hash === args.last
         if example_group_block
-          Class.new(self) do
-            describe(*args)
-            register
-            module_eval(&amp;example_group_block)
+          options = args.last
+          # Ruby 1.9 - the next line uses example_group_block.binding instead of example_group_block
+          options[:spec_path] = eval(&quot;caller(0)[1]&quot;, example_group_block.binding) unless options[:spec_path]
+          if options[:shared]
+            create_shared_example_group(*args, &amp;example_group_block)
+          else
+            create_subclass(*args, &amp;example_group_block)
           end
         else
           set_description(*args)
-          before_eval
-          self
         end
       end
-
-      # Use this to pull in examples from shared behaviours.
-      # See Spec::Runner for information about shared behaviours.
-      def it_should_behave_like(shared_example_group)
-        case shared_example_group
-        when SharedExampleGroup
-          include shared_example_group
-        else
-          example_group = SharedExampleGroup.find_shared_example_group(shared_example_group)
-          unless example_group
-            raise RuntimeError.new(&quot;Shared Example Group '#{shared_example_group}' can not be found&quot;)
-          end
-          include(example_group)
+      alias :context :describe
+      
+      def create_shared_example_group(*args, &amp;example_group_block) # :nodoc:
+        SharedExampleGroup.register(*args, &amp;example_group_block)
+      end
+      
+      def create_subclass(*args, &amp;example_group_block) # :nodoc:
+        subclass(&quot;Subclass&quot;) do
+          set_description(*args)
+          module_eval(&amp;example_group_block)
         end
       end
-
+      
+      # Creates a new subclass of self, with a name &quot;under&quot; our own name.
+      # Example:
+      #
+      #   x = Foo::Bar.subclass('Zap'){}
+      #   x.name # =&gt; Foo::Bar::Zap_1
+      #   x.superclass.name # =&gt; Foo::Bar
+      def subclass(base_name, &amp;body) # :nodoc:
+        @class_count ||= 0
+        @class_count += 1
+        klass = Class.new(self)
+        class_name = &quot;#{base_name}_#{@class_count}&quot;
+        const_set(class_name, klass)
+        klass.instance_eval(&amp;body)
+        klass
+      end
+      
+      # Use this to pull in examples from shared example groups.
+      # See Spec::Runner for information about shared example groups.
+      def it_should_behave_like(*shared_example_groups)
+        shared_example_groups.each do |group|
+          include_shared_example_group(group)
+        end
+      end
+      
       # :call-seq:
       #   predicate_matchers[matcher_name] = method_on_object
       #   predicate_matchers[matcher_name] = [method1_on_object, method2_on_object]
@@ -85,113 +141,97 @@ module Spec
       #     end
       #   end
       def predicate_matchers
-        @predicate_matchers ||= {:exist =&gt; :exist?, :an_instance_of =&gt; :is_a?}
-      end
-
-      # Creates an instance of Spec::Example::Example and adds
-      # it to a collection of examples of the current behaviour.
-      def it(description=:__generate_docstring, &amp;block)
-        example = create_example(description, &amp;block)
-        example_objects &lt;&lt; example
-        example
-      end
-      
-      alias_method :specify, :it
-      
-      # Use this to temporarily disable an example.
-      def xit(description=:__generate_docstring, opts={}, &amp;block)
-        Kernel.warn(&quot;Example disabled: #{description}&quot;)
+        @predicate_matchers ||= {:an_instance_of =&gt; :is_a?}
       end
 
-      def add_example(example)
-        example_objects &lt;&lt; example
+      # Creates an instance of the current example group class and adds it to
+      # a collection of examples of the current example group.
+      def example(description=nil, options={}, &amp;implementation)
+        e = new(description, options, &amp;implementation)
+        example_objects &lt;&lt; e
+        e
       end
 
-      def described_type #:nodoc:
-        description.described_type
-      end
+      alias_method :it, :example
+      alias_method :specify, :example
 
-      def examples #:nodoc:
-        examples = example_objects.dup
-        instance_methods.sort.each do |method_name|
-          if (is_test?(method_name) || is_spec?(method_name)) &amp;&amp; (
-            instance_method(method_name).arity == 0 ||
-            instance_method(method_name).arity == -1
-          )
-            examples &lt;&lt; create_example(method_name) do
-              __send__(method_name)
-            end
-          end
-        end
-        rspec_options.reverse ? examples.reverse : examples
+      # Use this to temporarily disable an example.
+      def xexample(description=nil, opts={}, &amp;block)
+        Kernel.warn(&quot;Example disabled: #{description}&quot;)
       end
       
-      def number_of_examples #:nodoc:
-        examples.length
-      end
+      alias_method :xit, :xexample
+      alias_method :xspecify, :xexample
 
-      # Registers a block to be executed before each example.
-      # This method prepends +block+ to existing before blocks.
-      def prepend_before(*args, &amp;block)
-        scope, options = scope_and_options(*args)
-        parts = before_parts_from_scope(scope)
-        parts.unshift(block)
-      end
+      def run
+        examples = examples_to_run
+        reporter.add_example_group(self) unless examples_to_run.empty?
+        return true if examples.empty?
+        return dry_run(examples) if dry_run?
 
-      # Registers a block to be executed before each example.
-      # This method appends +block+ to existing before blocks.
-      def append_before(*args, &amp;block)
-        scope, options = scope_and_options(*args)
-        parts = before_parts_from_scope(scope)
-        parts &lt;&lt; block
-      end
-      alias_method :before, :append_before
+        plugin_mock_framework
+        define_methods_from_predicate_matchers
 
-      # Registers a block to be executed after each example.
-      # This method prepends +block+ to existing after blocks.
-      def prepend_after(*args, &amp;block)
-        scope, options = scope_and_options(*args)
-        parts = after_parts_from_scope(scope)
-        parts.unshift(block)
+        success, before_all_instance_variables = run_before_all
+        success, after_all_instance_variables  = execute_examples(success, before_all_instance_variables, examples)
+        success                                = run_after_all(success, after_all_instance_variables)
       end
-      alias_method :after, :prepend_after
 
-      # Registers a block to be executed after each example.
-      # This method appends +block+ to existing after blocks.
-      def append_after(*args, &amp;block)
-        scope, options = scope_and_options(*args)
-        parts = after_parts_from_scope(scope)
-        parts &lt;&lt; block
+      def description
+        result = ExampleGroupMethods.description_text(*description_parts)
+        (result.nil? || result == &quot;&quot;) ? to_s : result
       end
-
-      def remove_after(scope, &amp;block)
-        after_each_parts.delete(block)
+      
+      def described_type
+        description_parts.reverse.find {|part| part.is_a?(Module)}
       end
-
-      # Deprecated. Use before(:each)
-      def setup(&amp;block)
-        before(:each, &amp;block)
+      
+      # Defines an explicit subject for an example group which can then be the
+      # implicit receiver (through delegation) of calls to +should+.
+      #
+      # == Examples
+      #
+      #   describe CheckingAccount, &quot;with $50&quot; do
+      #     subject { CheckingAccount.new(:amount =&gt; 50, :currency =&gt; :USD) }
+      #     it { should have_a_balance_of(50, :USD)}
+      #     it { should_not be_overdrawn}
+      #   end
+      #
+      # See +ExampleMethods#should+ for more information about this approach.
+      def subject(&amp;block)
+        @_subject_block = block
       end
-
-      # Deprecated. Use after(:each)
-      def teardown(&amp;block)
-        after(:each, &amp;block)
+      
+      def subject_block
+        @_subject_block || lambda {nil}
       end
-
-      def before_all_parts # :nodoc:
-        @before_all_parts ||= []
+      
+      def description_parts #:nodoc:
+        parts = []
+        each_ancestor_example_group_class do |example_group_class|
+          parts &lt;&lt; example_group_class.description_args
+        end
+        parts.flatten.compact
       end
 
-      def after_all_parts # :nodoc:
-        @after_all_parts ||= []
+      def set_description(*args)
+        args, options = Spec::Example.args_and_options(*args)
+        @description_args = args
+        @description_options = options
+        @description_text = ExampleGroupMethods.description_text(*args)
+        @backtrace = caller(1)
+        @spec_path = File.expand_path(options[:spec_path]) if options[:spec_path]
+        self
       end
-
-      def before_each_parts # :nodoc:
-        @before_each_parts ||= []
+      
+      def examples #:nodoc:
+        examples = example_objects.dup
+        add_method_examples(examples)
+        Spec::Runner.options.reverse ? examples.reverse : examples
       end
 
-      def after_each_parts # :nodoc:
-        @after_each_parts ||= []
+      def number_of_examples #:nodoc:
+        examples.length
       end
 
       # Only used from RSpec's own examples
@@ -201,92 +241,117 @@ module Spec
         @before_each_parts = nil
         @after_each_parts = nil
       end
-      
-      def suite
-        description = description ? description.description : &quot;RSpec Description Suite&quot;
-        customize_example
-        suite = ExampleSuite.new(description, self)
-        add_examples(suite)
-        suite
-      end
-      
+
       def register
-        rspec_options.add_example_group self
+        Spec::Runner.options.add_example_group self
       end
 
-      def unregister
-        rspec_options.remove_example_group self
+      def unregister #:nodoc:
+        Spec::Runner.options.remove_example_group self
       end
 
       def run_before_each(example)
-        execute_in_class_hierarchy(false) do |behaviour|
-          example.eval_each_fail_fast(behaviour.before_each_parts)
+        each_ancestor_example_group_class do |example_group_class|
+          example.eval_each_fail_fast(example_group_class.before_each_parts)
         end
       end
-      
-      def run_before_all(example)
-        execute_in_class_hierarchy(false) do |behaviour|
-          example.eval_each_fail_fast(behaviour.before_all_parts)
+
+      def run_after_each(example)
+        each_ancestor_example_group_class(:superclass_first) do |example_group_class|
+          example.eval_each_fail_slow(example_group_class.after_each_parts)
+        end
+      end
+
+    private
+      def dry_run(examples)
+        examples.each do |example|
+          Spec::Runner.options.reporter.example_started(example)
+          Spec::Runner.options.reporter.example_finished(example)
         end
+        return true
       end
 
-      def run_after_all(example)
-        execute_in_class_hierarchy(true) do |behaviour|
-          example.eval_each_fail_slow(behaviour.after_all_parts)
+      def run_before_all
+        before_all = new(&quot;before(:all)&quot;)
+        begin
+          each_ancestor_example_group_class do |example_group_class|
+            before_all.eval_each_fail_fast(example_group_class.before_all_parts)
+          end
+          return [true, before_all.instance_variable_hash]
+        rescue Exception =&gt; e
+          reporter.failure(before_all, e)
+          return [false, before_all.instance_variable_hash]
         end
       end
-      
-      def run_after_each(example)
-        execute_in_class_hierarchy(true) do |behaviour|
-          example.eval_each_fail_slow(behaviour.after_each_parts)
+
+      def execute_examples(success, instance_variables, examples)
+        return [success, instance_variables] unless success
+
+        after_all_instance_variables = instance_variables
+        examples.each do |example_group_instance|
+          success &amp;= example_group_instance.execute(Spec::Runner.options, instance_variables)
+          after_all_instance_variables = example_group_instance.instance_variable_hash
         end
+        return [success, after_all_instance_variables]
       end
 
-    private
-      def create_example(description, &amp;implementation) #:nodoc:
-        Example.new(description, &amp;implementation)
+      def run_after_all(success, instance_variables)
+        after_all = new(&quot;after(:all)&quot;)
+        after_all.set_instance_variables_from_hash(instance_variables)
+        each_ancestor_example_group_class(:superclass_first) do |example_group_class|
+          after_all.eval_each_fail_slow(example_group_class.after_all_parts)
+        end
+        return success
+      rescue Exception =&gt; e
+        reporter.failure(after_all, e)
+        return false
+      end
+
+      def examples_to_run
+        all_examples = examples
+        return all_examples unless specified_examples?
+        all_examples.reject do |example|
+          matcher = ExampleGroupMethods.matcher_class.
+            new(description.to_s, example.description)
+          !matcher.matches?(specified_examples)
+        end
       end
-      
-      def example_objects
-        @example_objects ||= []
+
+      def specified_examples?
+        specified_examples &amp;&amp; !specified_examples.empty?
       end
 
-      def customize_example
-        plugin_mock_framework
-        define_predicate_matchers predicate_matchers
-        define_predicate_matchers(Spec::Runner.configuration.predicate_matchers)
+      def specified_examples
+        Spec::Runner.options.examples
       end
 
-      def execute_in_class_hierarchy(superclass_first)
+      def reporter
+        Spec::Runner.options.reporter
+      end
+
+      def dry_run?
+        Spec::Runner.options.dry_run
+      end
+
+      def example_objects
+        @example_objects ||= []
+      end
+
+      def each_ancestor_example_group_class(superclass_last=false)
         classes = []
         current_class = self
-        while is_example_group?(current_class)
-          superclass_first ? classes &lt;&lt; current_class : classes.unshift(current_class)
+        while is_example_group_class?(current_class)
+          superclass_last ? classes &lt;&lt; current_class : classes.unshift(current_class)
           current_class = current_class.superclass
         end
-        superclass_first ? classes &lt;&lt; ExampleMethods : classes.unshift(ExampleMethods)
-
-        classes.each do |behaviour|
-          yield behaviour
-        end
-      end
-      
-      def is_example_group?(klass)
-        klass.kind_of?(ExampleGroupMethods)
-      end
-      
-      def add_examples(suite)
-        examples.each do |example|
-          suite &lt;&lt; new(example)
+        
+        classes.each do |example_group|
+          yield example_group
         end
       end
 
-      def is_test?(method_name)
-        method_name =~ /^test_./
-      end
-      
-      def is_spec?(method_name)
-        !(method_name =~ /^should(_not)?$/) &amp;&amp; method_name =~ /^should/
+      def is_example_group_class?(klass)
+        klass.kind_of?(ExampleGroupMethods) &amp;&amp; klass.included_modules.include?(ExampleMethods)
       end
 
       def plugin_mock_framework
@@ -299,48 +364,52 @@ module Spec
         end
       end
 
-      def define_predicate_matchers(definitions) # :nodoc:
-        definitions.each_pair do |matcher_method, method_on_object|
+      def define_methods_from_predicate_matchers # :nodoc:
+        all_predicate_matchers = predicate_matchers.merge(
+          Spec::Runner.configuration.predicate_matchers
+        )
+        all_predicate_matchers.each_pair do |matcher_method, method_on_object|
           define_method matcher_method do |*args|
             eval(&quot;be_#{method_on_object.to_s.gsub('?','')}(*args)&quot;)
           end
         end
       end
 
-      def scope_and_options(*args)
-        args, options = args_and_options(*args)
-        scope = (args[0] || :each), options
-      end
-
-      def before_parts_from_scope(scope)
-        case scope
-        when :each; before_each_parts
-        when :all; before_all_parts
+      def add_method_examples(examples)
+        instance_methods.sort.each do |method_name|
+          if example_method?(method_name)
+            examples &lt;&lt; new(method_name) do
+              __send__(method_name)
+            end
+          end
         end
       end
 
-      def after_parts_from_scope(scope)
-        case scope
-        when :each; after_each_parts
-        when :all; after_all_parts
-        end
+      def example_method?(method_name)
+        should_method?(method_name)
       end
 
-      def before_eval
+      def should_method?(method_name)
+        !(method_name =~ /^should(_not)?$/) &amp;&amp;
+        method_name =~ /^should/ &amp;&amp; (
+          [-1,0].include?(instance_method(method_name).arity)
+        )
       end
 
-      def set_description(*args)
-        unless self.class == ExampleGroup
-          args &lt;&lt; {} unless Hash === args.last
-          args.last[:example_group] = self
-        end
-        self.description = ExampleGroupDescription.new(*args)
-        if described_type.class == Module
-          include described_type
+      def include_shared_example_group(shared_example_group)
+        case shared_example_group
+        when SharedExampleGroup
+          include shared_example_group
+        else
+          example_group = SharedExampleGroup.find(shared_example_group)
+          unless example_group
+            raise RuntimeError.new(&quot;Shared Example Group '#{shared_example_group}' can not be found&quot;)
+          end
+          include(example_group)
         end
-        self.description
       end
+
     end
-    
+
   end
-end
\ No newline at end of file
+end</diff>
      <filename>vendor/plugins/rspec/lib/spec/example/example_group_methods.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,8 @@
 module Spec
   module Example
     class ExampleMatcher
-      def initialize(example_group_name, example_name)
-        @example_group_name = example_group_name
+      def initialize(example_group_description, example_name)
+        @example_group_description = example_group_description
         @example_name = example_name
       end
       
@@ -15,28 +15,30 @@ module Spec
       
       protected
       def matches_literal_example?(specified_example)
-        specified_example =~ /(^#{behaviour_regexp} #{example_regexp}$|^#{behaviour_regexp}$|^#{behaviour_with_before_all_regexp}$|^#{example_regexp}$)/
+        specified_example =~ /(^#{example_group_regex} #{example_regexp}$|^#{example_group_regex}$|^#{example_group_with_before_all_regexp}$|^#{example_regexp}$)/
       end
 
       def matches_example_not_considering_modules?(specified_example)
-        specified_example =~ /(^#{behaviour_regexp_not_considering_modules} #{example_regexp}$|^#{behaviour_regexp_not_considering_modules}$|^#{example_regexp}$)/
+        specified_example =~ /(^#{example_group_regex_not_considering_modules} #{example_regexp}$|^#{example_group_regex_not_considering_modules}$|^#{example_regexp}$)/
       end
 
-      def behaviour_regexp
-        Regexp.escape(@example_group_name)
+      def example_group_regex
+        Regexp.escape(@example_group_description)
       end
 
-      def behaviour_with_before_all_regexp
-        Regexp.escape(&quot;#{@example_group_name} before(:all)&quot;)
+      def example_group_with_before_all_regexp
+        Regexp.escape(&quot;#{@example_group_description} before(:all)&quot;)
       end
 
-      def behaviour_regexp_not_considering_modules
-        Regexp.escape(@example_group_name.split('::').last)
+      def example_group_regex_not_considering_modules
+        Regexp.escape(@example_group_description.split('::').last)
       end
 
       def example_regexp
         Regexp.escape(@example_name)
       end
     end
+
+    ExampleGroupMethods.matcher_class = ExampleMatcher
   end
 end</diff>
      <filename>vendor/plugins/rspec/lib/spec/example/example_matcher.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,65 +1,87 @@
 module Spec
   module Example
     module ExampleMethods
-      extend ExampleGroupMethods
-      extend ModuleReopeningFix
-
-      include ::Spec::Matchers
-      include ::Spec::Example::Pending
       
-      attr_reader :_example
+      extend ModuleReopeningFix
       
-      def violated(message=&quot;&quot;)
-        raise Spec::Expectations::ExpectationNotMetError.new(message)
+      def subject # :nodoc: this is somewhat experimental
+        @subject ||= ( instance_variable_get(subject_variable_name) ||
+                       instance_eval(&amp;self.class.subject_block) ||
+                       (described_class ? described_class.new : nil) )
       end
-      
-      def run
-        _example.run_in(self)
+
+      # When +should+ is called with no explicit receiver, the call is
+      # delegated to the *subject* of the example group. This could be either
+      # an explicit subject generated by calling the block passed to
+      # +ExampleGroupMethods#subject+, or, if the group is describing a class,
+      # an implicitly generated instance of that class.
+      def should(matcher=nil)
+        if matcher
+          subject.should(matcher)
+        else
+          subject.should
+        end
       end
-      
-      def description
-        _example.description
+
+      # Just like +should+, +should_not+ delegates to the subject (implicit or
+      # explicit) of the example group.
+      def should_not(matcher)
+        subject.should_not(matcher)
       end
       
-      def description=(description)
-        _example.description=(description)
-      end
-            
-      def use_generated_description?
-        _example.description == :__generate_docstring
+      def violated(message=&quot;&quot;)
+        raise Spec::Expectations::ExpectationNotMetError.new(message)
       end
 
-      def copy_instance_variables_from(obj)
-        super(obj, [:@_example, :@_result])
+      def description
+        @_defined_description || ::Spec::Matchers.generated_description || &quot;NO NAME&quot;
       end
-
-      def run_before_all
-        self.class.run_before_all(self)
+      
+      def options
+        @_options
       end
 
-      def run_before_each
-        self.class.run_before_each(self)
-      end
+      def execute(options, instance_variables)
+        options.reporter.example_started(self)
+        set_instance_variables_from_hash(instance_variables)
+        
+        execution_error = nil
+        Timeout.timeout(options.timeout) do
+          begin
+            before_each_example
+            eval_block
+          rescue Exception =&gt; e
+            execution_error ||= e
+          end
+          begin
+            after_each_example
+          rescue Exception =&gt; e
+            execution_error ||= e
+          end
+        end
 
-      def run_after_each
-        self.class.run_after_each(self)
+        options.reporter.example_finished(self, execution_error)
+        success = execution_error.nil? || ExamplePendingError === execution_error
       end
 
-      def run_after_all
-        self.class.run_after_all(self)
+      def instance_variable_hash # :nodoc:
+        instance_variables.inject({}) do |variable_hash, variable_name|
+          variable_hash[variable_name] = instance_variable_get(variable_name)
+          variable_hash
+        end
       end
 
-      def eval_each_fail_fast(procs) #:nodoc:
-        procs.each do |proc|
-          instance_eval(&amp;proc)
+      def eval_each_fail_fast(examples) # :nodoc:
+        examples.each do |example|
+          instance_eval(&amp;example)
         end
       end
 
-      def eval_each_fail_slow(procs) #:nodoc:
+      def eval_each_fail_slow(examples) # :nodoc:
         first_exception = nil
-        procs.each do |proc|
+        examples.each do |example|
           begin
-            instance_eval(&amp;proc)
+            instance_eval(&amp;example)
           rescue Exception =&gt; e
             first_exception ||= e
           end
@@ -67,6 +89,80 @@ module Spec
         raise first_exception if first_exception
       end
 
+      # Concats the class description with the example description.
+      #
+      #   describe Account do
+      #     it &quot;should start with a balance of 0&quot; do
+      #     ...
+      #
+      #   full_description
+      #   =&gt; &quot;Account should start with a balance of 0&quot;
+      def full_description
+        &quot;#{self.class.description} #{self.description}&quot;
+      end
+      
+      def set_instance_variables_from_hash(ivars) # :nodoc:
+        ivars.each do |variable_name, value|
+          # Ruby 1.9 requires variable.to_s on the next line
+          unless ['@_implementation', '@_defined_description', '@_matcher_description', '@method_name'].include?(variable_name.to_s)
+            instance_variable_set variable_name, value
+          end
+        end
+      end
+
+      def eval_block # :nodoc:
+        instance_eval(&amp;@_implementation)
+      end
+
+      # Provides the backtrace up to where this example was declared.
+      def backtrace
+        @_backtrace
+      end
+      
+      # Deprecated - use +backtrace()+
+      def implementation_backtrace
+        Kernel.warn &lt;&lt;-WARNING
+ExampleMethods#implementation_backtrace is deprecated and will be removed
+from a future version. Please use ExampleMethods#backtrace instead.
+WARNING
+        backtrace
+      end
+
+      private
+      include Matchers
+      include Pending
+      
+      def before_each_example
+        setup_mocks_for_rspec
+        self.class.run_before_each(self)
+      end
+
+      def after_each_example
+        self.class.run_after_each(self)
+        verify_mocks_for_rspec
+      ensure
+        teardown_mocks_for_rspec
+      end
+
+      def subject_variable_name
+        '@' &lt;&lt; (described_class ? underscore(described_class.name) : '__this_does_not_exist')
+      end
+      
+      def described_class
+        Class === described_type ? described_type : nil
+      end
+      
+      def described_type
+        self.class.described_type
+      end
+
+      def underscore(camel_cased_word)
+        camel_cased_word.to_s.gsub(/::/, '_').
+          gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
+          gsub(/([a-z\d])([A-Z])/,'\1_\2').
+          tr(&quot;-&quot;, &quot;_&quot;).
+          downcase
+      end
     end
   end
-end
\ No newline at end of file
+end</diff>
      <filename>vendor/plugins/rspec/lib/spec/example/example_methods.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 module Spec
   module Example
+    # This is a fix for ...Something in Ruby 1.8.6??... (Someone fill in here please - Aslak)
     module ModuleReopeningFix
       def child_modules
         @child_modules ||= []</diff>
      <filename>vendor/plugins/rspec/lib/spec/example/module_reopening_fix.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,58 +1,62 @@
 module Spec
   module Example
     class SharedExampleGroup &lt; Module
-      class &lt;&lt; self
-        def add_shared_example_group(new_example_group)
-          guard_against_redefining_existing_example_group(new_example_group)
-          shared_example_groups &lt;&lt; new_example_group
+      module ClassMethods
+        def register(*args, &amp;block)
+          new_example_group = new(*args, &amp;block)
+          shared_example_groups &lt;&lt; new_example_group unless already_registered?(new_example_group)
+          new_example_group
+        end
+        
+        def find(example_group_description)
+          shared_example_groups.find {|b| b.description == example_group_description}
         end
 
-        def find_shared_example_group(example_group_description)
-          shared_example_groups.find do |b|
-            b.description == example_group_description
-          end
+        def clear
+          shared_example_groups.clear
+        end
+        
+        def include?(group)
+          shared_example_groups.include?(group)
+        end
+        
+        def count
+          shared_example_groups.length
         end
 
+      private
+      
         def shared_example_groups
-          # TODO - this needs to be global, or at least accessible from
-          # from subclasses of Example in a centralized place. I'm not loving
-          # this as a solution, but it works for now.
-          $shared_example_groups ||= []
+          @shared_example_groups ||= []
         end
-
-        private
-        def guard_against_redefining_existing_example_group(new_example_group)
-          existing_example_group = find_shared_example_group(new_example_group.description)
-          return unless existing_example_group
-          return if new_example_group.equal?(existing_example_group)
-          return if spec_path(new_example_group) == spec_path(existing_example_group)
+      
+        def already_registered?(new_example_group)
+          existing_example_group = find(new_example_group.description)
+          return false unless existing_example_group
+          return true if new_example_group.equal?(existing_example_group)
+          return true if spec_path(new_example_group) == spec_path(existing_example_group)
           raise ArgumentError.new(&quot;Shared Example '#{existing_example_group.description}' already exists&quot;)
         end
 
         def spec_path(example_group)
-          File.expand_path(example_group.description[:spec_path])
+          File.expand_path(example_group.spec_path)
         end
       end
+
+      extend ClassMethods
       include ExampleGroupMethods
-      public :include
 
       def initialize(*args, &amp;example_group_block)
-        describe(*args)
-        module_eval(&amp;example_group_block)
+        set_description(*args)
+        @example_group_block = example_group_block
       end
 
       def included(mod) # :nodoc:
-        before_each_parts.each   { |p| mod.before_each_parts &lt;&lt; p }
-        after_each_parts.each    { |p| mod.after_each_parts &lt;&lt; p }
-        before_all_parts.each    { |p| mod.before_all_parts &lt;&lt; p }
-        after_all_parts.each     { |p| mod.after_all_parts &lt;&lt; p }
-        example_objects.each do |example|
-          mod.add_example example
-        end
+        mod.module_eval(&amp;@example_group_block)
       end
 
-      def register
-        Spec::Example::SharedExampleGroup.add_shared_example_group(self)
+      def each_ancestor_example_group_class(superclass_last=false)
+        yield self
       end
     end
   end</diff>
      <filename>vendor/plugins/rspec/lib/spec/example/shared_example_group.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,7 @@ require 'spec/matchers'
 require 'spec/expectations/errors'
 require 'spec/expectations/extensions'
 require 'spec/expectations/handler'
+require 'spec/expectations/wrap_expectation'
 
 module Spec
   
@@ -30,27 +31,31 @@ module Spec
   # RSpec ships with a standard set of useful matchers, and writing your own
   # matchers is quite simple. See Spec::Matchers for details.
   module Expectations
-    class &lt;&lt; self
-      attr_accessor :differ
+    def self.differ
+      @differ
+    end
+    
+    def self.differ=(differ)
+      @differ = differ
+    end
 
-      # raises a Spec::Expectations::ExpectationNotMetError with message
-      #
-      # When a differ has been assigned and fail_with is passed
-      # &lt;code&gt;expected&lt;/code&gt; and &lt;code&gt;target&lt;/code&gt;, passes them
-      # to the differ to append a diff message to the failure message.
-      def fail_with(message, expected=nil, target=nil) # :nodoc:
-        if Array === message &amp;&amp; message.length == 3
-          message, expected, target = message[0], message[1], message[2]
-        end
-        unless (differ.nil? || expected.nil? || target.nil?)
-          if expected.is_a?(String)
-            message &lt;&lt; &quot;\nDiff:&quot; &lt;&lt; self.differ.diff_as_string(target.to_s, expected)
-          elsif !target.is_a?(Proc)
-            message &lt;&lt; &quot;\nDiff:&quot; &lt;&lt; self.differ.diff_as_object(target, expected)
-          end
+    # raises a Spec::Expectations::ExpectationNotMetError with message
+    #
+    # When a differ has been assigned and fail_with is passed
+    # &lt;code&gt;expected&lt;/code&gt; and &lt;code&gt;target&lt;/code&gt;, passes them
+    # to the differ to append a diff message to the failure message.
+    def self.fail_with(message, expected=nil, target=nil) # :nodoc:
+      if Array === message &amp;&amp; message.length == 3
+        message, expected, target = message[0], message[1], message[2]
+      end
+      unless (differ.nil? || expected.nil? || target.nil?)
+        if expected.is_a?(String)
+          message &lt;&lt; &quot;\nDiff:&quot; &lt;&lt; self.differ.diff_as_string(target.to_s, expected)
+        elsif !target.is_a?(Proc)
+          message &lt;&lt; &quot;\nDiff:&quot; &lt;&lt; self.differ.diff_as_object(target, expected)
         end
-        Kernel::raise(Spec::Expectations::ExpectationNotMetError.new(message))
       end
+      Kernel::raise(Spec::Expectations::ExpectationNotMetError.new(message))
     end
   end
 end</diff>
      <filename>vendor/plugins/rspec/lib/spec/expectations.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,7 @@ module Spec
         end
 
         # This is snagged from diff/lcs/ldiff.rb (which is a commandline tool)
-        def diff_as_string(data_old, data_new)
+        def diff_as_string(data_new, data_old)
           data_old = data_old.split(/\n/).map! { |e| e.chomp }
           data_new = data_new.split(/\n/).map! { |e| e.chomp }
           output = &quot;&quot;</diff>
      <filename>vendor/plugins/rspec/lib/spec/expectations/differs/default.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,12 @@
 module Spec
   module Expectations
-    class ExpectationNotMetError &lt; StandardError
+    # If Test::Unit is loaed, we'll use its error as baseclass, so that Test::Unit
+    # will report unmet RSpec expectations as failures rather than errors.
+    superclass = ['Test::Unit::AssertionFailedError', '::StandardError'].map do |c|
+      eval(c) rescue nil
+    end.compact.first
+    
+    class ExpectationNotMetError &lt; superclass
     end
   end
 end</diff>
      <filename>vendor/plugins/rspec/lib/spec/expectations/errors.rb</filename>
    </modified>
    <modified>
      <diff>@@ -27,12 +27,8 @@ module Spec
       #
       # NOTE that this does NOT support receiver.should != expected.
       # Instead, use receiver.should_not == expected
-      def should(matcher = :default_parameter, &amp;block)
-        if :default_parameter == matcher
-          Spec::Matchers::PositiveOperatorMatcher.new(self)
-        else
-          ExpectationMatcherHandler.handle_matcher(self, matcher, &amp;block)
-        end
+      def should(matcher=nil, &amp;block)
+        ExpectationMatcherHandler.handle_matcher(self, matcher, &amp;block)
       end
 
       # :call-seq:
@@ -54,12 +50,8 @@ module Spec
       #     =&gt; Passes unless (receiver =~ regexp)
       #
       # See Spec::Matchers for more information about matchers
-      def should_not(matcher = :default_parameter, &amp;block)
-        if :default_parameter == matcher
-          Spec::Matchers::NegativeOperatorMatcher.new(self)
-        else
-          NegativeExpectationMatcherHandler.handle_matcher(self, matcher, &amp;block)
-        end
+      def should_not(matcher=nil, &amp;block)
+        NegativeExpectationMatcherHandler.handle_matcher(self, matcher, &amp;block)
       end
 
     end</diff>
      <filename>vendor/plugins/rspec/lib/spec/expectations/extensions/object.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,51 +2,46 @@ module Spec
   module Expectations
     class InvalidMatcherError &lt; ArgumentError; end        
     
-    module MatcherHandlerHelper
-      def describe_matcher(matcher)
-        matcher.respond_to?(:description) ? matcher.description : &quot;[#{matcher.class.name} does not provide a description]&quot;
-      end
-    end
-    
     class ExpectationMatcherHandler        
-      class &lt;&lt; self
-        include MatcherHandlerHelper
-        def handle_matcher(actual, matcher, &amp;block)
-          unless matcher.respond_to?(:matches?)
-            raise InvalidMatcherError, &quot;Expected a matcher, got #{matcher.inspect}.&quot;
-          end
-          
-          match = matcher.matches?(actual, &amp;block)
-          ::Spec::Matchers.generated_description = &quot;should #{describe_matcher(matcher)}&quot;
-          Spec::Expectations.fail_with(matcher.failure_message) unless match
+      def self.handle_matcher(actual, matcher, &amp;block)
+        ::Spec::Matchers.last_should = &quot;should&quot;
+        return Spec::Matchers::PositiveOperatorMatcher.new(actual) if matcher.nil?
+
+        unless matcher.respond_to?(:matches?)
+          raise InvalidMatcherError, &quot;Expected a matcher, got #{matcher.inspect}.&quot;
         end
+        
+        match = matcher.matches?(actual, &amp;block)
+        ::Spec::Matchers.last_matcher = matcher
+        Spec::Expectations.fail_with(matcher.failure_message) unless match
+        match
       end
     end
 
     class NegativeExpectationMatcherHandler
-      class &lt;&lt; self
-        include MatcherHandlerHelper
-        def handle_matcher(actual, matcher, &amp;block)
-          unless matcher.respond_to?(:matches?)
-            raise InvalidMatcherError, &quot;Expected a matcher, got #{matcher.inspect}.&quot;
-          end
+      def self.handle_matcher(actual, matcher, &amp;block)
+        ::Spec::Matchers.last_should = &quot;should not&quot;
+        return Spec::Matchers::NegativeOperatorMatcher.new(actual) if matcher.nil?
+        
+        unless matcher.respond_to?(:matches?)
+          raise InvalidMatcherError, &quot;Expected a matcher, got #{matcher.inspect}.&quot;
+        end
 
-          unless matcher.respond_to?(:negative_failure_message)
-            Spec::Expectations.fail_with(
+        unless matcher.respond_to?(:negative_failure_message)
+          Spec::Expectations.fail_with(
 &lt;&lt;-EOF
 Matcher does not support should_not.
 See Spec::Matchers for more information
 about matchers.
 EOF
 )
-          end
-          match = matcher.matches?(actual, &amp;block)
-          ::Spec::Matchers.generated_description = &quot;should not #{describe_matcher(matcher)}&quot;
-          Spec::Expectations.fail_with(matcher.negative_failure_message) if match
         end
+        match = matcher.matches?(actual, &amp;block)
+        ::Spec::Matchers.last_matcher = matcher
+        Spec::Expectations.fail_with(matcher.negative_failure_message) if match
+        match
       end
     end
-
   end
 end
 </diff>
      <filename>vendor/plugins/rspec/lib/spec/expectations/handler.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,15 @@
+require 'spec/matchers/operator_matcher'
+require 'spec/matchers/generated_descriptions'
+require 'spec/matchers/errors'
+require 'spec/matchers/method_missing'
 require 'spec/matchers/simple_matcher'
 require 'spec/matchers/be'
 require 'spec/matchers/be_close'
 require 'spec/matchers/change'
+require 'spec/matchers/match_array'
 require 'spec/matchers/eql'
 require 'spec/matchers/equal'
+require 'spec/matchers/exist'
 require 'spec/matchers/has'
 require 'spec/matchers/have'
 require 'spec/matchers/include'
@@ -12,7 +18,6 @@ require 'spec/matchers/raise_error'
 require 'spec/matchers/respond_to'
 require 'spec/matchers/satisfy'
 require 'spec/matchers/throw_symbol'
-require 'spec/matchers/operator_matcher'
 
 module Spec
 
@@ -131,23 +136,5 @@ module Spec
   #     config.include(CustomGameMatchers)
   #   end
   #
-  module Matchers
-    module ModuleMethods
-      attr_accessor :generated_description
-      def clear_generated_description
-        @generated_description = nil
-      end
-    end
-    extend ModuleMethods
-
-    def method_missing(sym, *args, &amp;block) # :nodoc:
-      return Matchers::Be.new(sym, *args) if sym.starts_with?(&quot;be_&quot;)
-      return Matchers::Has.new(sym, *args) if sym.starts_with?(&quot;have_&quot;)
-      super
-    end
-
-    class MatcherError &lt; StandardError
-    end
-    
-  end
+  module Matchers; end
 end</diff>
      <filename>vendor/plugins/rspec/lib/spec/matchers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,125 +3,115 @@ module Spec
     
     class Be #:nodoc:
       def initialize(*args)
-        @expected = parse_expected(args.shift)
+        @expected = args.empty? ? true : set_expected(args.shift)
         @args = args
-        @comparison = &quot;&quot;
       end
       
       def matches?(actual)
         @actual = actual
-        return true if match_or_compare unless handling_predicate?
-        if handling_predicate?
-          begin
-            return @result = actual.__send__(predicate, *@args)
-          rescue =&gt; predicate_error
-            # This clause should be empty, but rcov will not report it as covered
-            # unless something (anything) is executed within the clause
-            rcov_error_report = &quot;http://eigenclass.org/hiki.rb?rcov-0.8.0&quot;
-          end
+        handling_predicate? ? run_predicate_on(actual) : match_or_compare(actual)
+      end
+      
+      def run_predicate_on(actual)
+        begin
+          return @result = actual.__send__(predicate, *@args)
+        rescue NameError =&gt; predicate_missing_error
+          &quot;this needs to be here or rcov will not count this branch even though it's executed in a code example&quot;
+        end
 
-          # This supports should_exist &gt; target.exists? in the old world.
-          # We should consider deprecating that ability as in the new world
-          # you can't write &quot;should exist&quot; unless you have your own custom matcher.
-          begin
-            return @result = actual.__send__(present_tense_predicate, *@args)
-          rescue
-            raise predicate_error
-          end
+        begin
+          return @result = actual.__send__(present_tense_predicate, *@args)
+        rescue NameError
+          raise predicate_missing_error
         end
-        return false
       end
       
       def failure_message
-        return &quot;expected #{@comparison}#{expected}, got #{@actual.inspect}&quot; unless handling_predicate?
-        return &quot;expected #{predicate}#{args_to_s} to return true, got #{@result.inspect}&quot;
+        handling_predicate? ?
+          &quot;expected #{predicate}#{args_to_s} to return true, got #{@result.inspect}&quot; :
+          &quot;expected #{@comparison_method} #{expected}, got #{@actual.inspect}&quot;.gsub('  ',' ')
       end
       
       def negative_failure_message
-        return &quot;expected not #{expected}, got #{@actual.inspect}&quot; unless handling_predicate?
-        return &quot;expected #{predicate}#{args_to_s} to return false, got #{@result.inspect}&quot;
-      end
-      
-      def expected
-        return true if @expected == :true
-        return false if @expected == :false
-        return &quot;nil&quot; if @expected == :nil
-        return @expected.inspect
-      end
-      
-      def match_or_compare
-        return @actual == true if @expected == :true
-        return @actual == false if @expected == :false
-        return @actual.nil? if @expected == :nil
-        return @actual &lt; @expected if @less_than
-        return @actual &lt;= @expected if @less_than_or_equal
-        return @actual &gt;= @expected if @greater_than_or_equal
-        return @actual &gt; @expected if @greater_than
-        return @actual == @expected if @double_equal
-        return @actual === @expected if @triple_equal
-        return @actual.equal?(@expected)
+        if handling_predicate?
+          &quot;expected #{predicate}#{args_to_s} to return false, got #{@result.inspect}&quot;
+        else
+          message = &lt;&lt;-MESSAGE
+'should_not be #{@comparison_method} #{expected}' not only FAILED,
+it reads really poorly.
+          MESSAGE
+          
+          raise message &lt;&lt; ([:===,:==].include?(@comparison_method) ?
+            &quot;Why don't you try expressing it without the \&quot;be\&quot;?&quot; :
+            &quot;Why don't you try expressing it in the positive?&quot;)
+        end
       end
       
-      def ==(expected)
-        @double_equal = true
-        @comparison = &quot;== &quot;
-        @expected = expected
-        self
-      end
-
-      def ===(expected)
-        @triple_equal = true
-        @comparison = &quot;=== &quot;
-        @expected = expected
-        self
-      end
-
-      def &lt;(expected)
-        @less_than = true
-        @comparison = &quot;&lt; &quot;
-        @expected = expected
-        self
-      end
-
-      def &lt;=(expected)
-        @less_than_or_equal = true
-        @comparison = &quot;&lt;= &quot;
-        @expected = expected
-        self
+      def description
+        &quot;#{prefix_to_sentence}#{comparison} #{expected_to_sentence}#{args_to_sentence}&quot;.gsub(/\s+/,' ')
       end
 
-      def &gt;=(expected)
-        @greater_than_or_equal = true
-        @comparison = &quot;&gt;= &quot;
-        @expected = expected
-        self
+      [:==, :&lt;, :&lt;=, :&gt;=, :&gt;, :===].each do |method|
+        define_method method do |expected|
+          compare_to(expected, :using =&gt; method)
+          self
+        end
       end
 
-      def &gt;(expected)
-        @greater_than = true
-        @comparison = &quot;&gt; &quot;
-        @expected = expected
-        self
-      end
+      private
+        def match_or_compare(actual)
+          case @expected
+          when TrueClass
+            @actual
+          else
+            @actual.__send__(comparison_method, @expected)
+          end
+        end
       
-      def description
-        &quot;#{prefix_to_sentence}#{comparison}#{expected_to_sentence}#{args_to_sentence}&quot;
-      end
+        def comparison_method
+          @comparison_method || :equal?
+        end
+      
+        def expected
+          @expected
+        end
 
-      private
+        def compare_to(expected, opts)
+          @expected, @comparison_method = expected, opts[:using]
+        end
+
+        def set_expected(expected)
+          Symbol === expected ? parse_expected(expected) : expected
+        end
+        
         def parse_expected(expected)
-          if Symbol === expected
-            @handling_predicate = true
-            [&quot;be_an_&quot;,&quot;be_a_&quot;,&quot;be_&quot;].each do |@prefix|
-              return &quot;#{expected.to_s.sub(@prefix,&quot;&quot;)}&quot;.to_sym if expected.starts_with?(@prefix)
+          [&quot;be_an_&quot;,&quot;be_a_&quot;,&quot;be_&quot;].each do |prefix|
+            handling_predicate!
+            if expected.starts_with?(prefix)
+              set_prefix(prefix)
+              expected = expected.to_s.sub(prefix,&quot;&quot;)
+              [true, false, nil].each do |val|
+                return val if val.to_s == expected
+              end
+              return expected.to_sym
             end
           end
-          @prefix = &quot;be &quot;
-          return expected
+        end
+        
+        def set_prefix(prefix)
+          @prefix = prefix
+        end
+        
+        def prefix
+          @prefix
+        end
+
+        def handling_predicate!
+          @handling_predicate = true
         end
         
         def handling_predicate?
-          return false if [:true, :false, :nil].include?(@expected)
+          return false if [true, false, nil].include?(expected)
           return @handling_predicate
         end
 
@@ -134,21 +124,27 @@ module Spec
         end
         
         def args_to_s
-          return &quot;&quot; if @args.empty?
-          inspected_args = @args.collect{|a| a.inspect}
-          return &quot;(#{inspected_args.join(', ')})&quot;
+          @args.empty? ? &quot;&quot; : parenthesize(inspected_args.join(', '))
+        end
+        
+        def parenthesize(string)
+          return &quot;(#{string})&quot;
+        end
+        
+        def inspected_args
+          @args.collect{|a| a.inspect}
         end
         
         def comparison
-          @comparison
+          @comparison_method.nil? ? &quot; &quot; : &quot;be #{@comparison_method.to_s} &quot;
         end
         
         def expected_to_sentence
-          split_words(@expected)
+          split_words(expected)
         end
         
         def prefix_to_sentence
-          split_words(@prefix)
+          split_words(prefix)
         end
 
         def split_words(sym)
@@ -176,8 +172,9 @@ module Spec
     #   should_not be_nil
     #   should_not be_arbitrary_predicate(*args)
     #
-    # Given true, false, or nil, will pass if actual is
-    # true, false or nil (respectively).
+    # Given true, false, or nil, will pass if actual value is
+    # true, false or nil (respectively). Given no args means
+    # the caller should satisfy an if condition (to be or not to be). 
     #
     # Predicates are any Ruby method that ends in a &quot;?&quot; and returns true or false.
     # Given be_ followed by arbitrary_predicate (without the &quot;?&quot;), RSpec will match</diff>
      <filename>vendor/plugins/rspec/lib/spec/matchers/be.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,26 +1,6 @@
 module Spec
   module Matchers
 
-    class BeClose #:nodoc:
-      def initialize(expected, delta)
-        @expected = expected
-        @delta = delta
-      end
-      
-      def matches?(actual)
-        @actual = actual
-        (@actual - @expected).abs &lt; @delta
-      end
-      
-      def failure_message
-        &quot;expected #{@expected} +/- (&lt; #{@delta}), got #{@actual}&quot;
-      end
-      
-      def description
-        &quot;be close to #{@expected} (within +- #{@delta})&quot;
-      end
-    end
-    
     # :call-seq:
     #   should be_close(expected, delta)
     #   should_not be_close(expected, delta)
@@ -31,7 +11,11 @@ module Spec
     #
     #   result.should be_close(3.0, 0.5)
     def be_close(expected, delta)
-      Matchers::BeClose.new(expected, delta)
+      simple_matcher do |actual, matcher|
+        matcher.failure_message = &quot;expected #{expected} +/- (&lt; #{delta}), got #{actual}&quot;
+        matcher.description = &quot;be close to #{expected} (within +- #{delta})&quot;
+        (actual - expected).abs &lt; delta
+      end
     end
   end
 end</diff>
      <filename>vendor/plugins/rspec/lib/spec/matchers/be_close.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,60 +4,60 @@ module Spec
     #Based on patch from Wilson Bilkovich
     class Change #:nodoc:
       def initialize(receiver=nil, message=nil, &amp;block)
-        @receiver = receiver
-        @message = message
-        @block = block
+        @message = message || &quot;result&quot;
+        @value_proc = block || lambda {
+          receiver.__send__(message)
+        }
       end
       
-      def matches?(target, &amp;block)
-        if block
-          raise MatcherError.new(&lt;&lt;-EOF
-block passed to should or should_not change must use {} instead of do/end
-EOF
-)
-        end
-        @target = target
-        execute_change
-        return false if @from &amp;&amp; (@from != @before)
-        return false if @to &amp;&amp; (@to != @after)
+      def matches?(event_proc)
+        raise_block_syntax_error if block_given?
+        
+        @before = evaluate_value_proc
+        event_proc.call
+        @after = evaluate_value_proc
+        
+        return false if @from unless @from == @before
+        return false if @to unless @to == @after
         return (@before + @amount == @after) if @amount
         return ((@after - @before) &gt;= @minimum) if @minimum
         return ((@after - @before) &lt;= @maximum) if @maximum        
         return @before != @after
       end
       
-      def execute_change
-        @before = @block.nil? ? @receiver.send(@message) : @block.call
-        @target.call
-        @after = @block.nil? ? @receiver.send(@message) : @block.call
+      def raise_block_syntax_error
+        raise MatcherError.new(&lt;&lt;-MESSAGE
+block passed to should or should_not change must use {} instead of do/end
+MESSAGE
+        )
+      end
+      
+      def evaluate_value_proc
+        @value_proc.call
       end
       
       def failure_message
         if @to
-          &quot;#{result} should have been changed to #{@to.inspect}, but is now #{@after.inspect}&quot;
+          &quot;#{@message} should have been changed to #{@to.inspect}, but is now #{@after.inspect}&quot;
         elsif @from
-          &quot;#{result} should have initially been #{@from.inspect}, but was #{@before.inspect}&quot;
+          &quot;#{@message} should have initially been #{@from.inspect}, but was #{@before.inspect}&quot;
         elsif @amount
-          &quot;#{result} should have been changed by #{@amount.inspect}, but was changed by #{actual_delta.inspect}&quot;
+          &quot;#{@message} should have been changed by #{@amount.inspect}, but was changed by #{actual_delta.inspect}&quot;
         elsif @minimum
-          &quot;#{result} should have been changed by at least #{@minimum.inspect}, but was changed by #{actual_delta.inspect}&quot;
+          &quot;#{@message} should have been changed by at least #{@minimum.inspect}, but was changed by #{actual_delta.inspect}&quot;
         elsif @maximum
-          &quot;#{result} should have been changed by at most #{@maximum.inspect}, but was changed by #{actual_delta.inspect}&quot;
+          &quot;#{@message} should have been changed by at most #{@maximum.inspect}, but was changed by #{actual_delta.inspect}&quot;
         else
-          &quot;#{result} should have changed, but is still #{@before.inspect}&quot;
+          &quot;#{@message} should have changed, but is still #{@before.inspect}&quot;
         end
       end
       
-      def result
-        @message || &quot;result&quot;
-      end
-      
       def actual_delta
         @after - @before
       end
       
       def negative_failure_message
-        &quot;#{result} should not have changed, but did change from #{@before.inspect} to #{@after.inspect}&quot;
+        &quot;#{@message} should not have changed, but did change from #{@before.inspect} to #{@after.inspect}&quot;
       end
       
       def by(amount)
@@ -114,7 +114,7 @@ EOF
     #
     #   string = &quot;string&quot;
     #   lambda {
-    #     string.reverse
+    #     string.reverse!
     #   }.should change { string }.from(&quot;string&quot;).to(&quot;gnirts&quot;)
     #
     #   lambda {
@@ -125,20 +125,24 @@ EOF
     #     employee.develop_great_new_social_networking_app
     #   }.should change(employee, :title).from(&quot;Mail Clerk&quot;).to(&quot;CEO&quot;)
     #
-    # Evaluates +receiver.message+ or +block+ before and
-    # after it evaluates the c object (generated by the lambdas in the examples above).
+    # Evaluates &lt;tt&gt;receiver.message&lt;/tt&gt; or &lt;tt&gt;block&lt;/tt&gt; before and after
+    # it evaluates the c object (generated by the lambdas in the examples
+    # above).
+    #
+    # Then compares the values before and after the &lt;tt&gt;receiver.message&lt;/tt&gt;
+    # and evaluates the difference compared to the expected difference.
     #
-    # Then compares the values before and after the +receiver.message+ and
-    # evaluates the difference compared to the expected difference.
+    # == WARNING
+    # &lt;tt&gt;should_not change&lt;/tt&gt; only supports the form with no
+    # subsequent calls to &lt;tt&gt;by&lt;/tt&gt;, &lt;tt&gt;by_at_least&lt;/tt&gt;,
+    # &lt;tt&gt;by_at_most&lt;/tt&gt;, &lt;tt&gt;to&lt;/tt&gt; or &lt;tt&gt;from&lt;/tt&gt;.
     #
-    # == Warning
-    # +should_not+ +change+ only supports the form with no subsequent calls to
-    # +by+, +by_at_least+, +by_at_most+, +to+ or +from+.
+    # blocks passed to &lt;tt&gt;should&lt;/tt&gt; &lt;tt&gt;change&lt;/tt&gt; and &lt;tt&gt;should_not&lt;/tt&gt;
+    # &lt;tt&gt;change&lt;/tt&gt; must use the &lt;tt&gt;{}&lt;/tt&gt; form (&lt;tt&gt;do/end&lt;/tt&gt; is not
+    # supported).
     #
-    # blocks passed to +should+ +change+ and +should_not+ +change+
-    # must use the &lt;tt&gt;{}&lt;/tt&gt; form (&lt;tt&gt;do/end&lt;/tt&gt; is not supported)
-    def change(target=nil, message=nil, &amp;block)
-      Matchers::Change.new(target, message, &amp;block)
+    def change(receiver=nil, message=nil, &amp;block)
+      Matchers::Change.new(receiver, message, &amp;block)
     end
   end
 end</diff>
      <filename>vendor/plugins/rspec/lib/spec/matchers/change.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,29 +1,6 @@
 module Spec
   module Matchers
   
-    class Eql #:nodoc:
-      def initialize(expected)
-        @expected = expected
-      end
-  
-      def matches?(actual)
-        @actual = actual
-        @actual.eql?(@expected)
-      end
-
-      def failure_message
-        return &quot;expected #{@expected.inspect}, got #{@actual.inspect} (using .eql?)&quot;, @expected, @actual
-      end
-      
-      def negative_failure_message
-        return &quot;expected #{@actual.inspect} not to equal #{@expected.inspect} (using .eql?)&quot;, @expected, @actual
-      end
-
-      def description
-        &quot;eql #{@expected.inspect}&quot;
-      end
-    end
-    
     # :call-seq:
     #   should eql(expected)
     #   should_not eql(expected)
@@ -37,7 +14,12 @@ module Spec
     #   5.should eql(5)
     #   5.should_not eql(3)
     def eql(expected)
-      Matchers::Eql.new(expected)
+      simple_matcher do |actual, matcher|
+        matcher.failure_message          = &quot;expected #{expected.inspect}, got #{actual.inspect} (using .eql?)&quot;, expected, actual
+        matcher.negative_failure_message = &quot;expected #{actual.inspect} not to equal #{expected.inspect} (using .eql?)&quot;, expected, actual
+        matcher.description              = &quot;eql #{expected.inspect}&quot;
+        actual.eql?(expected)
+      end
     end
   end
 end</diff>
      <filename>vendor/plugins/rspec/lib/spec/matchers/eql.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,34 +1,11 @@
 module Spec
   module Matchers
   
-    class Equal #:nodoc:
-      def initialize(expected)
-        @expected = expected
-      end
-  
-      def matches?(actual)
-        @actual = actual
-        @actual.equal?(@expected)
-      end
-
-      def failure_message
-        return &quot;expected #{@expected.inspect}, got #{@actual.inspect} (using .equal?)&quot;, @expected, @actual
-      end
-
-      def negative_failure_message
-        return &quot;expected #{@actual.inspect} not to equal #{@expected.inspect} (using .equal?)&quot;, @expected, @actual
-      end
-      
-      def description
-        &quot;equal #{@expected.inspect}&quot;
-      end
-    end
-    
     # :call-seq:
     #   should equal(expected)
     #   should_not equal(expected)
     #
-    # Passes if actual and expected are the same object (object identity).
+    # Passes if given and expected are the same object (object identity).
     #
     # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more information about equality in Ruby.
     #
@@ -37,7 +14,12 @@ module Spec
     #   5.should equal(5) #Fixnums are equal
     #   &quot;5&quot;.should_not equal(&quot;5&quot;) #Strings that look the same are not the same object
     def equal(expected)
-      Matchers::Equal.new(expected)
+      simple_matcher do |actual, matcher|
+        matcher.failure_message          = &quot;expected #{expected.inspect}, got #{actual.inspect} (using .equal?)&quot;, expected, actual
+        matcher.negative_failure_message = &quot;expected #{actual.inspect} not to equal #{expected.inspect} (using .equal?)&quot;, expected, actual
+        matcher.description              = &quot;equal #{expected.inspect}&quot;
+        actual.equal?(expected)
+      end
     end
   end
 end</diff>
      <filename>vendor/plugins/rspec/lib/spec/matchers/equal.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,44 +1,18 @@
 module Spec
   module Matchers
-    
-    class Has #:nodoc:
-      def initialize(sym, *args)
-        @sym = sym
-        @args = args
-      end
-      
-      def matches?(target)
-        @target = target
-        begin
-          return target.send(predicate, *@args)
-        rescue =&gt; @error
-          # This clause should be empty, but rcov will not report it as covered
-          # unless something (anything) is executed within the clause
-          rcov_error_report = &quot;http://eigenclass.org/hiki.rb?rcov-0.8.0&quot;
-        end
-        return false
-      end
-      
-      def failure_message
-        raise @error if @error
-        &quot;expected ##{predicate}(#{@args[0].inspect}) to return true, got false&quot;
-      end
-      
-      def negative_failure_message
-        raise @error if @error
-        &quot;expected ##{predicate}(#{@args[0].inspect}) to return false, got true&quot;
+    def has(sym, *args) # :nodoc:
+      simple_matcher do |actual, matcher|
+        matcher.failure_message          = &quot;expected ##{predicate(sym)}(#{args[0].inspect}) to return true, got false&quot;
+        matcher.negative_failure_message = &quot;expected ##{predicate(sym)}(#{args[0].inspect}) to return false, got true&quot;
+        matcher.description              = &quot;have key #{args[0].inspect}&quot;
+        actual.__send__(predicate(sym), *args)
       end
-      
-      def description
-        &quot;have key #{@args[0].inspect}&quot;
-      end
-      
-      private
-        def predicate
-          &quot;#{@sym.to_s.sub(&quot;have_&quot;,&quot;has_&quot;)}?&quot;.to_sym
-        end
-        
     end
- 
+    
+  private
+    def predicate(sym)
+      &quot;#{sym.to_s.sub(&quot;have_&quot;,&quot;has_&quot;)}?&quot;.to_sym
+    end
+
   end
 end</diff>
      <filename>vendor/plugins/rspec/lib/spec/matchers/has.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,5 @@
 module Spec
   module Matchers
-    
     class Have #:nodoc:
       def initialize(expected, relativity=:exactly)
         @expected = (expected == :no ? 0 : expected)
@@ -15,27 +14,22 @@ module Spec
         }
       end
     
-      def method_missing(sym, *args, &amp;block)
-        @collection_name = sym
-        @args = args
-        @block = block
-        self
-      end
-    
       def matches?(collection_owner)
         if collection_owner.respond_to?(@collection_name)
-          collection = collection_owner.send(@collection_name, *@args, &amp;@block)
+          collection = collection_owner.__send__(@collection_name, *@args, &amp;@block)
+        elsif (@plural_collection_name &amp;&amp; collection_owner.respond_to?(@plural_collection_name))
+          collection = collection_owner.__send__(@plural_collection_name, *@args, &amp;@block)
         elsif (collection_owner.respond_to?(:length) || collection_owner.respond_to?(:size))
           collection = collection_owner
         else
-          collection_owner.send(@collection_name, *@args, &amp;@block)
+          collection_owner.__send__(@collection_name, *@args, &amp;@block)
         end
-        @actual = collection.size if collection.respond_to?(:size)
-        @actual = collection.length if collection.respond_to?(:length)
-        raise not_a_collection if @actual.nil?
-        return @actual &gt;= @expected if @relativity == :at_least
-        return @actual &lt;= @expected if @relativity == :at_most
-        return @actual == @expected
+        @given = collection.size if collection.respond_to?(:size)
+        @given = collection.length if collection.respond_to?(:length)
+        raise not_a_collection if @given.nil?
+        return @given &gt;= @expected if @relativity == :at_least
+        return @given &lt;= @expected if @relativity == :at_most
+        return @given == @expected
       end
       
       def not_a_collection
@@ -43,12 +37,12 @@ module Spec
       end
     
       def failure_message
-        &quot;expected #{relative_expectation} #{@collection_name}, got #{@actual}&quot;
+        &quot;expected #{relative_expectation} #{@collection_name}, got #{@given}&quot;
       end
 
       def negative_failure_message
         if @relativity == :exactly
-          return &quot;expected target not to have #{@expected} #{@collection_name}, got #{@actual}&quot;
+          return &quot;expected target not to have #{@expected} #{@collection_name}, got #{@given}&quot;
         elsif @relativity == :at_most
           return &lt;&lt;-EOF
 Isn't life confusing enough?
@@ -72,8 +66,22 @@ EOF
         &quot;have #{relative_expectation} #{@collection_name}&quot;
       end
       
+      def respond_to?(sym)
+        @expected.respond_to?(sym) || super
+      end
+    
       private
       
+      def method_missing(sym, *args, &amp;block)
+        @collection_name = sym
+        if inflector = (defined?(ActiveSupport::Inflector) ? ActiveSupport::Inflector : (defined?(Inflector) ? Inflector : nil))
+          @plural_collection_name = inflector.pluralize(sym.to_s)
+        end
+        @args = args
+        @block = block
+        self
+      end
+      
       def relative_expectation
         &quot;#{relativities[@relativity]}#{@expected}&quot;
       end</diff>
      <filename>vendor/plugins/rspec/lib/spec/matchers/have.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,17 @@ module Spec
       def matches?(actual)
         @actual = actual
         @expecteds.each do |expected|
-          return false unless actual.include?(expected)
+          if actual.is_a?(Hash)
+            if expected.is_a?(Hash)
+              expected.each_pair do |k,v|
+                return false unless actual[k] == v
+              end
+            else
+              return false unless actual.has_key?(expected)
+            end
+          else
+            return false unless actual.include?(expected)
+          end
         end
         true
       end</diff>
      <filename>vendor/plugins/rspec/lib/spec/matchers/include.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,30 +1,6 @@
 module Spec
   module Matchers
     
-    class Match #:nodoc:
-      def initialize(expected)
-        @expected = expected
-      end
-      
-      def matches?(actual)
-        @actual = actual
-        return true if actual =~ @expected
-        return false
-      end
-      
-      def failure_message
-        return &quot;expected #{@actual.inspect} to match #{@expected.inspect}&quot;, @expected, @actual
-      end
-      
-      def negative_failure_message
-        return &quot;expected #{@actual.inspect} not to match #{@expected.inspect}&quot;, @expected, @actual
-      end
-      
-      def description
-        &quot;match #{@expected.inspect}&quot;
-      end
-    end
-    
     # :call-seq:
     #   should match(regexp)
     #   should_not match(regexp)
@@ -33,9 +9,14 @@ module Spec
     #
     # == Examples
     #
-    #   email.should match(/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i)
+    #   email.should match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i)
     def match(regexp)
-      Matchers::Match.new(regexp)
+      simple_matcher do |actual, matcher|
+        matcher.failure_message          = &quot;expected #{actual.inspect} to match #{regexp.inspect}&quot;, regexp, actual
+        matcher.negative_failure_message = &quot;expected #{actual.inspect} not to match #{regexp.inspect}&quot;, regexp, actual
+        matcher.description              = &quot;match #{regexp.inspect}&quot;
+        actual =~ regexp
+      end
     end
   end
 end</diff>
      <filename>vendor/plugins/rspec/lib/spec/matchers/match.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,70 +1,73 @@
 module Spec
   module Matchers
-    class BaseOperatorMatcher
-      attr_reader :generated_description
-      
-      def initialize(target)
-        @target = target
-      end
 
-      def ==(expected)
-        @expected = expected
-        __delegate_method_missing_to_target(&quot;==&quot;, expected)
-      end
+    class OperatorMatcher
+      @operator_registry = {}
 
-      def ===(expected)
-        @expected = expected
-        __delegate_method_missing_to_target(&quot;===&quot;, expected)
+      def self.register(klass, operator, matcher)
+        @operator_registry[klass] ||= {}
+        @operator_registry[klass][operator] = matcher
       end
 
-      def =~(expected)
-        @expected = expected
-        __delegate_method_missing_to_target(&quot;=~&quot;, expected)
+      def self.get(klass, operator)
+        return @operator_registry[klass][operator] if @operator_registry[klass]
+        nil
       end
 
-      def &gt;(expected)
-        @expected = expected
-        __delegate_method_missing_to_target(&quot;&gt;&quot;, expected)
+      def initialize(actual)
+        @actual = actual
       end
 
-      def &gt;=(expected)
-        @expected = expected
-        __delegate_method_missing_to_target(&quot;&gt;=&quot;, expected)
+      def self.use_custom_matcher_or_delegate(operator)
+        define_method(operator) do |expected|
+          if matcher = OperatorMatcher.get(@actual.class, operator)
+            return @actual.send(matcher_method, matcher.new(expected))
+          else
+            ::Spec::Matchers.last_matcher = self
+            @operator, @expected = operator, expected
+            __delegate_operator(@actual, operator, expected)
+          end
+        end
       end
 
-      def &lt;(expected)
-        @expected = expected
-        __delegate_method_missing_to_target(&quot;&lt;&quot;, expected)
+      ['==', '===', '=~', '&gt;', '&gt;=', '&lt;', '&lt;='].each do |operator|
+        use_custom_matcher_or_delegate operator
       end
 
-      def &lt;=(expected)
-        @expected = expected
-        __delegate_method_missing_to_target(&quot;&lt;=&quot;, expected)
+      def fail_with_message(message)
+        Spec::Expectations.fail_with(message, @expected, @actual)
       end
 
-      def fail_with_message(message)
-        Spec::Expectations.fail_with(message, @expected, @target)
+      def description
+        &quot;#{@operator} #{@expected.inspect}&quot;
       end
 
     end
 
-    class PositiveOperatorMatcher &lt; BaseOperatorMatcher #:nodoc:
+    class PositiveOperatorMatcher &lt; OperatorMatcher #:nodoc:
+      def matcher_method
+        :should
+      end
 
-      def __delegate_method_missing_to_target(operator, expected)
-        ::Spec::Matchers.generated_description = &quot;should #{operator} #{expected.inspect}&quot;
-        return if @target.send(operator, expected)
-        return fail_with_message(&quot;expected: #{expected.inspect},\n     got: #{@target.inspect} (using #{operator})&quot;) if ['==','===', '=~'].include?(operator)
-        return fail_with_message(&quot;expected: #{operator} #{expected.inspect},\n     got: #{operator.gsub(/./, ' ')} #{@target.inspect}&quot;)
+      def __delegate_operator(actual, operator, expected)
+        return true if actual.__send__(operator, expected)
+        if ['==','===', '=~'].include?(operator)
+          fail_with_message(&quot;expected: #{expected.inspect},\n     got: #{actual.inspect} (using #{operator})&quot;) 
+        else
+          fail_with_message(&quot;expected: #{operator} #{expected.inspect},\n     got: #{operator.gsub(/./, ' ')} #{actual.inspect}&quot;)
+        end
       end
 
     end
 
-    class NegativeOperatorMatcher &lt; BaseOperatorMatcher #:nodoc:
+    class NegativeOperatorMatcher &lt; OperatorMatcher #:nodoc:
+      def matcher_method
+        :should_not
+      end
 
-      def __delegate_method_missing_to_target(operator, expected)
-        ::Spec::Matchers.generated_description = &quot;should not #{operator} #{expected.inspect}&quot;
-        return unless @target.send(operator, expected)
-        return fail_with_message(&quot;expected not: #{operator} #{expected.inspect},\n         got: #{operator.gsub(/./, ' ')} #{@target.inspect}&quot;)
+      def __delegate_operator(actual, operator, expected)
+        return true unless actual.__send__(operator, expected)
+        return fail_with_message(&quot;expected not: #{operator} #{expected.inspect},\n         got: #{operator.gsub(/./, ' ')} #{actual.inspect}&quot;)
       end
 
     end</diff>
      <filename>vendor/plugins/rspec/lib/spec/matchers/operator_matcher.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,54 +1,66 @@
 module Spec
   module Matchers
-    
     class RaiseError #:nodoc:
-      def initialize(error_or_message=Exception, message=nil)
-        if String === error_or_message
-          @expected_error = Exception
-          @expected_message = error_or_message
+      def initialize(expected_error_or_message=Exception, expected_message=nil, &amp;block)
+        @block = block
+        case expected_error_or_message
+        when String, Regexp
+          @expected_error, @expected_message = Exception, expected_error_or_message
         else
-          @expected_error = error_or_message
-          @expected_message = message
+          @expected_error, @expected_message = expected_error_or_message, expected_message
         end
       end
-      
-      def matches?(proc)
+
+      def matches?(given_proc)
         @raised_expected_error = false
-        @raised_other = false
+        @with_expected_message = false
+        @eval_block = false
+        @eval_block_passed = false
         begin
-          proc.call
-        rescue @expected_error =&gt; @actual_error
-          if @expected_message.nil?
-            @raised_expected_error = true
-          else
-            case @expected_message
-            when Regexp
-              if @expected_message =~ @actual_error.message
-                @raised_expected_error = true
-              else
-                @raised_other = true
-              end
-            else
-              if @expected_message == @actual_error.message
-                @raised_expected_error = true
-              else
-                @raised_other = true
-              end
-            end
-          end
-        rescue =&gt; @actual_error
-          @raised_other = true
-        ensure
-          return @raised_expected_error
+          given_proc.call
+        rescue @expected_error =&gt; @given_error
+          @raised_expected_error = true
+          @with_expected_message = verify_message
+        rescue Exception =&gt; @given_error
+          # This clause should be empty, but rcov will not report it as covered
+          # unless something (anything) is executed within the clause
+          rcov_error_report = &quot;http://eigenclass.org/hiki.rb?rcov-0.8.0&quot;
+        end
+
+        unless negative_expectation?
+          eval_block if @raised_expected_error &amp;&amp; @with_expected_message &amp;&amp; @block
+        end
+      ensure
+        return (@raised_expected_error &amp;&amp; @with_expected_message) ? (@eval_block ? @eval_block_passed : true) : false
+      end
+      
+      def eval_block
+        @eval_block = true
+        begin
+          @block[@given_error]
+          @eval_block_passed = true
+        rescue Exception =&gt; err
+          @given_error = err
+        end
+      end
+
+      def verify_message
+        case @expected_message
+        when nil
+          true
+        when Regexp
+          @expected_message =~ @given_error.message
+        else
+          @expected_message == @given_error.message
         end
       end
       
       def failure_message
-        return &quot;expected #{expected_error}#{actual_error}&quot; if @raised_other || !@raised_expected_error
+        @eval_block ? @given_error.message : &quot;expected #{expected_error}#{given_error}&quot;
       end
 
       def negative_failure_message
-        &quot;expected no #{expected_error}#{actual_error}&quot;
+        &quot;expected no #{expected_error}#{given_error}&quot;
       end
       
       def description
@@ -67,8 +79,13 @@ module Spec
           end
         end
 
-        def actual_error
-          @actual_error.nil? ? &quot; but nothing was raised&quot; : &quot;, got #{@actual_error.inspect}&quot;
+        def given_error
+          @given_error.nil? ? &quot; but nothing was raised&quot; : &quot;, got #{@given_error.inspect}&quot;
+        end
+        
+        def negative_expectation?
+          # YES - I'm a bad person... help me find a better way - ryand
+          caller.first(3).find { |s| s =~ /should_not/ }
         end
     end
     
@@ -77,6 +94,10 @@ module Spec
     #   should raise_error(NamedError)
     #   should raise_error(NamedError, String)
     #   should raise_error(NamedError, Regexp)
+    #   should raise_error() { |error| ... }
+    #   should raise_error(NamedError) { |error| ... }
+    #   should raise_error(NamedError, String) { |error| ... }
+    #   should raise_error(NamedError, Regexp) { |error| ... }
     #   should_not raise_error()
     #   should_not raise_error(NamedError)
     #   should_not raise_error(NamedError, String)
@@ -86,11 +107,13 @@ module Spec
     # With a named error, matches only if that specific error is raised.
     # With a named error and messsage specified as a String, matches only if both match.
     # With a named error and messsage specified as a Regexp, matches only if both match.
+    # Pass an optional block to perform extra verifications on the exception matched
     #
     # == Examples
     #
     #   lambda { do_something_risky }.should raise_error
     #   lambda { do_something_risky }.should raise_error(PoorRiskDecisionError)
+    #   lambda { do_something_risky }.should raise_error(PoorRiskDecisionError) { |error| error.data.should == 42 }
     #   lambda { do_something_risky }.should raise_error(PoorRiskDecisionError, &quot;that was too risky&quot;)
     #   lambda { do_something_risky }.should raise_error(PoorRiskDecisionError, /oo ri/)
     #
@@ -98,8 +121,8 @@ module Spec
     #   lambda { do_something_risky }.should_not raise_error(PoorRiskDecisionError)
     #   lambda { do_something_risky }.should_not raise_error(PoorRiskDecisionError, &quot;that was too risky&quot;)
     #   lambda { do_something_risky }.should_not raise_error(PoorRiskDecisionError, /oo ri/)
-    def raise_error(error=Exception, message=nil)
-      Matchers::RaiseError.new(error, message)
+    def raise_error(error=Exception, message=nil, &amp;block)
+      Matchers::RaiseError.new(error, message, &amp;block)
     end
   end
 end</diff>
      <filename>vendor/plugins/rspec/lib/spec/matchers/raise_error.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,9 +7,10 @@ module Spec
         @names_not_responded_to = []
       end
       
-      def matches?(target)
+      def matches?(given)
+        @given = given
         @names.each do |name|
-          unless target.respond_to?(name)
+          unless given.respond_to?(name)
             @names_not_responded_to &lt;&lt; name
           end
         end
@@ -17,15 +18,16 @@ module Spec
       end
       
       def failure_message
-        &quot;expected target to respond to #{@names_not_responded_to.collect {|name| name.inspect }.join(', ')}&quot;
+        &quot;expected #{@given.inspect} to respond to #{@names_not_responded_to.collect {|name| name.inspect }.join(', ')}&quot;
       end
       
       def negative_failure_message
-        &quot;expected target not to respond to #{@names.collect {|name| name.inspect }.join(', ')}&quot;
+        &quot;expected #{@given.inspect} not to respond to #{@names.collect {|name| name.inspect }.join(', ')}&quot;
       end
       
       def description
-        &quot;respond to ##{@names.to_s}&quot;
+        # Ruby 1.9 returns the same thing for array.to_s as array.inspect, so just use array.inspect here
+        &quot;respond to #{@names.inspect}&quot;
       end
     end
     </diff>
      <filename>vendor/plugins/rspec/lib/spec/matchers/respond_to.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,18 +6,18 @@ module Spec
         @block = block
       end
       
-      def matches?(actual, &amp;block)
+      def matches?(given, &amp;block)
         @block = block if block
-        @actual = actual
-        @block.call(actual)
+        @given = given
+        @block.call(given)
       end
       
       def failure_message
-        &quot;expected #{@actual} to satisfy block&quot;
+        &quot;expected #{@given} to satisfy block&quot;
       end
 
       def negative_failure_message
-        &quot;expected #{@actual} not to satisfy block&quot;
+        &quot;expected #{@given} not to satisfy block&quot;
       end
     end
     </diff>
      <filename>vendor/plugins/rspec/lib/spec/matchers/satisfy.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,29 +1,132 @@
 module Spec
   module Matchers
     class SimpleMatcher
-      attr_reader :description
+      attr_writer :failure_message, :negative_failure_message, :description
       
       def initialize(description, &amp;match_block)
         @description = description
         @match_block = match_block
       end
 
-      def matches?(actual)
-        @actual = actual
-        return @match_block.call(@actual)
+      def matches?(given)
+        @given = given
+        case @match_block.arity
+        when 2
+          @match_block.call(@given, self)
+        else
+          @match_block.call(@given)
+        end
+      end
+      
+      def description
+        @description || explanation
       end
 
-      def failure_message()
-        return %[expected #{@description.inspect} but got #{@actual.inspect}]
+      def failure_message
+        @failure_message || (@description.nil? ? explanation : %[expected #{@description.inspect} but got #{@given.inspect}])
       end
-        
-      def negative_failure_message()
-        return %[expected not to get #{@description.inspect}, but got #{@actual.inspect}]
+
+      def negative_failure_message
+        @negative_failure_message || (@description.nil? ? explanation : %[expected not to get #{@description.inspect}, but got #{@given.inspect}])
+      end
+
+      def explanation
+        &quot;No description provided. See RDoc for simple_matcher()&quot;
       end
     end
-    
-    def simple_matcher(message, &amp;match_block)
-      SimpleMatcher.new(message, &amp;match_block)
+  
+    # simple_matcher makes it easy for you to create your own custom matchers
+    # in just a few lines of code when you don't need all the power of a
+    # completely custom matcher object.
+    #
+    # The &lt;tt&gt;description&lt;/tt&gt; argument will appear as part of any failure
+    # message, and is also the source for auto-generated descriptions.
+    #
+    # The &lt;tt&gt;match_block&lt;/tt&gt; can have an arity of 1 or 2. The first block
+    # argument will be the given value. The second, if the block accepts it
+    # will be the matcher itself, giving you access to set custom failure
+    # messages in favor of the defaults.
+    #
+    # The &lt;tt&gt;match_block&lt;/tt&gt; should return a boolean: &lt;tt&gt;true&lt;/tt&gt;
+    # indicates a match, which will pass if you use &lt;tt&gt;should&lt;/tt&gt; and fail
+    # if you use &lt;tt&gt;should_not&lt;/tt&gt;. false (or nil) indicates no match,
+    # which will do the reverse: fail if you use &lt;tt&gt;should&lt;/tt&gt; and pass if
+    # you use &lt;tt&gt;should_not&lt;/tt&gt;.
+    #
+    # An error in the &lt;tt&gt;match_block&lt;/tt&gt; will bubble up, resulting in a
+    # failure.
+    #
+    # == Example with default messages
+    #
+    #   def be_even
+    #     simple_matcher(&quot;an even number&quot;) { |given| given % 2 == 0 }
+    #   end
+    #                    
+    #   describe 2 do
+    #     it &quot;should be even&quot; do
+    #       2.should be_even
+    #     end
+    #   end
+    #
+    # Given an odd number, this example would produce an error message stating:
+    # expected &quot;an even number&quot;, got 3.
+    #
+    # Unfortunately, if you're a fan of auto-generated descriptions, this will
+    # produce &quot;should an even number.&quot; Not the most desirable result. You can
+    # control that using custom messages:
+    #
+    # == Example with custom messages
+    #
+    #   def rhyme_with(expected)
+    #     simple_matcher(&quot;rhyme with #{expected.inspect}&quot;) do |given, matcher|
+    #       matcher.failure_message = &quot;expected #{given.inspect} to rhyme with #{expected.inspect}&quot;
+    #       matcher.negative_failure_message = &quot;expected #{given.inspect} not to rhyme with #{expected.inspect}&quot;
+    #       given.rhymes_with? expected
+    #     end
+    #   end
+    #
+    #   # OR
+    #
+    #   def rhyme_with(expected)
+    #     simple_matcher do |given, matcher|
+    #       matcher.description = &quot;rhyme with #{expected.inspect}&quot;
+    #       matcher.failure_message = &quot;expected #{given.inspect} to rhyme with #{expected.inspect}&quot;
+    #       matcher.negative_failure_message = &quot;expected #{given.inspect} not to rhyme with #{expected.inspect}&quot;
+    #       given.rhymes_with? expected
+    #     end
+    #   end
+    #
+    #   describe &quot;pecan&quot; do
+    #     it &quot;should rhyme with 'be gone'&quot; do
+    #       nut = &quot;pecan&quot;
+    #       nut.extend Rhymer
+    #       nut.should rhyme_with(&quot;be gone&quot;)
+    #     end
+    #   end
+    #
+    # The resulting messages would be:
+    #   description:              rhyme with &quot;be gone&quot;
+    #   failure_message:          expected &quot;pecan&quot; to rhyme with &quot;be gone&quot;
+    #   negative failure_message: expected &quot;pecan&quot; not to rhyme with &quot;be gone&quot;
+    #
+    # == Wrapped Expectations
+    #
+    # Because errors will bubble up, it is possible to wrap other expectations
+    # in a SimpleMatcher.
+    #
+    #   def be_even
+    #     simple_matcher(&quot;an even number&quot;) { |given| (given % 2).should == 0 }
+    #   end
+    #
+    # BE VERY CAREFUL when you do this. Only use wrapped expectations for
+    # matchers that will always be used in only the positive
+    # (&lt;tt&gt;should&lt;/tt&gt;) or negative (&lt;tt&gt;should_not&lt;/tt&gt;), but not both.
+    # The reason is that is you wrap a &lt;tt&gt;should&lt;/tt&gt; and call the wrapper
+    # with &lt;tt&gt;should_not&lt;/tt&gt;, the correct result (the &lt;tt&gt;should&lt;/tt&gt;
+    # failing), will fail when you want it to pass.
+    #
+    def simple_matcher(description=nil, &amp;match_block)
+      SimpleMatcher.new(description, &amp;match_block)
     end
   end
 end
\ No newline at end of file</diff>
      <filename>vendor/plugins/rspec/lib/spec/matchers/simple_matcher.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,38 +2,60 @@ module Spec
   module Matchers
     
     class ThrowSymbol #:nodoc:
-      def initialize(expected=nil)
-        @expected = expected
+      def initialize(expected_symbol = nil, expected_arg=nil)
+        @expected_symbol = expected_symbol
+        @expected_arg = expected_arg
+        @caught_symbol = nil
       end
       
-      def matches?(proc)
+      def matches?(given_proc)
         begin
-          proc.call
-        rescue NameError =&gt; e
-          raise e unless e.message =~ /uncaught throw/
-          @actual = e.name.to_sym
+          if @expected_symbol.nil?
+            given_proc.call
+          else
+            @caught_arg = catch :proc_did_not_throw_anything do
+              catch @expected_symbol do
+                given_proc.call
+                throw :proc_did_not_throw_anything, :nothing_thrown
+              end
+            end
+            @caught_symbol = @expected_symbol unless @caught_arg == :nothing_thrown
+          end
+
+        # Ruby 1.8 uses NameError with `symbol'
+        # Ruby 1.9 uses ArgumentError with :symbol
+        rescue NameError, ArgumentError =&gt; e
+          raise e unless e.message =~ /uncaught throw (`|\:)([a-zA-Z0-9_]*)(')?/
+          @caught_symbol = $2.to_sym
+
         ensure
-          if @expected.nil?
-            return @actual.nil? ? false : true
+          if @expected_symbol.nil?
+            return !@caught_symbol.nil?
           else
-            return @actual == @expected
+            if @expected_arg.nil?
+              return @caught_symbol == @expected_symbol
+            else
+              # puts [@caught_symbol, @expected_symbol].inspect
+              # puts [@caught_arg, @expected_arg].inspect
+              return @caught_symbol == @expected_symbol &amp;&amp; @caught_arg == @expected_arg
+            end
           end
         end
       end
 
       def failure_message
-        if @actual
-          &quot;expected #{expected}, got #{@actual.inspect}&quot;
+        if @caught_symbol
+          &quot;expected #{expected}, got #{@caught_symbol.inspect}&quot;
         else
           &quot;expected #{expected} but nothing was thrown&quot;
         end
       end
       
       def negative_failure_message
-        if @expected
+        if @expected_symbol
           &quot;expected #{expected} not to be thrown&quot;
         else
-          &quot;expected no Symbol, got :#{@actual}&quot;
+          &quot;expected no Symbol, got :#{@caught_symbol}&quot;
         end
       end
       
@@ -44,7 +66,11 @@ module Spec
       private
       
         def expected
-          @expected.nil? ? &quot;a Symbol&quot; : @expected.inspect
+          @expected_symbol.nil? ? &quot;a Symbol&quot; : &quot;#{@expected_symbol.inspect}#{args}&quot;
+        end
+        
+        def args
+          @expected_arg.nil? ? &quot;&quot; : &quot; with #{@expected_arg.inspect}&quot;
         end
       
     end
@@ -52,20 +78,27 @@ module Spec
     # :call-seq:
     #   should throw_symbol()
     #   should throw_symbol(:sym)
+    #   should throw_symbol(:sym, arg)
     #   should_not throw_symbol()
     #   should_not throw_symbol(:sym)
-    #
-    # Given a Symbol argument, matches if a proc throws the specified Symbol.
+    #   should_not throw_symbol(:sym, arg)
     #
     # Given no argument, matches if a proc throws any Symbol.
     #
+    # Given a Symbol, matches if the given proc throws the specified Symbol.
+    #
+    # Given a Symbol and an arg, matches if the given proc throws the
+    # specified Symbol with the specified arg.
+    #
     # == Examples
     #
     #   lambda { do_something_risky }.should throw_symbol
     #   lambda { do_something_risky }.should throw_symbol(:that_was_risky)
+    #   lambda { do_something_risky }.should throw_symbol(:that_was_risky, culprit)
     #
     #   lambda { do_something_risky }.should_not throw_symbol
     #   lambda { do_something_risky }.should_not throw_symbol(:that_was_risky)
+    #   lambda { do_something_risky }.should_not throw_symbol(:that_was_risky, culprit)
     def throw_symbol(sym=nil)
       Matchers::ThrowSymbol.new(sym)
     end</diff>
      <filename>vendor/plugins/rspec/lib/spec/matchers/throw_symbol.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,16 +1,5 @@
-require 'spec/mocks/methods'
-require 'spec/mocks/argument_constraint_matchers'
-require 'spec/mocks/spec_methods'
-require 'spec/mocks/proxy'
-require 'spec/mocks/mock'
-require 'spec/mocks/argument_expectation'
-require 'spec/mocks/message_expectation'
-require 'spec/mocks/order_group'
-require 'spec/mocks/errors'
-require 'spec/mocks/error_generator'
+require 'spec/mocks/framework'
 require 'spec/mocks/extensions/object'
-require 'spec/mocks/space'
-
 
 module Spec
   # == Mocks and Stubs</diff>
      <filename>vendor/plugins/rspec/lib/spec/mocks.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,182 +1,48 @@
 module Spec
   module Mocks
-  
-    class MatcherConstraint
-      def initialize(matcher)
-        @matcher = matcher
-      end
-      
-      def matches?(value)
-        @matcher.matches?(value)
-      end
-    end
-      
-    class LiteralArgConstraint
-      def initialize(literal)
-        @literal_value = literal
-      end
-      
-      def matches?(value)
-        @literal_value == value
-      end
-    end
-    
-    class RegexpArgConstraint
-      def initialize(regexp)
-        @regexp = regexp
-      end
-      
-      def matches?(value)
-        return value =~ @regexp unless value.is_a?(Regexp)
-        value == @regexp
-      end
-    end
-    
-    class AnyArgConstraint
-      def initialize(ignore)
-      end
-      
-      def ==(other)
-        true
-      end
-      
-      # TODO - need this?
-      def matches?(value)
-        true
-      end
-    end
-    
-    class AnyArgsConstraint
-      def description
-        &quot;any args&quot;
-      end
-    end
-    
-    class NoArgsConstraint
-      def description
-        &quot;no args&quot;
-      end
-      
-      def ==(args)
-        args == []
-      end
-    end
     
-    class NumericArgConstraint
-      def initialize(ignore)
-      end
-      
-      def matches?(value)
-        value.is_a?(Numeric)
-      end
-    end
-    
-    class BooleanArgConstraint
-      def initialize(ignore)
-      end
-      
-      def ==(value)
-        matches?(value)
-      end
-      
-      def matches?(value)
-        return true if value.is_a?(TrueClass)
-        return true if value.is_a?(FalseClass)
-        false
-      end
-    end
-    
-    class StringArgConstraint
-      def initialize(ignore)
-      end
-      
-      def matches?(value)
-        value.is_a?(String)
-      end
-    end
-    
-    class DuckTypeArgConstraint
-      def initialize(*methods_to_respond_to)
-        @methods_to_respond_to = methods_to_respond_to
-      end
-  
-      def matches?(value)
-        @methods_to_respond_to.all? { |sym| value.respond_to?(sym) }
-      end
-      
-      def description
-        &quot;duck_type&quot;
-      end
-    end
-
     class ArgumentExpectation
       attr_reader :args
-      @@constraint_classes = Hash.new { |hash, key| LiteralArgConstraint}
-      @@constraint_classes[:anything] = AnyArgConstraint
-      @@constraint_classes[:numeric] = NumericArgConstraint
-      @@constraint_classes[:boolean] = BooleanArgConstraint
-      @@constraint_classes[:string] = StringArgConstraint
       
-      def initialize(args)
+      def initialize(args, &amp;block)
         @args = args
-        if [:any_args] == args
-          @expected_params = nil
-          warn_deprecated(:any_args.inspect, &quot;any_args()&quot;)
-        elsif args.length == 1 &amp;&amp; args[0].is_a?(AnyArgsConstraint) then @expected_params = nil
-        elsif [:no_args] == args
-          @expected_params = []
-          warn_deprecated(:no_args.inspect, &quot;no_args()&quot;)
-        elsif args.length == 1 &amp;&amp; args[0].is_a?(NoArgsConstraint) then @expected_params = []
-        else @expected_params = process_arg_constraints(args)
+        @constraints_block = block
+        
+        if ArgumentConstraints::AnyArgsConstraint === args.first
+          @match_any_args = true
+        elsif ArgumentConstraints::NoArgsConstraint === args.first
+          @constraints = []
+        else
+          @constraints = args.collect {|arg| constraint_for(arg)}
         end
       end
       
-      def process_arg_constraints(constraints)
-        constraints.collect do |constraint| 
-          convert_constraint(constraint)
-        end
+      def constraint_for(arg)
+        return ArgumentConstraints::MatcherConstraint.new(arg)   if is_matcher?(arg)
+        return ArgumentConstraints::RegexpConstraint.new(arg) if arg.is_a?(Regexp)
+        return ArgumentConstraints::EqualityProxy.new(arg)
       end
       
-      def warn_deprecated(deprecated_method, instead)
-        Kernel.warn &quot;The #{deprecated_method} constraint is deprecated. Use #{instead} instead.&quot;
+      def is_matcher?(obj)
+        return obj.respond_to?(:matches?) &amp;&amp; obj.respond_to?(:description)
       end
       
-      def convert_constraint(constraint)
-        if [:anything, :numeric, :boolean, :string].include?(constraint)
-          case constraint
-          when :anything
-            instead = &quot;anything()&quot;
-          when :boolean
-            instead = &quot;boolean()&quot;
-          when :numeric
-            instead = &quot;an_instance_of(Numeric)&quot;
-          when :string
-            instead = &quot;an_instance_of(String)&quot;
-          end
-          warn_deprecated(constraint.inspect, instead)
-          return @@constraint_classes[constraint].new(constraint)
-        end
-        return MatcherConstraint.new(constraint) if is_matcher?(constraint)
-        return RegexpArgConstraint.new(constraint) if constraint.is_a?(Regexp)
-        return LiteralArgConstraint.new(constraint)
+      def args_match?(given_args)
+        match_any_args? || constraints_block_matches?(given_args) || constraints_match?(given_args)
       end
       
-      def is_matcher?(obj)
-        return obj.respond_to?(:matches?) &amp;&amp; obj.respond_to?(:description)
+      def constraints_block_matches?(given_args)
+        @constraints_block ? @constraints_block.call(*given_args) : nil
       end
       
-      def check_args(args)
-        return true if @expected_params.nil?
-        return true if @expected_params == args
-        return constraints_match?(args)
+      def constraints_match?(given_args)
+        @constraints == given_args
       end
       
-      def constraints_match?(args)
-        return false if args.length != @expected_params.length
-        @expected_params.each_index { |i| return false unless @expected_params[i].matches?(args[i]) }
-        return true
+      def match_any_args?
+        @match_any_args
       end
-  
+      
     end
     
   end</diff>
      <filename>vendor/plugins/rspec/lib/spec/mocks/argument_expectation.rb</filename>
    </modified>
    <modified>
      <diff>@@ -44,7 +44,7 @@ module Spec
       
       private
       def intro
-        @name ? &quot;Mock '#{@name}'&quot; : @target.inspect
+        @name ? &quot;Mock '#{@name}'&quot; : @target.class == Class ? &quot;&lt;#{@target.inspect} (class)&gt;&quot; : (@target.nil? ? &quot;nil&quot; : @target.to_s)
       end
       
       def __raise(message)</diff>
      <filename>vendor/plugins/rspec/lib/spec/mocks/error_generator.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,6 +3,10 @@ module Spec
 
     class BaseExpectation
       attr_reader :sym
+      attr_writer :expected_received_count, :method_block, :expected_from
+      protected :expected_received_count=, :method_block=, :expected_from=
+      attr_accessor :error_generator
+      protected :error_generator, :error_generator=
       
       def initialize(error_generator, expectation_ordering, expected_from, sym, method_block, expected_received_count=1, opts={})
         @error_generator = error_generator
@@ -10,10 +14,10 @@ module Spec
         @expected_from = expected_from
         @sym = sym
         @method_block = method_block
-        @return_block = lambda {}
+        @return_block = nil
         @actual_received_count = 0
         @expected_received_count = expected_received_count
-        @args_expectation = ArgumentExpectation.new([AnyArgsConstraint.new])
+        @args_expectation = ArgumentExpectation.new([ArgumentConstraints::AnyArgsConstraint.new])
         @consecutive = false
         @exception_to_raise = nil
         @symbol_to_throw = nil
@@ -23,6 +27,18 @@ module Spec
         @args_to_yield = []
       end
       
+      def build_child(expected_from, method_block, expected_received_count, opts={})
+        child = clone
+        child.expected_from = expected_from
+        child.method_block = method_block
+        child.expected_received_count = expected_received_count
+        new_gen = error_generator.clone
+        new_gen.opts = opts
+        child.error_generator = new_gen
+        child.clone_args_to_yield @args_to_yield
+        child
+      end
+      
       def expected_args
         @args_expectation.args
       end
@@ -39,6 +55,8 @@ module Spec
                                                     @expected_received_count &lt; values.size
         end
         @return_block = block_given? ? return_block : lambda { value }
+        # Ruby 1.9 - see where this is used below
+        @ignore_args = !block_given?
       end
       
       # :call-seq:
@@ -61,34 +79,57 @@ module Spec
       end
       
       def and_yield(*args)
+        if @args_to_yield_were_cloned
+          @args_to_yield.clear
+          @args_to_yield_were_cloned = false
+        end
+        
         @args_to_yield &lt;&lt; args
         self
       end
   
       def matches(sym, args)
-        @sym == sym and @args_expectation.check_args(args)
+        @sym == sym and @args_expectation.args_match?(args)
       end
       
       def invoke(args, block)
+        if @expected_received_count == 0
+          @failed_fast = true
+          @actual_received_count += 1
+          @error_generator.raise_expectation_error @sym, @expected_received_count, @actual_received_count, *args
+        end
+        
         @order_group.handle_order_constraint self
 
         begin
           Kernel::raise @exception_to_raise unless @exception_to_raise.nil?
           Kernel::throw @symbol_to_throw unless @symbol_to_throw.nil?
-
+          
+          
           if !@method_block.nil?
-            return invoke_method_block(args)
+            default_return_val = invoke_method_block(args)
           elsif @args_to_yield.size &gt; 0
-            return invoke_with_yield(block)
-          elsif @consecutive
-            return invoke_consecutive_return_block(args, block)
+            default_return_val = invoke_with_yield(block)
           else
+            default_return_val = nil
+          end
+          
+          if @consecutive
+            return invoke_consecutive_return_block(args, block)
+          elsif @return_block
             return invoke_return_block(args, block)
+          else
+            return default_return_val
           end
         ensure
           @actual_received_count += 1
         end
       end
+
+      def called_max_times?
+        @expected_received_count != :any &amp;&amp; @expected_received_count &gt; 0 &amp;&amp;
+          @actual_received_count &gt;= @expected_received_count
+      end
       
       protected
 
@@ -104,12 +145,14 @@ module Spec
         if block.nil?
           @error_generator.raise_missing_block_error @args_to_yield
         end
+        value = nil
         @args_to_yield.each do |args_to_yield_this_time|
           if block.arity &gt; -1 &amp;&amp; args_to_yield_this_time.length != block.arity
             @error_generator.raise_wrong_arity_error args_to_yield_this_time, block.arity
           end
-          block.call(*args_to_yield_this_time)
+          value = block.call(*args_to_yield_this_time)
         end
+        value
       end
       
       def invoke_consecutive_return_block(args, block)
@@ -122,21 +165,34 @@ module Spec
       
       def invoke_return_block(args, block)
         args &lt;&lt; block unless block.nil?
-        value = @return_block.call(*args)
-    
-        value
+        # Ruby 1.9 - when we set @return_block to return values
+        # regardless of arguments, any arguments will result in
+        # a &quot;wrong number of arguments&quot; error
+        if @ignore_args
+          @return_block.call()
+        else
+          @return_block.call(*args)
+        end
+      end
+
+      def clone_args_to_yield(args)
+        @args_to_yield = args.clone
+        @args_to_yield_were_cloned = true
+      end
+      
+      def failed_fast?
+        @failed_fast
       end
     end
     
     class MessageExpectation &lt; BaseExpectation
       
       def matches_name_but_not_args(sym, args)
-        @sym == sym and not @args_expectation.check_args(args)
+        @sym == sym and not @args_expectation.args_match?(args)
       end
        
-      def verify_messages_received        
-        return if ignoring_args? || matches_exact_count? ||
-           matches_at_least_count? || matches_at_most_count?
+      def verify_messages_received   
+        return if expected_messages_received? || failed_fast?
     
         generate_error
       rescue Spec::Mocks::MockExpectationError =&gt; error
@@ -144,6 +200,11 @@ module Spec
         Kernel::raise error
       end
       
+      def expected_messages_received?
+        ignoring_args? || matches_exact_count? ||
+           matches_at_least_count? || matches_at_most_count?
+      end
+      
       def ignoring_args?
         @expected_received_count == :any
       end
@@ -160,13 +221,24 @@ module Spec
         @expected_received_count == @actual_received_count
       end
       
+      def similar_messages
+        @similar_messages ||= []
+      end
+
+      def advise(args, block)
+        similar_messages &lt;&lt; args
+      end
+      
       def generate_error
-        @error_generator.raise_expectation_error(@sym, @expected_received_count, @actual_received_count, *@args_expectation.args)
+        if similar_messages.empty?
+          @error_generator.raise_expectation_error(@sym, @expected_received_count, @actual_received_count, *@args_expectation.args)
+        else
+          @error_generator.raise_unexpected_message_args_error(self, *@similar_messages.first)
+        end
       end
 
       def with(*args, &amp;block)
-        @method_block = block if block
-        @args_expectation = ArgumentExpectation.new(args)
+        @args_expectation = ArgumentExpectation.new(args, &amp;block)
         self
       end
       </diff>
      <filename>vendor/plugins/rspec/lib/spec/mocks/message_expectation.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,8 +9,12 @@ module Spec
         __mock_proxy.add_negative_message_expectation(caller(1)[0], sym.to_sym, &amp;block)
       end
       
-      def stub!(sym, opts={})
-        __mock_proxy.add_stub(caller(1)[0], sym.to_sym, opts)
+      def stub!(sym_or_hash, opts={})
+        if Hash === sym_or_hash
+          sym_or_hash.each {|method, value| stub!(method).and_return value }
+        else
+          __mock_proxy.add_stub(caller(1)[0], sym_or_hash.to_sym, opts)
+        end
       end
       
       def received_message?(sym, *args, &amp;block) #:nodoc:
@@ -24,6 +28,14 @@ module Spec
       def rspec_reset #:nodoc:
         __mock_proxy.reset
       end
+      
+      def as_null_object
+        __mock_proxy.as_null_object
+      end
+      
+      def null_object?
+        __mock_proxy.null_object?
+      end
 
     private
 
@@ -31,7 +43,7 @@ module Spec
         if Mock === self
           @mock_proxy ||= Proxy.new(self, @name, @options)
         else
-          @mock_proxy ||= Proxy.new(self, self.class.name)
+          @mock_proxy ||= Proxy.new(self)
         end
       end
     end</diff>
      <filename>vendor/plugins/rspec/lib/spec/mocks/methods.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,18 +3,21 @@ module Spec
     class Mock
       include Methods
 
-      # Creates a new mock with a +name+ (that will be used in error messages only)
-      # == Options:
-      # * &lt;tt&gt;:null_object&lt;/tt&gt; - if true, the mock object acts as a forgiving null object allowing any message to be sent to it.
-      def initialize(name, options={})
+      # Creates a new mock with a +name+ (that will be used in error messages
+      # only) == Options:
+      # * &lt;tt&gt;:null_object&lt;/tt&gt; - if true, the mock object acts as a forgiving
+      #   null object allowing any message to be sent to it.
+      def initialize(name, stubs_and_options={})
         @name = name
-        @options = options
+        @options = parse_options(stubs_and_options)
+        assign_stubs(stubs_and_options)
       end
       
-      # This allows for comparing the mock to other objects that proxy
-      #  such as ActiveRecords belongs_to proxy objects
-      #  By making the other object run the comparison, we're sure the call gets delegated to the proxy target
-      # This is an unfortunate side effect from ActiveRecord, but this should be safe unless the RHS redefines == in a nonsensical manner
+      # This allows for comparing the mock to other objects that proxy such as
+      # ActiveRecords belongs_to proxy objects By making the other object run
+      # the comparison, we're sure the call gets delegated to the proxy target
+      # This is an unfortunate side effect from ActiveRecord, but this should
+      # be safe unless the RHS redefines == in a nonsensical manner
       def ==(other)
         other == __mock_proxy
       end
@@ -32,6 +35,22 @@ module Spec
       def inspect
         &quot;#&lt;#{self.class}:#{sprintf '0x%x', self.object_id} @name=#{@name.inspect}&gt;&quot;
       end
+      
+      def to_s
+        inspect.gsub('&lt;','[').gsub('&gt;',']')
+      end
+      
+      private
+      
+        def parse_options(options)
+          options.has_key?(:null_object) ? {:null_object =&gt; options.delete(:null_object)} : {}
+        end
+        
+        def assign_stubs(stubs)
+          stubs.each_pair do |message, response|
+            stub!(message).and_return(response)
+          end
+        end
     end
   end
 end</diff>
      <filename>vendor/plugins/rspec/lib/spec/mocks/mock.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,8 +4,18 @@ module Spec
       DEFAULT_OPTIONS = {
         :null_object =&gt; false,
       }
+      
+      @@warn_about_expectations_on_nil = true
+      
+      def self.allow_message_expectations_on_nil
+        @@warn_about_expectations_on_nil = false
+        
+        # ensure nil.rspec_verify is called even if an expectation is not set in the example
+        # otherwise the allowance would effect subsequent examples
+        $rspec_mocks.add(nil) unless $rspec_mocks.nil?
+      end
 
-      def initialize(target, name, options={})
+      def initialize(target, name=nil, options={})
         @target = target
         @name = name
         @error_generator = ErrorGenerator.new target, name
@@ -20,15 +30,27 @@ module Spec
       def null_object?
         @options[:null_object]
       end
+      
+      def as_null_object
+        @options[:null_object] = true
+        @target
+      end
 
-      def add_message_expectation(expected_from, sym, opts={}, &amp;block)
+      def add_message_expectation(expected_from, sym, opts={}, &amp;block)        
         __add sym
-        @expectations &lt;&lt; MessageExpectation.new(@error_generator, @expectation_ordering, expected_from, sym, block_given? ? block : nil, 1, opts)
+        warn_if_nil_class sym
+        if existing_stub = @stubs.detect {|s| s.sym == sym }
+          expectation = existing_stub.build_child(expected_from, block_given?? block : nil, 1, opts)
+        else
+          expectation = MessageExpectation.new(@error_generator, @expectation_ordering, expected_from, sym, block_given? ? block : nil, 1, opts)
+        end
+        @expectations &lt;&lt; expectation
         @expectations.last
       end
 
       def add_negative_message_expectation(expected_from, sym, &amp;block)
         __add sym
+        warn_if_nil_class sym
         @expectations &lt;&lt; NegativeMessageExpectation.new(@error_generator, @expectation_ordering, expected_from, sym, block_given? ? block : nil)
         @expectations.last
       end
@@ -50,6 +72,7 @@ module Spec
         clear_stubs
         reset_proxied_methods
         clear_proxied_methods
+        reset_nil_expectations_warning
       end
 
       def received_message?(sym, *args, &amp;block)
@@ -61,14 +84,21 @@ module Spec
       end
 
       def message_received(sym, *args, &amp;block)
-        if expectation = find_matching_expectation(sym, *args)
-          expectation.invoke(args, block)
-        elsif stub = find_matching_method_stub(sym, *args)
+        expectation = find_matching_expectation(sym, *args)
+        stub = find_matching_method_stub(sym, *args)
+
+        if (stub &amp;&amp; expectation &amp;&amp; expectation.called_max_times?) || (stub &amp;&amp; !expectation)
+          if expectation = find_almost_matching_expectation(sym, *args)
+            expectation.advise(args, block) unless expectation.expected_messages_received?
+          end
           stub.invoke([], block)
+        elsif expectation
+          expectation.invoke(args, block)
         elsif expectation = find_almost_matching_expectation(sym, *args)
-          raise_unexpected_message_args_error(expectation, *args) unless has_negative_expectation?(sym) unless null_object?
+          expectation.advise(args, block) if null_object? unless expectation.expected_messages_received?
+          raise_unexpected_message_args_error(expectation, *args) unless (has_negative_expectation?(sym) or null_object?)
         else
-          @target.send :method_missing, sym, *args, &amp;block
+          @target.__send__ :method_missing, sym, *args, &amp;block
         end
       end
 
@@ -87,26 +117,48 @@ module Spec
         define_expected_method(sym)
       end
       
+      def warn_if_nil_class(sym)
+        if proxy_for_nil_class? &amp;&amp; @@warn_about_expectations_on_nil          
+          Kernel.warn(&quot;An expectation of :#{sym} was set on nil. Called from #{caller[2]}. Use allow_message_expectations_on_nil to disable warnings.&quot;)
+        end
+      end
+      
       def define_expected_method(sym)
-        if target_responds_to?(sym) &amp;&amp; !metaclass.method_defined?(munge(sym))
-          munged_sym = munge(sym)
-          metaclass.instance_eval do
-            alias_method munged_sym, sym if method_defined?(sym.to_s)
+        visibility_string = &quot;#{visibility(sym)} :#{sym}&quot;
+        unless @proxied_methods.include?(sym)
+          if target_responds_to?(sym)
+            munged_sym = munge(sym)
+            target_metaclass.instance_eval do
+              alias_method munged_sym, sym if method_defined?(sym.to_s)
+            end
+            @proxied_methods &lt;&lt; sym
           end
-          @proxied_methods &lt;&lt; sym
         end
-        
-        metaclass_eval(&lt;&lt;-EOF, __FILE__, __LINE__)
+
+        target_metaclass.class_eval(&lt;&lt;-EOF, __FILE__, __LINE__)
           def #{sym}(*args, &amp;block)
             __mock_proxy.message_received :#{sym}, *args, &amp;block
           end
+          #{visibility_string}
         EOF
       end
 
       def target_responds_to?(sym)
-        return @target.send(munge(:respond_to?),sym) if @already_proxied_respond_to
+        return @target.__send__(munge(:respond_to?),sym) if @already_proxied_respond_to
         return @already_proxied_respond_to = true if sym == :respond_to?
-        return @target.respond_to?(sym)
+        return @target.respond_to?(sym, true)
+      end
+
+      def visibility(sym)
+        if Mock === @target
+          'public'
+        elsif target_metaclass.private_method_defined?(sym)
+          'private'
+        elsif target_metaclass.protected_method_defined?(sym)
+          'protected'
+        else
+          'public'
+        end
       end
 
       def munge(sym)
@@ -125,12 +177,8 @@ module Spec
         @proxied_methods.clear
       end
 
-      def metaclass_eval(str, filename, lineno)
-        metaclass.class_eval(str, filename, lineno)
-      end
-      
-      def metaclass
-        (class &lt;&lt; @target; self; end)
+      def target_metaclass
+        class &lt;&lt; @target; self; end
       end
 
       def verify_expectations
@@ -142,16 +190,24 @@ module Spec
       def reset_proxied_methods
         @proxied_methods.each do |sym|
           munged_sym = munge(sym)
-          metaclass.instance_eval do
+          target_metaclass.instance_eval do
             if method_defined?(munged_sym.to_s)
               alias_method sym, munged_sym
               undef_method munged_sym
             else
-              undef_method sym
+              remove_method sym
             end
           end
         end
       end
+      
+      def proxy_for_nil_class?
+        @target.nil?
+      end
+      
+      def reset_nil_expectations_warning
+        @@warn_about_expectations_on_nil = true if proxy_for_nil_class?
+      end
 
       def find_matching_expectation(sym, *args)
         @expectations.find {|expectation| expectation.matches(sym, args)}</diff>
      <filename>vendor/plugins/rspec/lib/spec/mocks/proxy.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,36 +1,45 @@
 module Spec
   module Mocks
-    module SpecMethods
-      include Spec::Mocks::ArgumentConstraintMatchers
+    module ExampleMethods
+      include Spec::Mocks::ArgumentConstraints
 
       # Shortcut for creating an instance of Spec::Mocks::Mock.
-      def mock(name, options={})
-        Spec::Mocks::Mock.new(name, options)
-      end
-
-      # Shortcut for creating an instance of Spec::Mocks::Mock with
-      # predefined method stubs.
+      #
+      # +name+ is used for failure reporting, so you should use the
+      # role that the mock is playing in the example.
+      #
+      # +stubs_and_options+ lets you assign options and stub values
+      # at the same time. The only option available is :null_object.
+      # Anything else is treated as a stub value.
       #
       # == Examples
       #
-      #   stub_thing = stub(&quot;thing&quot;, :a =&gt; &quot;A&quot;)
+      #   stub_thing = mock(&quot;thing&quot;, :a =&gt; &quot;A&quot;)
       #   stub_thing.a == &quot;A&quot; =&gt; true
       #
       #   stub_person = stub(&quot;thing&quot;, :name =&gt; &quot;Joe&quot;, :email =&gt; &quot;joe@domain.com&quot;)
       #   stub_person.name =&gt; &quot;Joe&quot;
       #   stub_person.email =&gt; &quot;joe@domain.com&quot;
-      def stub(name, stubs={})
-        object_stub = mock(name)
-        stubs.each { |key, value| object_stub.stub!(key).and_return(value) }
-        object_stub
+      def mock(name, stubs_and_options={})
+        Spec::Mocks::Mock.new(name, stubs_and_options)
       end
       
+      alias :stub :mock
+
       # Shortcut for creating a mock object that will return itself in response
       # to any message it receives that it hasn't been explicitly instructed
       # to respond to.
       def stub_everything(name = 'stub')
         mock(name, :null_object =&gt; true)
       end
+      
+      # Disables warning messages about expectations being set on nil.
+      #
+      # By default warning messages are issued when expectations are set on nil.  This is to 
+      # prevent false-positives and to catch potential bugs early on.
+      def allow_message_expectations_on_nil
+        Proxy.allow_message_expectations_on_nil
+      end
 
     end
   end</diff>
      <filename>vendor/plugins/rspec/lib/spec/mocks/spec_methods.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,7 +11,7 @@ module Spec
     # A Rake task that runs a set of specs.
     #
     # Example:
-    #  
+    #
     #   Spec::Rake::SpecTask.new do |t|
     #     t.warning = true
     #     t.rcov = true
@@ -44,13 +44,22 @@ module Spec
     # Each attribute of this task may be a proc. This allows for lazy evaluation,
     # which is sometimes handy if you want to defer the evaluation of an attribute value
     # until the task is run (as opposed to when it is defined).
+    #
+    # This task can also be used to run existing Test::Unit tests and get RSpec
+    # output, for example like this:
+    #
+    #   require 'rubygems'
+    #   require 'spec/rake/spectask'
+    #   Spec::Rake::SpecTask.new do |t|
+    #     t.ruby_opts = ['-rtest/unit']
+    #     t.spec_files = FileList['test/**/*_test.rb']
+    #   end
+    #
     class SpecTask &lt; ::Rake::TaskLib
-      class &lt;&lt; self
-        def attr_accessor(*names)
-          super(*names)
-          names.each do |name|
-            module_eval &quot;def #{name}() evaluate(@#{name}) end&quot; # Allows use of procs
-          end
+      def self.attr_accessor(*names)
+        super(*names)
+        names.each do |name|
+          module_eval &quot;def #{name}() evaluate(@#{name}) end&quot; # Allows use of procs
         end
       end
 
@@ -76,7 +85,7 @@ module Spec
       # Whether or not to use RCov (default is false)
       # See http://eigenclass.org/hiki.rb?rcov
       attr_accessor :rcov
-      
+
       # Array of commandline options to pass to RCov. Defaults to ['--exclude', 'lib\/spec,bin\/spec'].
       # Ignored if rcov=false
       # Setting the RCOV_OPTS environment variable overrides this.
@@ -96,7 +105,7 @@ module Spec
       # A message to print to stderr when there are failures.
       attr_accessor :failure_message
 
-      # Where RSpec's output is written. Defaults to STDOUT.
+      # Where RSpec's output is written. Defaults to $stdout.
       # DEPRECATED. Use --format FORMAT:WHERE in spec_opts.
       attr_accessor :out
 
@@ -106,7 +115,7 @@ module Spec
       # used, then the list of spec files is the union of the two.
       # Setting the SPEC environment variable overrides this.
       attr_accessor :spec_files
-      
+
       # Use verbose output. If this is set to true, the task will print
       # the executed spec command to stdout. Defaults to false.
       attr_accessor :verbose
@@ -144,30 +153,23 @@ module Spec
               # ruby [ruby_opts] -Ilib -S rcov [rcov_opts] bin/spec -- examples [spec_opts]
               # or
               # ruby [ruby_opts] -Ilib bin/spec examples [spec_opts]
-              cmd = &quot;ruby &quot;
-
-              rb_opts = ruby_opts.clone
-              rb_opts &lt;&lt; &quot;-I\&quot;#{lib_path}\&quot;&quot;
-              rb_opts &lt;&lt; &quot;-S rcov&quot; if rcov
-              rb_opts &lt;&lt; &quot;-w&quot; if warning
-              cmd &lt;&lt; rb_opts.join(&quot; &quot;)
-              cmd &lt;&lt; &quot; &quot;
-              cmd &lt;&lt; rcov_option_list
-              cmd &lt;&lt; %[ -o &quot;#{rcov_dir}&quot; ] if rcov
-              cmd &lt;&lt; %Q|&quot;#{spec_script}&quot;|
-              cmd &lt;&lt; &quot; &quot;
-              cmd &lt;&lt; &quot;-- &quot; if rcov
-              cmd &lt;&lt; spec_file_list.collect { |fn| %[&quot;#{fn}&quot;] }.join(' ')
-              cmd &lt;&lt; &quot; &quot;
-              cmd &lt;&lt; spec_option_list
+              cmd_parts = [RUBY]
+              cmd_parts += ruby_opts
+              cmd_parts &lt;&lt; %[-I&quot;#{lib_path}&quot;]
+              cmd_parts &lt;&lt; &quot;-S rcov&quot; if rcov
+              cmd_parts &lt;&lt; &quot;-w&quot; if warning
+              cmd_parts &lt;&lt; rcov_option_list
+              cmd_parts &lt;&lt; %[-o &quot;#{rcov_dir}&quot;] if rcov
+              cmd_parts &lt;&lt; %[&quot;#{spec_script}&quot;]
+              cmd_parts &lt;&lt; &quot;--&quot; if rcov
+              cmd_parts += spec_file_list.collect { |fn| %[&quot;#{fn}&quot;] }
+              cmd_parts &lt;&lt; spec_option_list
               if out
-                cmd &lt;&lt; &quot; &quot;
-                cmd &lt;&lt; %Q| &gt; &quot;#{out}&quot;|
+                cmd_parts &lt;&lt; %[&gt; &quot;#{out}&quot;]
                 STDERR.puts &quot;The Spec::Rake::SpecTask#out attribute is DEPRECATED and will be removed in a future version. Use --format FORMAT:WHERE instead.&quot;
               end
-              if verbose
-                puts cmd
-              end
+              cmd = cmd_parts.join(&quot; &quot;)
+              puts cmd if verbose
               unless system(cmd)
                 STDERR.puts failure_message if failure_message
                 raise(&quot;Command #{cmd} failed&quot;) if fail_on_error
@@ -199,7 +201,7 @@ module Spec
         STDERR.puts &quot;RSPECOPTS is DEPRECATED and will be removed in a future version. Use SPEC_OPTS instead.&quot; if ENV['RSPECOPTS']
         ENV['SPEC_OPTS'] || ENV['RSPECOPTS'] || spec_opts.join(&quot; &quot;) || &quot;&quot;
       end
-      
+
       def evaluate(o) # :nodoc:
         case o
           when Proc then o.call
@@ -221,4 +223,3 @@ module Spec
     end
   end
 end
-</diff>
      <filename>vendor/plugins/rspec/lib/spec/rake/spectask.rb</filename>
    </modified>
    <modified>
      <diff>@@ -35,11 +35,11 @@ module RCov
     def define
       desc &quot;Verify that rcov coverage is at least #{threshold}%&quot;
       task @name do
-        total_coverage = nil
+        total_coverage = 0
 
         File.open(index_html).each_line do |line|
-          if line =~ /&lt;tt.*&gt;(\d+\.\d+)%&lt;\/tt&gt;&amp;nbsp;&lt;\/td&gt;/
-            total_coverage = eval($1)
+          if line =~ /&lt;tt class='coverage_total'&gt;\s*(\d+\.\d+)%\s*&lt;\/tt&gt;/
+            total_coverage = $1.to_f
             break
           end
         end</diff>
      <filename>vendor/plugins/rspec/lib/spec/rake/verify_rcov.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,3 @@
-require 'spec/runner/formatter'
 require 'spec/runner/options'
 require 'spec/runner/option_parser'
 require 'spec/runner/example_group_runner'
@@ -6,17 +5,16 @@ require 'spec/runner/command_line'
 require 'spec/runner/drb_command_line'
 require 'spec/runner/backtrace_tweaker'
 require 'spec/runner/reporter'
-require 'spec/runner/extensions/object'
 require 'spec/runner/spec_parser'
 require 'spec/runner/class_and_arguments_parser'
 
 module Spec
-  # == Behaviours and Examples
+  # == ExampleGroups and Examples
   # 
-  # Rather than expressing examples in classes, RSpec uses a custom domain specific language to 
-  # describe Behaviours and Examples of those behaviours.
+  # Rather than expressing examples in classes, RSpec uses a custom DSLL (DSL light) to 
+  # describe groups of examples.
   # 
-  # A Example is the equivalent of a fixture in xUnit-speak. It is a metaphor for the context
+  # A ExampleGroup is the equivalent of a fixture in xUnit-speak. It is a metaphor for the context
   # in which you will run your executable example - a set of known objects in a known starting state.
   # We begin be describing
   # 
@@ -125,11 +123,11 @@ module Spec
   #     end
   #   end
   # 
-  # == Shared behaviour
+  # == Shared Example Groups
   # 
-  # You can define a shared behaviour, that may be used on other behaviours
+  # You can define a shared Example Group, that may be used on other groups
   #
-  #  describe &quot;All Editions&quot;, :shared =&gt; true do
+  #  share_examples_for &quot;All Editions&quot; do
   #    it &quot;all editions behaviour&quot; ...
   #  end
   #
@@ -141,10 +139,10 @@ module Spec
   #    end
   #  end
   #
-  # You can also assign the shared behaviour to a module and include that
+  # You can also assign the shared group to a module and include that
   #
-  #  AllEditions = describe &quot;All Editions&quot;, :shared =&gt; true do
-  #    it &quot;all editions behaviour&quot; ...
+  #  share_as :AllEditions do
+  #    it &quot;should do all editions stuff&quot; ...
   #  end
   #
   #  describe SmallEdition do
@@ -166,25 +164,48 @@ module Spec
   #    end
   #  end
   module Runner
-    class &lt;&lt; self
-      def configuration # :nodoc:
-        @configuration ||= Spec::Example::Configuration.new
+    def self.configuration # :nodoc:
+      @configuration ||= Spec::Example::Configuration.new
+    end
+
+    # Use this to configure various configurable aspects of
+    # RSpec:
+    #
+    #   Spec::Runner.configure do |configuration|
+    #     # Configure RSpec here
+    #   end
+    #
+    # The yielded &lt;tt&gt;configuration&lt;/tt&gt; object is a
+    # Spec::Example::Configuration instance. See its RDoc
+    # for details about what you can do with it.
+    #
+    def self.configure
+      yield configuration
+    end
+    
+    def self.register_at_exit_hook # :nodoc:
+      unless @already_registered_at_exit_hook
+        at_exit do
+          unless $! || Spec.run? || Spec::Example::ExampleGroupFactory.registered_or_ancestor_of_registered?(options.example_groups)
+            success = Spec.run
+            exit success if Spec.exit?
+          end
+        end
+        @already_registered_at_exit_hook = true
       end
-      
-      # Use this to configure various configurable aspects of
-      # RSpec:
-      #
-      #   Spec::Runner.configure do |configuration|
-      #     # Configure RSpec here
-      #   end
-      #
-      # The yielded &lt;tt&gt;configuration&lt;/tt&gt; object is a
-      # Spec::Example::Configuration instance. See its RDoc
-      # for details about what you can do with it.
-      #
-      def configure
-        yield configuration
+    end
+
+    def self.options # :nodoc:
+      @options ||= begin
+        parser = ::Spec::Runner::OptionParser.new($stderr, $stdout)
+        parser.order!(ARGV)
+        parser.options
       end
     end
+    
+    def self.use options
+      @options = options
+    end
+
   end
 end</diff>
      <filename>vendor/plugins/rspec/lib/spec/runner.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,7 @@ module Spec
     end
 
     class NoisyBacktraceTweaker &lt; BacktraceTweaker
-      def tweak_backtrace(error, spec_name)
+      def tweak_backtrace(error)
         return if error.backtrace.nil?
         error.backtrace.each do |line|
           clean_up_double_slashes(line)
@@ -19,7 +19,7 @@ module Spec
     class QuietBacktraceTweaker &lt; BacktraceTweaker
       unless defined?(IGNORE_PATTERNS)
         root_dir = File.expand_path(File.join(__FILE__, '..', '..', '..', '..'))
-        spec_files = Dir[&quot;#{root_dir}/lib/spec/*&quot;].map do |path| 
+        spec_files = Dir[&quot;#{root_dir}/lib/*&quot;].map do |path| 
           subpath = path[root_dir.length..-1]
           /#{subpath}/
         end
@@ -27,7 +27,7 @@ module Spec
           /\/lib\/ruby\//,
           /bin\/spec:/,
           /bin\/rcov:/,
-          /lib\/rspec_on_rails/,
+          /lib\/rspec-rails/,
           /vendor\/rails/,
           # TextMate's Ruby and RSpec plugins
           /Ruby\.tmbundle\/Support\/tmruby.rb:/,
@@ -38,17 +38,16 @@ module Spec
         ]
       end
       
-      def tweak_backtrace(error, spec_name)
+      def tweak_backtrace(error)
         return if error.backtrace.nil?
-        error.backtrace.collect! do |line|
-          clean_up_double_slashes(line)
-          IGNORE_PATTERNS.each do |ignore|
-            if line =~ ignore
-              line = nil
-              break
+        error.backtrace.collect! do |message|
+          clean_up_double_slashes(message)
+          kept_lines = message.split(&quot;\n&quot;).select do |line|
+            IGNORE_PATTERNS.each do |ignore|
+              break if line =~ ignore
             end
           end
-          line
+          kept_lines.empty?? nil : kept_lines.join(&quot;\n&quot;)
         end
         error.backtrace.compact!
       end</diff>
      <filename>vendor/plugins/rspec/lib/spec/runner/backtrace_tweaker.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,16 +1,14 @@
 module Spec
   module Runner
     class ClassAndArgumentsParser
-      class &lt;&lt; self
-        def parse(s)
-          if s =~ /([a-zA-Z_]+(?:::[a-zA-Z_]+)*):?(.*)/
-            arg = $2 == &quot;&quot; ? nil : $2
-            [$1, arg]
-          else
-            raise &quot;Couldn't parse #{s.inspect}&quot;
-          end
+      def self.parse(s)
+        if s =~ /([a-zA-Z_]+(?:::[a-zA-Z_]+)*):?(.*)/
+          arg = $2 == &quot;&quot; ? nil : $2
+          [$1, arg]
+        else
+          raise &quot;Couldn't parse #{s.inspect}&quot;
         end
       end
     end
   end
-end
\ No newline at end of file
+end</diff>
      <filename>vendor/plugins/rspec/lib/spec/runner/class_and_arguments_parser.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,26 +2,13 @@ require 'spec/runner/option_parser'
 
 module Spec
   module Runner
-    # Facade to run specs without having to fork a new ruby process (using `spec ...`)
     class CommandLine
-      class &lt;&lt; self
-        # Runs specs. +argv+ is the commandline args as per the spec commandline API, +err+
-        # and +out+ are the streams output will be written to.
-        def run(instance_rspec_options)
-          # NOTE - this call to init_rspec_options is not spec'd, but neither is any of this
-          # swapping of $rspec_options. That is all here to enable rspec to run against itself
-          # and maintain coverage in a single process. Therefore, DO NOT mess with this stuff
-          # unless you know what you are doing!
-          init_rspec_options(instance_rspec_options)
-          orig_rspec_options = rspec_options
-          begin
-            $rspec_options = instance_rspec_options
-            return $rspec_options.run_examples
-          ensure
-            ::Spec.run = true
-            $rspec_options = orig_rspec_options
-          end
-        end
+      def self.run(tmp_options=Spec::Runner.options)
+        orig_options = Spec::Runner.options
+        Spec::Runner.use tmp_options
+        tmp_options.run_examples
+      ensure
+        Spec::Runner.use orig_options
       end
     end
   end</diff>
      <filename>vendor/plugins/rspec/lib/spec/runner/command_line.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@ module Spec
       def self.run(options)
         begin
           DRb.start_service
-          spec_server = DRbObject.new_with_uri(&quot;druby://localhost:8989&quot;)
+          spec_server = DRbObject.new_with_uri(&quot;druby://127.0.0.1:8989&quot;)
           spec_server.run(options.argv, options.error_stream, options.output_stream)
         rescue DRb::DRbConnError =&gt; e
           options.error_stream.puts &quot;No server is running&quot;</diff>
      <filename>vendor/plugins/rspec/lib/spec/runner/drb_command_line.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,7 @@ module Spec
 
       def load_files(files)
         # It's important that loading files (or choosing not to) stays the
-        # responsibility of the BehaviourRunner. Some implementations (like)
+        # responsibility of the ExampleGroupRunner. Some implementations (like)
         # the one using DRb may choose *not* to load files, but instead tell
         # someone else to do it over the wire.
         files.each do |file|
@@ -19,7 +19,7 @@ module Spec
         prepare
         success = true
         example_groups.each do |example_group|
-          success = success &amp; example_group.suite.run
+          success = success &amp; example_group.run
         end
         return success
       ensure</diff>
      <filename>vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,6 +3,7 @@ module Spec
     module Formatter
       # Baseclass for formatters that implements all required methods as no-ops. 
       class BaseFormatter
+        attr_accessor :example_group, :options, :where
         def initialize(options, where)
           @options = options
           @where = where
@@ -17,12 +18,12 @@ module Spec
         def start(example_count)
         end
 
-        # This method is invoked at the beginning of the execution of each behaviour.
-        # +name+ is the name of the behaviour and +first+ is true if it is the
-        # first behaviour - otherwise it's false.
+        # This method is invoked at the beginning of the execution of each example_group.
+        # +example_group+ is the example_group.
         #
         # The next method to be invoked after this is #example_failed or #example_finished
-        def add_example_group(name)
+        def add_example_group(example_group)
+          @example_group = example_group
         end
 
         # This method is invoked when an +example+ starts.
@@ -42,10 +43,11 @@ module Spec
         
         # This method is invoked when an example is not yet implemented (i.e. has not
         # been provided a block), or when an ExamplePendingError is raised.
-        # +name+ is the name of the example.
         # +message+ is the message from the ExamplePendingError, if it exists, or the
         # default value of &quot;Not Yet Implemented&quot;
-        def example_pending(behaviour_name, example_name, message)
+        # +pending_caller+ is the file and line number of the spec which
+        # has called the pending method
+        def example_pending(example, message, pending_caller)
         end
 
         # This method is invoked after all of the examples have executed. The next method</diff>
      <filename>vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,5 @@
+require 'spec/runner/formatter/base_formatter'
+
 module Spec
   module Runner
     module Formatter
@@ -5,27 +7,23 @@ module Spec
       # non-text based ones too - just ignore the +output+ constructor
       # argument.
       class BaseTextFormatter &lt; BaseFormatter
+        attr_reader :output, :pending_examples
         # Creates a new instance that will write to +where+. If +where+ is a
         # String, output will be written to the File with that name, otherwise
         # +where+ is exected to be an IO (or an object that responds to #puts and #write).
         def initialize(options, where)
           super
           if where.is_a?(String)
+            FileUtils.mkdir_p(File.dirname(where))
             @output = File.open(where, 'w')
-          elsif where == STDOUT
-            @output = Kernel
-            def @output.flush
-              STDOUT.flush
-            end
           else
             @output = where
           end
-          @snippet_extractor = SnippetExtractor.new
           @pending_examples = []
         end
         
-        def example_pending(behaviour_name, example_name, message)
-          @pending_examples &lt;&lt; [&quot;#{behaviour_name} #{example_name}&quot;, message]
+        def example_pending(example, message, pending_caller)
+          @pending_examples &lt;&lt; [example.full_description, message, pending_caller]
         end
         
         def dump_failure(counter, failure)
@@ -72,14 +70,15 @@ module Spec
             @output.puts
             @output.puts &quot;Pending:&quot;
             @pending_examples.each do |pending_example|
-              @output.puts &quot;#{pending_example[0]} (#{pending_example[1]})&quot; 
+              @output.puts &quot;\n#{pending_example[0]} (#{pending_example[1]})&quot;
+              @output.puts &quot;#{pending_example[2]}\n&quot;
             end
           end
           @output.flush
         end
         
         def close
-          if IO === @output
+          if IO === @output &amp;&amp; @output != $stdout
             @output.close 
           end
         end
@@ -110,7 +109,7 @@ module Spec
 
         def output_to_tty?
           begin
-            @output == Kernel || @output.tty?
+            @output.tty? || ENV.has_key?(&quot;AUTOTEST&quot;)
           rescue NoMethodError
             false
           end</diff>
      <filename>vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,13 +1,11 @@
+require 'spec/runner/formatter/base_text_formatter'
+
 module Spec
   module Runner
     module Formatter
       class FailingExamplesFormatter &lt; BaseTextFormatter      
-        def add_example_group(behaviour_name)
-          @behaviour_name = behaviour_name
-        end
-      
         def example_failed(example, counter, failure)
-          @output.puts &quot;#{@behaviour_name} #{example.description}&quot;
+          @output.puts &quot;#{example_group.description} #{example.description}&quot;
           @output.flush
         end
 </diff>
      <filename>vendor/plugins/rspec/lib/spec/runner/formatter/failing_examples_formatter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,5 @@
 require 'erb'
+require 'spec/runner/formatter/base_text_formatter'
 
 module Spec
   module Runner
@@ -8,18 +9,22 @@ module Spec
         
         def initialize(options, output)
           super
-          @current_behaviour_number = 0
-          @current_example_number = 0
+          @example_group_number = 0
+          @example_number = 0
+        end
+        
+        def method_missing(sym, *args)
+          # no-op
         end
 
-        # The number of the currently running behaviour
-        def current_behaviour_number
-          @current_behaviour_number
+        # The number of the currently running example_group
+        def example_group_number
+          @example_group_number
         end
         
         # The number of the currently running example (a global counter)
-        def current_example_number
-          @current_example_number
+        def example_number
+          @example_number
         end
         
         def start(example_count)
@@ -30,17 +35,18 @@ module Spec
           @output.flush
         end
 
-        def add_example_group(name)
-          @behaviour_red = false
-          @behaviour_red = false
-          @current_behaviour_number += 1
-          unless current_behaviour_number == 1
+        def add_example_group(example_group)
+          super
+          @example_group_red = false
+          @example_group_red = false
+          @example_group_number += 1
+          unless example_group_number == 1
             @output.puts &quot;  &lt;/dl&gt;&quot;
             @output.puts &quot;&lt;/div&gt;&quot;
           end
-          @output.puts &quot;&lt;div class=\&quot;behaviour\&quot;&gt;&quot;
+          @output.puts &quot;&lt;div class=\&quot;example_group\&quot;&gt;&quot;
           @output.puts &quot;  &lt;dl&gt;&quot;
-          @output.puts &quot;  &lt;dt id=\&quot;behaviour_#{current_behaviour_number}\&quot;&gt;#{h(name)}&lt;/dt&gt;&quot;
+          @output.puts &quot;  &lt;dt id=\&quot;example_group_#{example_group_number}\&quot;&gt;#{h(example_group.description)}&lt;/dt&gt;&quot;
           @output.flush
         end
 
@@ -51,7 +57,7 @@ module Spec
         end
 
         def example_started(example)
-          @current_example_number += 1
+          @example_number += 1
         end
 
         def example_passed(example)
@@ -65,8 +71,8 @@ module Spec
           failure_style = failure.pending_fixed? ? 'pending_fixed' : 'failed'
           @output.puts &quot;    &lt;script type=\&quot;text/javascript\&quot;&gt;makeRed('rspec-header');&lt;/script&gt;&quot; unless @header_red
           @header_red = true
-          @output.puts &quot;    &lt;script type=\&quot;text/javascript\&quot;&gt;makeRed('behaviour_#{current_behaviour_number}');&lt;/script&gt;&quot; unless @behaviour_red
-          @behaviour_red = true
+          @output.puts &quot;    &lt;script type=\&quot;text/javascript\&quot;&gt;makeRed('example_group_#{example_group_number}');&lt;/script&gt;&quot; unless @example_group_red
+          @example_group_red = true
           move_progress
           @output.puts &quot;    &lt;dd class=\&quot;spec #{failure_style}\&quot;&gt;&quot;
           @output.puts &quot;      &lt;span class=\&quot;failed_spec_name\&quot;&gt;#{h(example.description)}&lt;/span&gt;&quot;
@@ -79,11 +85,11 @@ module Spec
           @output.flush
         end
 
-        def example_pending(behaviour_name, example_name, message)
+        def example_pending(example, message, pending_caller)
           @output.puts &quot;    &lt;script type=\&quot;text/javascript\&quot;&gt;makeYellow('rspec-header');&lt;/script&gt;&quot; unless @header_red
-          @output.puts &quot;    &lt;script type=\&quot;text/javascript\&quot;&gt;makeYellow('behaviour_#{current_behaviour_number}');&lt;/script&gt;&quot; unless @behaviour_red
+          @output.puts &quot;    &lt;script type=\&quot;text/javascript\&quot;&gt;makeYellow('example_group_#{example_group_number}');&lt;/script&gt;&quot; unless @example_group_red
           move_progress
-          @output.puts &quot;    &lt;dd class=\&quot;spec not_implemented\&quot;&gt;&lt;span class=\&quot;not_implemented_spec_name\&quot;&gt;#{h(example_name)} (PENDING: #{h(message)})&lt;/span&gt;&lt;/dd&gt;&quot;
+          @output.puts &quot;    &lt;dd class=\&quot;spec not_implemented\&quot;&gt;&lt;span class=\&quot;not_implemented_spec_name\&quot;&gt;#{h(example.description)} (PENDING: #{h(message)})&lt;/span&gt;&lt;/dd&gt;&quot;
           @output.flush
         end
 
@@ -91,6 +97,8 @@ module Spec
         # could output links to images or other files produced during the specs.
         #
         def extra_failure_content(failure)
+          require 'spec/runner/formatter/snippet_extractor'
+          @snippet_extractor ||= SnippetExtractor.new
           &quot;    &lt;pre class=\&quot;ruby\&quot;&gt;&lt;code&gt;#{@snippet_extractor.snippet(failure.exception)}&lt;/code&gt;&lt;/pre&gt;&quot;
         end
         
@@ -102,7 +110,7 @@ module Spec
         def percent_done
           result = 100.0
           if @example_count != 0
-            result = ((current_example_number).to_f / @example_count.to_f * 1000).to_i / 10.0
+            result = ((example_number).to_f / @example_count.to_f * 1000).to_i / 10.0
           end
           result
         end
@@ -231,7 +239,7 @@ EOF
   font-size: 1.2em;
 }
 
-.behaviour {
+.example_group {
   margin: 0 10px 5px;
   background: #fff;
 }</diff>
      <filename>vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,5 @@
+require 'spec/runner/formatter/progress_bar_formatter'
+
 module Spec
   module Runner
     module Formatter
@@ -5,40 +7,44 @@ module Spec
         
         def initialize(options, where)
           super
-          @examples = []
+          @example_times = []
         end
         
         def start(count)
           @output.puts &quot;Profiling enabled.&quot;
         end
         
-        def add_example_group(example)
-          @behaviour = example
-        end
-        
         def example_started(example)
           @time = Time.now
         end
         
         def example_passed(example)
           super
-          @examples &lt;&lt; [@behaviour, example, Time.now - @time]
+          @example_times &lt;&lt; [
+            example_group.description,
+            example.description,
+            Time.now - @time
+          ]
         end
         
         def start_dump
           super
           @output.puts &quot;\n\nTop 10 slowest examples:\n&quot;
           
-          @examples = @examples.sort_by do |b, e, t|
-            t
+          @example_times = @example_times.sort_by do |description, example, time|
+            time
           end.reverse
           
-          @examples[0..9].each do |e|
-            @output.print red(sprintf(&quot;%.7f&quot;, e[2]))
-            @output.puts &quot; #{e[0]} #{e[1]}&quot;
+          @example_times[0..9].each do |description, example, time|
+            @output.print red(sprintf(&quot;%.7f&quot;, time))
+            @output.puts &quot; #{description} #{example}&quot;
           end
           @output.flush
         end
+        
+        def method_missing(sym, *args)
+          # ignore
+        end
       end
     end
   end</diff>
      <filename>vendor/plugins/rspec/lib/spec/runner/formatter/profile_formatter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,9 @@
+require 'spec/runner/formatter/base_text_formatter'
+
 module Spec
   module Runner
     module Formatter
       class ProgressBarFormatter &lt; BaseTextFormatter
-        def add_example_group(name)
-        end
-      
         def example_failed(example, counter, failure)
           @output.print colourise('F', failure)
           @output.flush
@@ -15,9 +14,9 @@ module Spec
           @output.flush
         end
       
-        def example_pending(behaviour_name, example_name, message)
+        def example_pending(example, message, pending_caller)
           super
-          @output.print yellow('P')
+          @output.print yellow('*')
           @output.flush
         end
         
@@ -25,6 +24,10 @@ module Spec
           @output.puts
           @output.flush
         end
+        
+        def method_missing(sym, *args)
+          # ignore
+        end
       end
     end
   end</diff>
      <filename>vendor/plugins/rspec/lib/spec/runner/formatter/progress_bar_formatter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,14 @@
+require 'spec/runner/formatter/base_text_formatter'
+
 module Spec
   module Runner
     module Formatter
-      class SpecdocFormatter &lt; BaseTextFormatter      
-        def add_example_group(name)
-          @output.puts
-          @output.puts name
-          @output.flush
+      class SpecdocFormatter &lt; BaseTextFormatter
+        def add_example_group(example_group)
+          super
+          output.puts
+          output.puts example_group.description
+          output.flush
         end
       
         def example_failed(example, counter, failure)
@@ -15,20 +18,20 @@ module Spec
             &quot;- #{example.description} (ERROR - #{counter})&quot;
           end
           
-          @output.puts(failure.expectation_not_met? ? red(message) : magenta(message))
-          @output.flush
+          output.puts(failure.expectation_not_met? ? red(message) : magenta(message))
+          output.flush
         end
         
         def example_passed(example)
           message = &quot;- #{example.description}&quot;
-          @output.puts green(message)
-          @output.flush
+          output.puts green(message)
+          output.flush
         end
         
-        def example_pending(behaviour_name, example_name, message)
+        def example_pending(example, message, pending_caller)
           super
-          @output.puts yellow(&quot;- #{example_name} (PENDING: #{message})&quot;)
-          @output.flush
+          output.puts yellow(&quot;- #{example.description} (PENDING: #{message})&quot;)
+          output.flush
         end
       end
     end</diff>
      <filename>vendor/plugins/rspec/lib/spec/runner/formatter/specdoc_formatter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,5 @@
 require 'erb'
+require 'spec/runner/formatter/base_text_formatter'
 
 module Spec
   module Runner
@@ -7,6 +8,15 @@ module Spec
         class HtmlFormatter &lt; BaseTextFormatter
           include ERB::Util
           
+          def initialize(options, where)
+            super
+            @previous_type = nil
+            @scenario_text = &quot;&quot;
+            @story_text = &quot;&quot;
+            @scenario_failed = false
+            @story_failed = false
+          end
+          
           def run_started(count)
             @output.puts &lt;&lt;-EOF
 &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
@@ -21,8 +31,8 @@ module Spec
     &lt;meta http-equiv=&quot;Pragma&quot; content=&quot;no-cache&quot; /&gt;
     &lt;script src=&quot;javascripts/prototype.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
     &lt;script src=&quot;javascripts/scriptaculous.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
-    &lt;script src=&quot;javascripts/application.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
-    &lt;link href=&quot;stylesheets/style.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
+    &lt;script src=&quot;javascripts/rspec.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+    &lt;link href=&quot;stylesheets/rspec.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
   &lt;/head&gt;
   &lt;body&gt;
     &lt;div id=&quot;container&quot;&gt;
@@ -48,9 +58,9 @@ EOF
           end
           
           def story_started(title, narrative)
-            @output.puts &lt;&lt;-EOF
-      &lt;dl class=&quot;story passed&quot;&gt;
-        &lt;dt&gt;#{h title}&lt;/dt&gt;
+            @story_failed = false
+            @story_text = &lt;&lt;-EOF 
+        &lt;dt&gt;Story: #{h title}&lt;/dt&gt;
         &lt;dd&gt;
           &lt;p&gt;
             #{h(narrative).split(&quot;\n&quot;).join(&quot;&lt;br /&gt;&quot;)}
@@ -58,27 +68,49 @@ EOF
 EOF
           end
 
-          def story_ended(title, narrative)
-            @output.puts &lt;&lt;-EOF
+          def story_ended(title, narrative)     
+            if @story_failed
+              @output.puts &lt;&lt;-EOF
+      &lt;dl class=&quot;story failed&quot;&gt;
+EOF
+            else
+              @output.puts &lt;&lt;-EOF
+      &lt;dl class=&quot;story passed&quot;&gt;
+EOF
+            end
+              @output.puts &lt;&lt;-EOF
+#{@story_text}
         &lt;/dd&gt;
       &lt;/dl&gt;
 EOF
           end
-
+     
           def scenario_started(story_title, scenario_name)
-            @output.puts &lt;&lt;-EOF
-          &lt;dl class=&quot;passed&quot;&gt;
-            &lt;dt&gt;#{h scenario_name}&lt;/dt&gt;
-            &lt;dd&gt;
-              &lt;ul class=&quot;steps&quot;&gt;
+            @previous_type = nil
+            @scenario_failed = false
+            @scenario_text = &lt;&lt;-EOF
+              &lt;dt&gt;Scenario: #{h scenario_name}&lt;/dt&gt;
+              &lt;dd&gt;
+                &lt;ul class=&quot;steps&quot;&gt;
 EOF
           end
 
           def scenario_ended
-            @output.puts &lt;&lt;-EOF
-              &lt;/ul&gt;
-            &lt;/dd&gt;
-          &lt;/dl&gt;
+            if @scenario_failed
+              @story_text += &lt;&lt;-EOF
+            &lt;dl class=&quot;failed&quot;&gt;
+EOF
+            else
+              @story_text += &lt;&lt;-EOF
+            &lt;dl class=&quot;passed&quot;&gt;
+EOF
+            end
+            
+            @story_text += &lt;&lt;-EOF
+#{@scenario_text}
+                &lt;/ul&gt;
+              &lt;/dd&gt;
+            &lt;/dl&gt;
 EOF
           end
           
@@ -94,9 +126,14 @@ EOF
           end
 
           def scenario_failed(story_title, scenario_name, err)
+            @scenario_failed = true
+            @story_failed = true
             scenario_ended
           end
 
+          def step_upcoming(type, description, *args)
+          end
+
           def step_succeeded(type, description, *args)
             print_step('passed', type, description, *args) # TODO: uses succeeded CSS class
           end
@@ -111,11 +148,25 @@ EOF
           
           def print_step(klass, type, description, *args)
             spans = args.map { |arg| &quot;&lt;span class=\&quot;param\&quot;&gt;#{arg}&lt;/span&gt;&quot; }
+            desc_string = description.step_name
+            arg_regexp = description.arg_regexp           
+            inner = if(type == @previous_type)
+              &quot;And &quot;
+            else
+              &quot;#{type.to_s.capitalize} &quot;
+            end
             i = -1
-            inner = type.to_s.capitalize + ' ' + description.gsub(::Spec::Story::Step::PARAM_PATTERN) { |param| spans[i+=1] }
-            @output.puts &quot;                &lt;li class=\&quot;#{klass}\&quot;&gt;#{inner}&lt;/li&gt;&quot;
+            inner += desc_string.gsub(arg_regexp) { |param| spans[i+=1] }
+            
+            @scenario_text += &quot;                  &lt;li class=\&quot;#{klass}\&quot;&gt;#{inner}&lt;/li&gt;\n&quot;
+            
+            if type == :'given scenario'
+              @previous_type = :given
+            else
+              @previous_type = type
+            end
+            
           end
-
         end
       end
     end</diff>
      <filename>vendor/plugins/rspec/lib/spec/runner/formatter/story/html_formatter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,5 @@
+require 'spec/runner/formatter/base_text_formatter'
+
 module Spec
   module Runner
     module Formatter
@@ -7,102 +9,177 @@ module Spec
             super
             @successful_scenario_count = 0
             @pending_scenario_count = 0
+            
+            @pre_story_pending_count = 0
+            @pre_story_successful_count = 0
+            
             @failed_scenarios = []
             @pending_steps = []
-            @previous_type = nil
+            @previous_type = nil 
+            
+            @scenario_body_text = &quot;&quot;
+            @story_body_text = &quot;&quot;
+            
+            @scenario_head_text = &quot;&quot;
+            @story_head_text = &quot;&quot;
+                  
+            @scenario_failed = false
+            @story_failed = false
           end
         
           def run_started(count)
             @count = count
-            @output.puts &quot;Running #@count scenarios:\n&quot;
+            @output.puts &quot;Running #@count scenarios\n\n&quot;
           end
 
           def story_started(title, narrative)
-            @output.puts &quot;Story: #{title}\n\n&quot;
+            @pre_story_pending_count = @pending_scenario_count
+            @pre_story_successful_count = @successful_scenario_count
+            
+            @current_story_title = title
+            @story_failed = false
+            @story_body_text = &quot;&quot;
+            @story_head_text = &quot;Story: #{title}\n\n&quot;
+
             narrative.each_line do |line|
-              @output.print &quot;  &quot;
-              @output.print line
+              @story_head_text += &quot;  &quot;
+              @story_head_text += line
             end
           end
         
           def story_ended(title, narrative)
+            if @story_failed
+              @output.print red(@story_head_text)
+            elsif @pre_story_successful_count == @successful_scenario_count &amp;&amp; 
+                  @pending_scenario_count &gt;= @pre_story_pending_count
+              @output.print yellow(@story_head_text)
+            else              
+              @output.print green(@story_head_text)
+            end
+            @output.print @story_body_text
             @output.puts
             @output.puts
           end
 
           def scenario_started(story_title, scenario_name)
+            @current_scenario_name = scenario_name
             @scenario_already_failed = false
-            @output.print &quot;\n\nScenario: #{scenario_name}&quot;
+            @scenario_head_text = &quot;\n\n  Scenario: #{scenario_name}&quot;
+            @scenario_body_text = &quot;&quot;
             @scenario_ok = true
+            @scenario_pending = false
+            @scenario_failed = false
           end
         
           def scenario_succeeded(story_title, scenario_name)
             @successful_scenario_count += 1
+            scenario_ended
           end
         
           def scenario_failed(story_title, scenario_name, err)
+            @options.backtrace_tweaker.tweak_backtrace(err)
             @failed_scenarios &lt;&lt; [story_title, scenario_name, err] unless @scenario_already_failed
             @scenario_already_failed = true
+            @story_failed = true
+            @scenario_failed = true
+            scenario_ended
           end
         
           def scenario_pending(story_title, scenario_name, msg)
-            @pending_steps &lt;&lt; [story_title, scenario_name, msg]
             @pending_scenario_count += 1 unless @scenario_already_failed
+            @scenario_pending = true
             @scenario_already_failed = true
+            scenario_ended
           end
         
+          def scenario_ended
+            if @scenario_failed
+              @story_body_text += red(@scenario_head_text)
+            elsif @scenario_pending
+              @story_body_text += yellow(@scenario_head_text)
+            else
+              @story_body_text += green(@scenario_head_text)
+            end
+            @story_body_text += @scenario_body_text
+          end
+          
           def run_ended
-            @output.puts &quot;\n\n#@count scenarios: #@successful_scenario_count succeeded, #{@failed_scenarios.size} failed, #@pending_scenario_count pending&quot;
+            summary_text = &quot;#@count scenarios: #@successful_scenario_count succeeded, #{@failed_scenarios.size} failed, #@pending_scenario_count pending&quot;
+            if !@failed_scenarios.empty?
+              @output.puts red(summary_text)
+            elsif !@pending_steps.empty?
+              @output.puts yellow(summary_text)
+            else
+              @output.puts green(summary_text)
+            end
             unless @pending_steps.empty?
               @output.puts &quot;\nPending Steps:&quot;
               @pending_steps.each_with_index do |pending, i|
-                title, scenario_name, msg = pending
-                @output.puts &quot;#{i+1}) #{title} (#{scenario_name}): #{msg}&quot;
+                story_name, scenario_name, msg = pending
+                @output.puts &quot;#{i+1}) #{story_name} (#{scenario_name}): #{msg}&quot;
               end
             end
             unless @failed_scenarios.empty?
               @output.print &quot;\nFAILURES:&quot;
               @failed_scenarios.each_with_index do |failure, i|
                 title, scenario_name, err = failure
-                @output.print %[
-    #{i+1}) #{title} (#{scenario_name}) FAILED
-    #{err.class}: #{err.message}
-    #{err.backtrace.join(&quot;\n&quot;)}
-    ]
+                @output.print &quot;\n    #{i+1}) &quot;
+                @output.print red(&quot;#{title} (#{scenario_name}) FAILED&quot;)
+                @output.print red(&quot;\n    #{err.class}: #{err.message}&quot;)
+                @output.print &quot;\n    #{err.backtrace.join(&quot;\n&quot;)}\n&quot;
               end
-            end
+            end            
           end
-        
+
+          def step_upcoming(type, description, *args)
+          end
+                  
           def step_succeeded(type, description, *args)
-            found_step(type, description, false, *args)
+            found_step(type, description, false, false, *args)
           end
         
           def step_pending(type, description, *args)
-            found_step(type, description, false, *args)
-            @output.print &quot; (PENDING)&quot;
+            found_step(type, description, false, true, *args)
+            @pending_steps &lt;&lt; [@current_story_title, @current_scenario_name, description]
+            @scenario_body_text +=  yellow(&quot; (PENDING)&quot;)
+            @scenario_pending = true
             @scenario_ok = false
           end
         
           def step_failed(type, description, *args)
-            found_step(type, description, true, *args)
-            @output.print red(@scenario_ok ? &quot; (FAILED)&quot; : &quot; (SKIPPED)&quot;)
+            found_step(type, description, true, @scenario_pending, *args)
+            if @scenario_pending
+              @scenario_body_text +=  yellow(&quot; (SKIPPED)&quot;)
+            else
+              @scenario_body_text +=  red(@scenario_ok ? &quot; (FAILED)&quot; : &quot; (SKIPPED)&quot;)
+            end
             @scenario_ok = false
           end
           
           def collected_steps(steps)
           end
+          
+          def method_missing(sym, *args, &amp;block) #:nodoc:
+            # noop - ignore unknown messages
+          end
 
         private
 
-          def found_step(type, description, failed, *args)
+          def found_step(type, description, failed, pending, *args)
+            desc_string = description.step_name
+            arg_regexp = description.arg_regexp
             text = if(type == @previous_type)
-              &quot;\n  And &quot;
+              &quot;\n    And &quot;
             else
-              &quot;\n\n  #{type.to_s.capitalize} &quot;
+              &quot;\n\n    #{type.to_s.capitalize} &quot;
             end
             i = -1
-            text &lt;&lt; description.gsub(::Spec::Story::Step::PARAM_PATTERN) { |param| args[i+=1] }
-            @output.print(failed ? red(text) : green(text))
+            text &lt;&lt; desc_string.gsub(arg_regexp) { |param| args[i+=1] }
+            if pending
+              @scenario_body_text += yellow(text)
+            else
+              @scenario_body_text += (failed ? red(text) : green(text))
+            end
 
             if type == :'given scenario'
               @previous_type = :given</diff>
      <filename>vendor/plugins/rspec/lib/spec/runner/formatter/story/plain_text_formatter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,7 +13,7 @@ module Spec
         @heckle_class = heckle_class
       end
       
-      # Runs all the behaviours held by +rspec_options+ once for each of the
+      # Runs all the example groups held by +rspec_options+ once for each of the
       # methods in the matched classes.
       def heckle_with
         if @filter =~ /(.*)[#\.](.*)/
@@ -25,7 +25,7 @@ module Spec
       
       def heckle_method(class_name, method_name)
         verify_constant(class_name)
-        heckle = @heckle_class.new(class_name, method_name, rspec_options)
+        heckle = @heckle_class.new(class_name, method_name, Spec::Runner.options)
         heckle.validate
       end
       
@@ -39,7 +39,7 @@ module Spec
         
         classes.each do |klass|
           klass.instance_methods(false).each do |method_name|
-            heckle = @heckle_class.new(klass.name, method_name, rspec_options)
+            heckle = @heckle_class.new(klass.name, method_name, Spec::Runner.options)
             heckle.validate
           end
         end</diff>
      <filename>vendor/plugins/rspec/lib/spec/runner/heckle_runner.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,18 +4,20 @@ require 'stringio'
 module Spec
   module Runner
     class OptionParser &lt; ::OptionParser
-      class &lt;&lt; self
-        def parse(args, err, out)
-          parser = new(err, out)
-          parser.parse(args)
-          parser.options
-        end
+      def self.parse(args, err, out)
+        parser = new(err, out)
+        parser.parse(args)
+        parser.options
       end
 
       attr_reader :options
 
       OPTIONS = {
-        :diff =&gt;    [&quot;-D&quot;, &quot;--diff [FORMAT]&quot;, &quot;Show diff of objects that are expected to be equal when they are not&quot;,
+        :pattern =&gt; [&quot;-p&quot;, &quot;--pattern [PATTERN]&quot;,&quot;Limit files loaded to those matching this pattern. Defaults to '**/*_spec.rb'&quot;,
+                                                 &quot;Separate multiple patterns with commas.&quot;,
+                                                 &quot;Applies only to directories named on the command line (files&quot;,
+                                                 &quot;named explicitly on the command line will be loaded regardless).&quot;],
+        :diff =&gt;    [&quot;-D&quot;, &quot;--diff [FORMAT]&quot;,&quot;Show diff of objects that are expected to be equal when they are not&quot;,
                                              &quot;Builtin formats: unified|u|context|c&quot;,
                                              &quot;You can also specify a custom differ class&quot;,
                                              &quot;(in which case you should also specify --require)&quot;],
@@ -30,32 +32,38 @@ module Spec
                                                           &quot;an example name directly, causing RSpec to run just the example&quot;,
                                                           &quot;matching that name&quot;],
         :specification =&gt; [&quot;-s&quot;, &quot;--specification [NAME]&quot;, &quot;DEPRECATED - use -e instead&quot;, &quot;(This will be removed when autotest works with -e)&quot;],
-        :line =&gt; [&quot;-l&quot;, &quot;--line LINE_NUMBER&quot;, Integer, &quot;Execute behaviout or specification at given line.&quot;,
-                                                       &quot;(does not work for dynamically generated specs)&quot;],
-        :format =&gt; [&quot;-f&quot;, &quot;--format FORMAT[:WHERE]&quot;,  &quot;Specifies what format to use for output. Specify WHERE to tell&quot;,
+        :line =&gt; [&quot;-l&quot;, &quot;--line LINE_NUMBER&quot;, Integer, &quot;Execute example group or example at given line.&quot;,
+                                                       &quot;(does not work for dynamically generated examples)&quot;],
+        :format =&gt; [&quot;-f&quot;, &quot;--format FORMAT[:WHERE]&quot;,&quot;Specifies what format to use for output. Specify WHERE to tell&quot;,
                                                     &quot;the formatter where to write the output. All built-in formats&quot;,
-                                                    &quot;expect WHERE to be a file name, and will write to STDOUT if it's&quot;,
+                                                    &quot;expect WHERE to be a file name, and will write to $stdout if it's&quot;,
                                                     &quot;not specified. The --format option may be specified several times&quot;,
                                                     &quot;if you want several outputs&quot;,
                                                     &quot; &quot;,
-                                                    &quot;Builtin formats: &quot;,
-                                                    &quot;progress|p           : Text progress&quot;,
-                                                    &quot;profile|o            : Text progress with profiling of 10 slowest examples&quot;,
-                                                    &quot;specdoc|s            : Example doc as text&quot;,
-                                                    &quot;html|h               : A nice HTML report&quot;,
-                                                    &quot;failing_examples|e   : Write all failing examples - input for --example&quot;,
-                                                    &quot;failing_behaviours|b : Write all failing behaviours - input for --example&quot;,
+                                                    &quot;Builtin formats for code examples:&quot;,
+                                                    &quot;progress|p               : Text-based progress bar&quot;,
+                                                    &quot;profile|o                : Text-based progress bar with profiling of 10 slowest examples&quot;,
+                                                    &quot;specdoc|s                : Code example doc strings&quot;,
+                                                    &quot;nested|n                 : Code example doc strings with nested groups intented&quot;,
+                                                    &quot;html|h                   : A nice HTML report&quot;,
+                                                    &quot;failing_examples|e       : Write all failing examples - input for --example&quot;,
+                                                    &quot;failing_example_groups|g : Write all failing example groups - input for --example&quot;,
+                                                    &quot; &quot;,
+                                                    &quot;Builtin formats for stories:&quot;,
+                                                    &quot;plain|p                  : Plain Text&quot;,
+                                                    &quot;html|h                   : A nice HTML report&quot;,
+                                                    &quot;progress|r               : Text progress&quot;,
                                                     &quot; &quot;,
                                                     &quot;FORMAT can also be the name of a custom formatter class&quot;,
                                                     &quot;(in which case you should also specify --require to load it)&quot;],
         :require =&gt; [&quot;-r&quot;, &quot;--require FILE&quot;, &quot;Require FILE before running specs&quot;,
-                                          &quot;Useful for loading custom formatters or other extensions.&quot;,
-                                          &quot;If this option is used it must come before the others&quot;],
+                                             &quot;Useful for loading custom formatters or other extensions.&quot;,
+                                             &quot;If this option is used it must come before the others&quot;],
         :backtrace =&gt; [&quot;-b&quot;, &quot;--backtrace&quot;, &quot;Output full backtrace&quot;],
         :loadby =&gt; [&quot;-L&quot;, &quot;--loadby STRATEGY&quot;, &quot;Specify the strategy by which spec files should be loaded.&quot;,
-                                              &quot;STRATEGY can currently only be 'mtime' (File modification time)&quot;,
-                                              &quot;By default, spec files are loaded in alphabetical order if --loadby&quot;,
-                                              &quot;is not specified.&quot;],
+                                               &quot;STRATEGY can currently only be 'mtime' (File modification time)&quot;,
+                                               &quot;By default, spec files are loaded in alphabetical order if --loadby&quot;,
+                                               &quot;is not specified.&quot;],
         :reverse =&gt; [&quot;-R&quot;, &quot;--reverse&quot;, &quot;Run examples in reverse order&quot;],
         :timeout =&gt; [&quot;-t&quot;, &quot;--timeout FLOAT&quot;, &quot;Interrupt and fail each example that doesn't complete in the&quot;,
                                               &quot;specified time&quot;],
@@ -80,37 +88,35 @@ module Spec
         @out_stream = out
         @options = Options.new(@error_stream, @out_stream)
 
-        @spec_parser = SpecParser.new
         @file_factory = File
 
         self.banner = &quot;Usage: spec (FILE|DIRECTORY|GLOB)+ [options]&quot;
         self.separator &quot;&quot;
-        on(*OPTIONS[:diff]) {|diff| @options.parse_diff(diff)}
-        on(*OPTIONS[:colour]) {@options.colour = true}
-        on(*OPTIONS[:example]) {|example| @options.parse_example(example)}
-        on(*OPTIONS[:specification]) {|example| @options.parse_example(example)}
-        on(*OPTIONS[:line]) {|line_number| @options.line_number = line_number.to_i}
-        on(*OPTIONS[:format]) {|format| @options.parse_format(format)}
-        on(*OPTIONS[:require]) {|requires| invoke_requires(requires)}
-        on(*OPTIONS[:backtrace]) {@options.backtrace_tweaker = NoisyBacktraceTweaker.new}
-        on(*OPTIONS[:loadby]) {|loadby| @options.loadby = loadby}
-        on(*OPTIONS[:reverse]) {@options.reverse = true}
-        on(*OPTIONS[:timeout]) {|timeout| @options.timeout = timeout.to_f}
-        on(*OPTIONS[:heckle]) {|heckle| @options.load_heckle_runner(heckle)}
-        on(*OPTIONS[:dry_run]) {@options.dry_run = true}
-        on(*OPTIONS[:options_file]) {|options_file| parse_options_file(options_file)}
-        on(*OPTIONS[:generate_options]) do |options_file|
-        end
-        on(*OPTIONS[:runner]) do |runner|
-          @options.user_input_for_runner = runner
-        end
-        on(*OPTIONS[:drb]) {}
-        on(*OPTIONS[:version]) {parse_version}
-        on_tail(*OPTIONS[:help]) {parse_help}
+        on(*OPTIONS[:pattern])          {|pattern| @options.filename_pattern = pattern}
+        on(*OPTIONS[:diff])             {|diff| @options.parse_diff(diff)}
+        on(*OPTIONS[:colour])           {@options.colour = true}
+        on(*OPTIONS[:example])          {|example| @options.parse_example(example)}
+        on(*OPTIONS[:specification])    {|example| @options.parse_example(example)}
+        on(*OPTIONS[:line])             {|line_number| @options.line_number = line_number.to_i}
+        on(*OPTIONS[:format])           {|format| @options.parse_format(format)}
+        on(*OPTIONS[:require])          {|requires| invoke_requires(requires)}
+        on(*OPTIONS[:backtrace])        {@options.backtrace_tweaker = NoisyBacktraceTweaker.new}
+        on(*OPTIONS[:loadby])           {|loadby| @options.loadby = loadby}
+        on(*OPTIONS[:reverse])          {@options.reverse = true}
+        on(*OPTIONS[:timeout])          {|timeout| @options.timeout = timeout.to_f}
+        on(*OPTIONS[:heckle])           {|heckle| @options.load_heckle_runner(heckle)}
+        on(*OPTIONS[:dry_run])          {@options.dry_run = true}
+        on(*OPTIONS[:options_file])     {|options_file| parse_options_file(options_file)}
+        on(*OPTIONS[:generate_options]) {|options_file|}
+        on(*OPTIONS[:runner])           {|runner|  @options.user_input_for_runner = runner}
+        on(*OPTIONS[:drb])              {}
+        on(*OPTIONS[:version])          {parse_version}
+        on_tail(*OPTIONS[:help])        {parse_help}
       end
 
       def order!(argv, &amp;blk)
-        @argv = argv
+        @argv = argv.dup
+        @argv = (@argv.empty? &amp;&amp; Spec.spec_command?) ? ['--help'] : @argv 
         @options.argv = @argv.dup
         return if parse_generate_options
         return if parse_drb
@@ -120,13 +126,9 @@ module Spec
           blk.call(file) if blk
         end
 
-        if @options.line_number
-          set_spec_from_line_number
-        end
-
         @options
       end
-
+      
       protected
       def invoke_requires(requires)
         requires.split(&quot;,&quot;).each do |file|
@@ -137,6 +139,10 @@ module Spec
       def parse_options_file(options_file)
         option_file_args = IO.readlines(options_file).map {|l| l.chomp.split &quot; &quot;}.flatten
         @argv.push(*option_file_args)
+        # TODO - this is a brute force solution to http://rspec.lighthouseapp.com/projects/5645/tickets/293.
+        # Let's look for a cleaner way. Might not be one. But let's look. If not, perhaps
+        # this can be moved to a different method to indicate the special handling for drb?
+        parse_drb(@argv)
       end
 
       def parse_generate_options
@@ -166,12 +172,12 @@ module Spec
         @options.examples_should_not_be_run
       end
 
-      def parse_drb
+      def parse_drb(argv = nil)
+        argv ||= @options.argv # TODO - see note about about http://rspec.lighthouseapp.com/projects/5645/tickets/293
         is_drb = false
-        argv = @options.argv
         is_drb ||= argv.delete(OPTIONS[:drb][0])
         is_drb ||= argv.delete(OPTIONS[:drb][1])
-        return nil unless is_drb
+        return false unless is_drb
         @options.examples_should_not_be_run
         DrbCommandLine.run(
           self.class.parse(argv, @error_stream, @out_stream)
@@ -180,7 +186,7 @@ module Spec
       end
 
       def parse_version
-        @out_stream.puts ::Spec::VERSION::DESCRIPTION
+        @out_stream.puts ::Spec::VERSION::SUMMARY
         exit if stdout?
       end
 
@@ -189,37 +195,9 @@ module Spec
         exit if stdout?
       end      
 
-      def set_spec_from_line_number
-        if @options.examples.empty?
-          if @options.files.length == 1
-            if @file_factory.file?(@options.files[0])
-              source = @file_factory.open(@options.files[0])
-              example = @spec_parser.spec_name_for(source, @options.line_number)
-              @options.parse_example(example)
-            elsif @file_factory.directory?(@options.files[0])
-              @error_stream.puts &quot;You must specify one file, not a directory when using the --line option&quot;
-              exit(1) if stderr?
-            else
-              @error_stream.puts &quot;#{@options.files[0]} does not exist&quot;
-              exit(2) if stderr?
-            end
-          else
-            @error_stream.puts &quot;Only one file can be specified when using the --line option: #{@options.files.inspect}&quot;
-            exit(3) if stderr?
-          end
-        else
-          @error_stream.puts &quot;You cannot use both --line and --example&quot;
-          exit(4) if stderr?
-        end
-      end
-
       def stdout?
         @out_stream == $stdout
       end
-
-      def stderr?
-        @error_stream == $stderr
-      end
     end
   end
 end</diff>
      <filename>vendor/plugins/rspec/lib/spec/runner/option_parser.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,29 +5,36 @@ module Spec
         'mtime' =&gt; lambda {|file_a, file_b| File.mtime(file_b) &lt;=&gt; File.mtime(file_a)}
       }
 
-      EXAMPLE_FORMATTERS = {
-        'specdoc'  =&gt; Formatter::SpecdocFormatter,
-        's'        =&gt; Formatter::SpecdocFormatter,
-        'html'     =&gt; Formatter::HtmlFormatter,
-        'h'        =&gt; Formatter::HtmlFormatter,
-        'progress' =&gt; Formatter::ProgressBarFormatter,
-        'p'        =&gt; Formatter::ProgressBarFormatter,
-        'failing_examples' =&gt; Formatter::FailingExamplesFormatter,
-        'e'        =&gt; Formatter::FailingExamplesFormatter,
-        'failing_behaviours' =&gt; Formatter::FailingBehavioursFormatter,
-        'b'        =&gt; Formatter::FailingBehavioursFormatter,
-        'profile'  =&gt; Formatter::ProfileFormatter,
-        'o'        =&gt; Formatter::ProfileFormatter,
-        'textmate' =&gt; Formatter::TextMateFormatter,
+      EXAMPLE_FORMATTERS = { # Load these lazily for better speed
+               'specdoc' =&gt; ['spec/runner/formatter/specdoc_formatter',                'Formatter::SpecdocFormatter'],
+                     's' =&gt; ['spec/runner/formatter/specdoc_formatter',                'Formatter::SpecdocFormatter'],
+                'nested' =&gt; ['spec/runner/formatter/nested_text_formatter',            'Formatter::NestedTextFormatter'],
+                     'n' =&gt; ['spec/runner/formatter/nested_text_formatter',            'Formatter::NestedTextFormatter'],
+                  'html' =&gt; ['spec/runner/formatter/html_formatter',                   'Formatter::HtmlFormatter'],
+                     'h' =&gt; ['spec/runner/formatter/html_formatter',                   'Formatter::HtmlFormatter'],
+              'progress' =&gt; ['spec/runner/formatter/progress_bar_formatter',           'Formatter::ProgressBarFormatter'],
+                     'p' =&gt; ['spec/runner/formatter/progress_bar_formatter',           'Formatter::ProgressBarFormatter'],
+      'failing_examples' =&gt; ['spec/runner/formatter/failing_examples_formatter',       'Formatter::FailingExamplesFormatter'],
+                     'e' =&gt; ['spec/runner/formatter/failing_examples_formatter',       'Formatter::FailingExamplesFormatter'],
+'failing_example_groups' =&gt; ['spec/runner/formatter/failing_example_groups_formatter', 'Formatter::FailingExampleGroupsFormatter'],
+                     'g' =&gt; ['spec/runner/formatter/failing_example_groups_formatter', 'Formatter::FailingExampleGroupsFormatter'],
+               'profile' =&gt; ['spec/runner/formatter/profile_formatter',                'Formatter::ProfileFormatter'],
+                     'o' =&gt; ['spec/runner/formatter/profile_formatter',                'Formatter::ProfileFormatter'],
+              'textmate' =&gt; ['spec/runner/formatter/text_mate_formatter',              'Formatter::TextMateFormatter']
       }
 
       STORY_FORMATTERS = {
-        'plain' =&gt; Formatter::Story::PlainTextFormatter,
-        'html'  =&gt; Formatter::Story::HtmlFormatter,
-        'h'     =&gt; Formatter::Story::HtmlFormatter
+        'plain' =&gt; ['spec/runner/formatter/story/plain_text_formatter',   'Formatter::Story::PlainTextFormatter'],
+            'p' =&gt; ['spec/runner/formatter/story/plain_text_formatter',   'Formatter::Story::PlainTextFormatter'],
+         'html' =&gt; ['spec/runner/formatter/story/html_formatter',         'Formatter::Story::HtmlFormatter'],
+            'h' =&gt; ['spec/runner/formatter/story/html_formatter',         'Formatter::Story::HtmlFormatter'],
+     'progress' =&gt; ['spec/runner/formatter/story/progress_bar_formatter', 'Formatter::Story::ProgressBarFormatter'],
+            'r' =&gt; ['spec/runner/formatter/story/progress_bar_formatter', 'Formatter::Story::ProgressBarFormatter']
+            
       }
 
       attr_accessor(
+        :filename_pattern,
         :backtrace_tweaker,
         :context_lines,
         :diff_format,
@@ -44,14 +51,17 @@ module Spec
         :user_input_for_runner,
         :error_stream,
         :output_stream,
+        :before_suite_parts,
+        :after_suite_parts,
         # TODO: BT - Figure out a better name
         :argv
       )
       attr_reader :colour, :differ_class, :files, :example_groups
-
+      
       def initialize(error_stream, output_stream)
         @error_stream = error_stream
         @output_stream = output_stream
+        @filename_pattern = &quot;**/*_spec.rb&quot;
         @backtrace_tweaker = QuietBacktraceTweaker.new
         @examples = []
         @colour = false
@@ -62,8 +72,12 @@ module Spec
         @diff_format  = :unified
         @files = []
         @example_groups = []
-        @user_input_for_runner = nil
+        @result = nil
         @examples_run = false
+        @examples_should_be_run = nil
+        @user_input_for_runner = nil
+        @before_suite_parts = []
+        @after_suite_parts = []
       end
 
       def add_example_group(example_group)
@@ -76,16 +90,37 @@ module Spec
 
       def run_examples
         return true unless examples_should_be_run?
-        runner = custom_runner || ExampleGroupRunner.new(self)
+        success = true
+        begin
+          runner = custom_runner || ExampleGroupRunner.new(self)
 
-        runner.load_files(files_to_load)
-        if example_groups.empty?
-          true
-        else
-          success = runner.run
-          @examples_run = true
-          heckle if heckle_runner
-          success
+          unless @files_loaded
+            runner.load_files(files_to_load)
+            @files_loaded = true
+          end
+
+          # TODO - this has to happen after the files get loaded,
+          # otherwise the before_suite_parts are not populated
+          # from the configuration. There is no spec for this
+          # directly, but stories/configuration/before_blocks.story
+          # will fail if this happens before the files are loaded.
+          before_suite_parts.each do |part|
+            part.call
+          end
+
+          if example_groups.empty?
+            true
+          else
+            set_spec_from_line_number if line_number
+            success = runner.run
+            @examples_run = true
+            heckle if heckle_runner
+            success
+          end
+        ensure
+          after_suite_parts.each do |part|
+            part.call(success)
+          end
         end
       end
 
@@ -99,10 +134,16 @@ module Spec
 
       def colour=(colour)
         @colour = colour
-        begin; \
-          require 'Win32/Console/ANSI' if @colour &amp;&amp; PLATFORM =~ /win32/; \
-        rescue LoadError ; \
-          raise &quot;You must gem install win32console to use colour on Windows&quot; ; \
+        if @colour &amp;&amp; RUBY_PLATFORM =~ /mswin|mingw/ ;\
+          begin ;\
+            replace_output = @output_stream.equal?($stdout) ;\
+            require 'rubygems' ;\
+            require 'Win32/Console/ANSI' ;\
+            @output_stream = $stdout if replace_output ;\
+          rescue LoadError ;\
+            warn &quot;You must 'gem install win32console' to use colour on Windows&quot; ;\
+            @colour = false ;\
+          end
         end
       end
 
@@ -141,16 +182,22 @@ module Spec
       
       def formatters
         @format_options ||= [['progress', @output_stream]]
-        @formatters ||= @format_options.map do |format, where|
-          formatter_type = EXAMPLE_FORMATTERS[format] || load_class(format, 'formatter', '--format')
-          formatter_type.new(self, where)
-        end
+        @formatters ||= load_formatters(@format_options, EXAMPLE_FORMATTERS)
       end
 
       def story_formatters
         @format_options ||= [['plain', @output_stream]]
-        @story_formatters ||= @format_options.map do |format, where|
-          formatter_type = STORY_FORMATTERS[format] || load_class(format, 'formatter', '--format')
+        @formatters ||= load_formatters(@format_options, STORY_FORMATTERS)
+      end
+      
+      def load_formatters(format_options, formatters)
+        format_options.map do |format, where|
+          formatter_type = if formatters[format]
+            require formatters[format][0]
+            eval(formatters[format][1], binding, __FILE__, __LINE__)
+          else
+            load_class(format, 'formatter', '--format')
+          end
           formatter_type.new(self, where)
         end
       end
@@ -162,11 +209,29 @@ module Spec
       end
 
       def number_of_examples
-        @example_groups.inject(0) do |sum, example_group|
-          sum + example_group.number_of_examples
+        total = 0
+        @example_groups.each do |example_group|
+          total += example_group.number_of_examples
         end
+        total
       end
 
+      def files_to_load
+        result = []
+        sorted_files.each do |file|
+          if File.directory?(file)
+            filename_pattern.split(&quot;,&quot;).each do |pattern|
+              result += Dir[File.expand_path(&quot;#{file}/#{pattern.strip}&quot;)]
+            end
+          elsif File.file?(file)
+            result &lt;&lt; file
+          else
+            raise &quot;File or directory not found: #{file}&quot;
+          end
+        end
+        result
+      end
+      
       protected
       def examples_should_be_run?
         return @examples_should_be_run unless @examples_should_be_run.nil?
@@ -197,20 +262,6 @@ module Spec
         end
       end
       
-      def files_to_load
-        result = []
-        sorted_files.each do |file|
-          if test ?d, file
-            result += Dir[File.expand_path(&quot;#{file}/**/*.rb&quot;)]
-          elsif test ?f, file
-            result &lt;&lt; file
-          else
-            raise &quot;File or directory not found: #{file}&quot;
-          end
-        end
-        result
-      end
-      
       def custom_runner
         return nil unless custom_runner?
         klass_name, arg = ClassAndArgumentsParser.parse(user_input_for_runner)
@@ -223,9 +274,9 @@ module Spec
       end
       
       def heckle
-        returns = self.heckle_runner.heckle_with
+        heckle_runner = self.heckle_runner
         self.heckle_runner = nil
-        returns
+        heckle_runner.heckle_with
       end
       
       def sorted_files
@@ -240,6 +291,30 @@ module Spec
         require 'spec/expectations/differs/default'
         self.differ_class = Spec::Expectations::Differs::Default
       end
+
+      def set_spec_from_line_number
+        if examples.empty?
+          if files.length == 1
+            if File.directory?(files[0])
+              error_stream.puts &quot;You must specify one file, not a directory when using the --line option&quot;
+              exit(1) if stderr?
+            else
+              example = SpecParser.new.spec_name_for(files[0], line_number)
+              @examples = [example]
+            end
+          else
+            error_stream.puts &quot;Only one file can be specified when using the --line option: #{files.inspect}&quot;
+            exit(3) if stderr?
+          end
+        else
+          error_stream.puts &quot;You cannot use both --line and --example&quot;
+          exit(4) if stderr?
+        end
+      end
+
+      def stderr?
+        @error_stream == $stderr
+      end
     end
   end
 end</diff>
      <filename>vendor/plugins/rspec/lib/spec/runner/options.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 module Spec
   module Runner
     class Reporter
-      attr_reader :options
+      attr_reader :options, :example_groups
       
       def initialize(options)
         @options = options
@@ -9,26 +9,38 @@ module Spec
         clear
       end
       
-      def add_example_group(name)
-        formatters.each{|f| f.add_example_group(name)}
-        @example_group_names &lt;&lt; name
+      def add_example_group(example_group)
+        formatters.each do |f|
+          f.add_example_group(example_group)
+        end
+        example_groups &lt;&lt; example_group
       end
       
       def example_started(example)
         formatters.each{|f| f.example_started(example)}
       end
       
-      def example_finished(example, error=nil, failure_location=nil, pending=false)
+      def example_finished(example, error=nil)
         @examples &lt;&lt; example
         
         if error.nil?
           example_passed(example)
         elsif Spec::Example::ExamplePendingError === error
-          example_pending(@example_group_names.last, example, error.message)
+          example_pending(example, error.pending_caller, error.message)
         else
-          example_failed(example, error, failure_location)
+          example_failed(example, error)
+        end
+      end
+
+      def failure(example, error)
+        backtrace_tweaker.tweak_backtrace(error)
+        failure = Failure.new(example, error)
+        @failures &lt;&lt; failure
+        formatters.each do |f|
+          f.example_failed(example, @failures.length, failure)
         end
       end
+      alias_method :example_failed, :failure
 
       def start(number_of_examples)
         clear
@@ -63,7 +75,7 @@ module Spec
       end
   
       def clear
-        @example_group_names = []
+        @example_groups = []
         @failures = []
         @pending_count = 0
         @examples = []
@@ -78,6 +90,7 @@ module Spec
           index + 1
         end
       end
+
       def dump_pending
         formatters.each{|f| f.dump_pending}
       end
@@ -87,38 +100,52 @@ module Spec
         return &quot;0.0&quot;
       end
       
-      def example_passed(name)
-        formatters.each{|f| f.example_passed(name)}
+      def example_passed(example)
+        formatters.each{|f| f.example_passed(example)}
       end
 
-      def example_failed(name, error, failure_location)
-        backtrace_tweaker.tweak_backtrace(error, failure_location)
-        example_name = &quot;#{@example_group_names.last} #{name}&quot;
-        failure = Failure.new(example_name, error)
-        @failures &lt;&lt; failure
-        formatters.each{|f| f.example_failed(name, @failures.length, failure)}
-      end
+      EXAMPLE_PENDING_DEPRECATION_WARNING = &lt;&lt;-WARNING
+        DEPRECATION NOTICE: RSpec's formatters have changed example_pending
+        to accept three arguments instead of just two. Please see the rdoc
+        for Spec::Runner::Formatter::BaseFormatter#example_pending
+        for more information.
+          
+        Please update any custom formatters to accept the third argument
+        to example_pending. Support for example_pending with two arguments
+        and this warning message will be removed after the RSpec 1.1.5 release.
+      WARNING
       
-      def example_pending(behaviour_name, example_name, message=&quot;Not Yet Implemented&quot;)
+      def example_pending(example, pending_caller, message=&quot;Not Yet Implemented&quot;)
         @pending_count += 1
-        formatters.each{|f| f.example_pending(behaviour_name, example_name, message)}
+        formatters.each do |formatter|
+          if formatter_uses_deprecated_example_pending_method?(formatter)
+            Kernel.warn EXAMPLE_PENDING_DEPRECATION_WARNING
+            formatter.example_pending(example, message)
+          else
+            formatter.example_pending(example, message, pending_caller)
+          end
+        end
+      end
+      
+      def formatter_uses_deprecated_example_pending_method?(formatter)
+        formatter.method(:example_pending).arity == 2
       end
       
       class Failure
-        attr_reader :exception
+        attr_reader :example, :exception
         
-        def initialize(example_name, exception)
-          @example_name = example_name
+        def initialize(example, exception)
+          @example = example
           @exception = exception
         end
 
         def header
           if expectation_not_met?
-            &quot;'#{@example_name}' FAILED&quot;
+            &quot;'#{example_name}' FAILED&quot;
           elsif pending_fixed?
-            &quot;'#{@example_name}' FIXED&quot;
+            &quot;'#{example_name}' FIXED&quot;
           else
-            &quot;#{@exception.class.name} in '#{@example_name}'&quot;
+            &quot;#{@exception.class.name} in '#{example_name}'&quot;
           end
         end
         
@@ -130,6 +157,10 @@ module Spec
           @exception.is_a?(Spec::Expectations::ExpectationNotMetError)
         end
 
+        protected
+        def example_name
+          @example.full_description
+        end
       end
     end
   end</diff>
      <filename>vendor/plugins/rspec/lib/spec/runner/reporter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,14 +2,28 @@ module Spec
   module Runner
     # Parses a spec file and finds the nearest example for a given line number.
     class SpecParser
-      def spec_name_for(io, line_number)
-        source  = io.read
-        behaviour, behaviour_line = behaviour_at_line(source, line_number)
-        example, example_line = example_at_line(source, line_number)
-        if behaviour &amp;&amp; example &amp;&amp; (behaviour_line &lt; example_line)
-          &quot;#{behaviour} #{example}&quot;
-        elsif behaviour
-          behaviour
+      attr_reader :best_match
+
+      def initialize
+        @best_match = {}
+      end
+
+      def spec_name_for(file, line_number)
+        best_match.clear
+        file = File.expand_path(file)
+        Spec::Runner.options.example_groups.each do |example_group|
+          consider_example_group_for_best_match example_group, file, line_number
+
+          example_group.examples.each do |example|
+            consider_example_for_best_match example, example_group, file, line_number
+          end
+        end
+        if best_match[:example_group]
+          if best_match[:example]
+            &quot;#{best_match[:example_group].description} #{best_match[:example].description}&quot;
+          else
+            best_match[:example_group].description
+          end
         else
           nil
         end
@@ -17,36 +31,41 @@ module Spec
 
     protected
 
-      def behaviour_at_line(source, line_number)
-        find_above(source, line_number, /^\s*(context|describe)\s+(.*)\s+do/)
-      end
-
-      def example_at_line(source, line_number)
-        find_above(source, line_number, /^\s*(specify|it)\s+(.*)\s+do/)
+      def consider_example_group_for_best_match(example_group, file, line_number)
+        parsed_backtrace = parse_backtrace(example_group.backtrace)
+        parsed_backtrace.each do |example_file, example_line|
+          if is_best_match?(file, line_number, example_file, example_line)
+            best_match.clear
+            best_match[:example_group] = example_group
+            best_match[:line] = example_line
+          end
+        end
       end
 
-      # Returns the context/describe or specify/it name and the line number
-      def find_above(source, line_number, pattern)
-        lines_above_reversed(source, line_number).each_with_index do |line, n|
-          return [parse_description($2), line_number-n] if line =~ pattern
+      def consider_example_for_best_match(example, example_group, file, line_number)
+        parsed_backtrace = parse_backtrace(example.backtrace)
+        parsed_backtrace.each do |example_file, example_line|
+          if is_best_match?(file, line_number, example_file, example_line)
+            best_match.clear
+            best_match[:example_group] = example_group
+            best_match[:example] = example
+            best_match[:line] = example_line
+          end
         end
-        nil
       end
 
-      def lines_above_reversed(source, line_number)
-        lines = source.split(&quot;\n&quot;)
-        lines[0...line_number].reverse
+      def is_best_match?(file, line_number, example_file, example_line)
+        file == File.expand_path(example_file) &amp;&amp;
+        example_line &lt;= line_number &amp;&amp;
+        example_line &gt; best_match[:line].to_i
       end
-      
-      def parse_description(str)
-        return str[1..-2] if str =~ /^['&quot;].*['&quot;]$/
-        if matches = /^['&quot;](.*)['&quot;](,.*)?$/.match(str)
-          return ::Spec::Example::ExampleGroupDescription.generate_description(matches[1])
-        end
-        if matches = /^(.*)\s*,\s*['&quot;](.*)['&quot;](,.*)?$/.match(str)
-          return ::Spec::Example::ExampleGroupDescription.generate_description(matches[1], matches[2])
+
+      def parse_backtrace(backtrace)
+        Array(backtrace).collect do |trace_line|
+          trace_line =~ /(.*)\:(\d*)(\:|$)/
+          file, number = $1, $2
+          [file, Integer(number)]
         end
-        return str
       end
     end
   end</diff>
      <filename>vendor/plugins/rspec/lib/spec/runner/spec_parser.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,4 @@
+require 'spec'
 require 'spec/story/extensions'
 require 'spec/story/given_scenario'
 require 'spec/story/runner'</diff>
      <filename>vendor/plugins/rspec/lib/spec/story.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1 +1,3 @@
 require 'spec/story/extensions/main'
+require 'spec/story/extensions/string'
+require 'spec/story/extensions/regexp'</diff>
      <filename>vendor/plugins/rspec/lib/spec/story/extensions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,12 +1,12 @@
 module Spec
   module Story
     class GivenScenario
-      def initialize name
+      def initialize(name)
         @name = name
       end
       
       def perform(instance, ignore_name)
-        scenario = Runner::StoryRunner.scenario_from_current_story @name
+        scenario = Runner::StoryRunner.scenario_from_current_story(@name)
         Runner::ScenarioRunner.new.run(scenario, instance)
       end
     end</diff>
      <filename>vendor/plugins/rspec/lib/spec/story/given_scenario.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,51 +8,50 @@ require 'spec/story/runner/plain_text_story_runner.rb'
 module Spec
   module Story
     module Runner
-      class &lt;&lt; self
-        def run_options # :nodoc:
-          @run_options ||= ::Spec::Runner::OptionParser.parse(ARGV, $stderr, $stdout)
-        end
-        
-        def story_runner # :nodoc:
-          unless @story_runner
-            @story_runner = StoryRunner.new(scenario_runner, world_creator)
-            run_options.story_formatters.each do |formatter|
-              register_listener(formatter)
-            end
-            Runner.register_exit_hook
-          end
-          @story_runner
-        end
-        
-        def scenario_runner # :nodoc:
-          @scenario_runner ||= ScenarioRunner.new
-        end
-        
-        def world_creator # :nodoc:
-          @world_creator ||= World
-        end
-        
-        # Use this to register a customer output formatter.
-        def register_listener(listener)
-          story_runner.add_listener(listener) # run_started, story_started, story_ended, #run_ended
-          world_creator.add_listener(listener) # found_scenario, step_succeeded, step_failed, step_failed
-          scenario_runner.add_listener(listener) # scenario_started, scenario_succeeded, scenario_pending, scenario_failed
-        end
-        
-        def register_exit_hook # :nodoc:
-          # TODO - when story runner uses test/unit runners like example runner does we can kill
-          # this and also the assorted Kernel.stub!(:at_exit) in examples
-          at_exit do
-            Runner.story_runner.run_stories unless $!
+      def self.run_options # :nodoc:
+        Spec::Runner.options
+      end
+      
+      def self.story_runner # :nodoc:
+        unless @story_runner
+          @story_runner = create_story_runner
+          run_options.story_formatters.each do |formatter|
+            register_listener(formatter)
           end
-          # TODO exit with non-zero status if run fails
+          self.register_exit_hook
         end
-        
-        def dry_run
-          run_options.dry_run
+        @story_runner
+      end
+      
+      def self.scenario_runner # :nodoc:
+        @scenario_runner ||= ScenarioRunner.new
+      end
+      
+      def self.world_creator # :nodoc:
+        @world_creator ||= World
+      end
+      
+      def self.create_story_runner
+        Runner::StoryRunner.new(scenario_runner, world_creator)
+      end
+      
+      # Use this to register a customer output formatter.
+      def self.register_listener(listener)
+        story_runner.add_listener(listener) # run_started, story_started, story_ended, #run_ended
+        world_creator.add_listener(listener) # found_scenario, step_succeeded, step_failed, step_failed
+        scenario_runner.add_listener(listener) # scenario_started, scenario_succeeded, scenario_pending, scenario_failed
+      end
+      
+      def self.register_exit_hook # :nodoc:
+        at_exit do
+          exit Runner.story_runner.run_stories unless $!
         end
-        
       end
+      
+      def self.dry_run
+        run_options.dry_run
+      end
+      
     end
   end
 end</diff>
      <filename>vendor/plugins/rspec/lib/spec/story/runner.rb</filename>
    </modified>
    <modified>
      <diff>@@ -26,10 +26,10 @@ module Spec
           @story_file = path
         end
         
-        def run
+        def run(story_runner=Spec::Story::Runner.story_runner)
           raise &quot;You must set a path to the file with the story. See the RDoc.&quot; if @story_file.nil?
-          mediator = Spec::Story::Runner::StoryMediator.new steps, Spec::Story::Runner.story_runner, @options
-          parser = Spec::Story::Runner::StoryParser.new mediator
+          mediator = Spec::Story::Runner::StoryMediator.new(steps, story_runner, @options)
+          parser = Spec::Story::Runner::StoryParser.new(mediator)
 
           story_text = File.read(@story_file)          
           parser.parse(story_text.split(&quot;\n&quot;))</diff>
      <filename>vendor/plugins/rspec/lib/spec/story/runner/plain_text_story_runner.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,19 +11,24 @@ module Spec
           run_story_ignoring_scenarios(scenario.story, world)
           
           world.start_collecting_errors
+
+          unless scenario.body
+            @listeners.each { |l| l.scenario_pending(scenario.story.title, scenario.name, '') }
+            return true
+          end
+          
           world.instance_eval(&amp;scenario.body)
           if world.errors.empty?
             @listeners.each { |l| l.scenario_succeeded(scenario.story.title, scenario.name) }
           else
-            world.errors.each do |e|
-              case e
-              when Spec::Example::ExamplePendingError
-                @listeners.each { |l| l.scenario_pending(scenario.story.title, scenario.name, e.message) }
-              else
-                @listeners.each { |l| l.scenario_failed(scenario.story.title, scenario.name, e) }
-              end
+            if Spec::Example::ExamplePendingError === (e = world.errors.first)
+              @listeners.each { |l| l.scenario_pending(scenario.story.title, scenario.name, e.message) }
+            else
+              @listeners.each { |l| l.scenario_failed(scenario.story.title, scenario.name, e) }
+              return false
             end
           end
+          true
         end
         
         def add_listener(listener)</diff>
      <filename>vendor/plugins/rspec/lib/spec/story/runner/scenario_runner.rb</filename>
    </modified>
    <modified>
      <diff>@@ -38,6 +38,14 @@
           current_scenario.add_step Step.new('Then', name)
         end
         
+        def last_step
+          current_scenario.last_step
+        end
+        
+        def add_to_last(name)
+          last_step.name &lt;&lt; name
+        end
+        
         def run_stories
           stories.each { |story| @runner.instance_eval(&amp;story) }
         end
@@ -64,7 +72,7 @@
             title = @title
             narrative = @narrative
             scenarios = @scenarios.collect { |scenario| scenario.to_proc }
-            options = @options.merge(:steps =&gt; @step_group)
+            options = @options.merge(:steps_for =&gt; @step_group)
             lambda do
               Story title, narrative, options do
                 scenarios.each { |scenario| instance_eval(&amp;scenario) }
@@ -100,9 +108,15 @@
           def add_step(step)
             @steps &lt;&lt; step
           end
+          
+          def last_step
+            @steps.last
+          end
         end
         
         class Step
+          attr_reader :name
+          
           def initialize(type, name)
             @type = type
             @name = name</diff>
      <filename>vendor/plugins/rspec/lib/spec/story/runner/story_mediator.rb</filename>
    </modified>
    <modified>
      <diff>@@ -26,14 +26,15 @@ module Spec
         def process_line(line)
           line.strip!
           case line
-          when /^Story: /           : @state.story(line)
-          when /^Scenario: /        : @state.scenario(line)
-          when /^Given:? /          : @state.given(line)
-          when /^GivenScenario:? /  : @state.given_scenario(line)
-          when /^When:? /           : @state.event(line)
-          when /^Then:? /           : @state.outcome(line)
-          when /^And:? /            : @state.one_more_of_the_same(line)
-          else                        @state.other(line)
+          when /^#/                 then @state.comment(line)
+          when /^Story: /           then @state.story(line)
+          when /^Scenario: /        then @state.scenario(line)
+          when /^Given:? /          then @state.given(line)
+          when /^GivenScenario:? /  then @state.given_scenario(line)
+          when /^When:? /           then @state.event(line)
+          when /^Then:? /           then @state.outcome(line)
+          when /^And:? /            then @state.one_more_of_the_same(line)
+          else                           @state.other(line)
           end
         end
 
@@ -72,6 +73,10 @@ module Spec
         def create_then(name)
           @story_mediator.create_then(name)
         end
+        
+        def add_to_last(line)
+          @story_mediator.add_to_last(&quot;\n#{line}&quot;)
+        end
 
         def transition_to(key)
           @state = states[key]
@@ -136,6 +141,9 @@ module Spec
           def other(line)
             # no-op - supports header text before the first story in a file
           end
+          
+          def comment(line)
+          end
         end
         
         class StartingState &lt; State
@@ -199,6 +207,10 @@ module Spec
           def given(line)
             @parser.create_given(remove_tag_from(:given, line))
           end
+          
+          def other(line)
+            @parser.add_to_last(line)
+          end
         end
         
         class WhenState &lt; State
@@ -209,6 +221,10 @@ module Spec
           def event(line)
             @parser.create_when(remove_tag_from(:when ,line))
           end
+
+          def other(line)
+            @parser.add_to_last(line)
+          end
         end
 
         class ThenState &lt; State
@@ -219,6 +235,10 @@ module Spec
           def outcome(line)
             @parser.create_then(remove_tag_from(:then ,line))
           end
+
+          def other(line)
+            @parser.add_to_last(line)
+          end
         end
 
       end</diff>
      <filename>vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,12 +2,16 @@ module Spec
   module Story
     module Runner
       class StoryRunner
-        class &lt;&lt; self
-          attr_accessor :current_story_runner
-          
-          def scenario_from_current_story(scenario_name)
-            current_story_runner.scenario_from_current_story(scenario_name)
-          end
+        def self.current_story_runner
+          @current_story_runner
+        end
+
+        def self.current_story_runner=(current_story_runner)
+          @current_story_runner = current_story_runner
+        end
+
+        def self.scenario_from_current_story(scenario_name)
+          current_story_runner.scenario_from_current_story(scenario_name)
         end
         
         attr_accessor :stories, :scenarios, :current_story
@@ -36,6 +40,7 @@ module Spec
         def run_stories
           return if @stories.empty?
           @listeners.each { |l| l.run_started(scenarios.size) }
+          success = true
           @stories.each do |story|
             story.assign_steps_to(World)
             @current_story = story
@@ -45,13 +50,15 @@ module Spec
               type = story[:type] || Object
               args = story[:args] || []
               world = @world_creator.create(type, *args)
-              @scenario_runner.run(scenario, world)
+              success = success &amp; @scenario_runner.run(scenario, world)
             end
             @listeners.each { |l| l.story_ended(story.title, story.narrative) }
+            World.step_mother.clear
           end
-          unique_steps = World.step_names.uniq.sort
+          unique_steps = (World.step_names.collect {|n| Regexp === n ? n.source : n.to_s}).uniq.sort
           @listeners.each { |l| l.collected_steps(unique_steps) }
           @listeners.each { |l| l.run_ended }
+          return success
         end
         
         def add_listener(listener)</diff>
      <filename>vendor/plugins/rspec/lib/spec/story/runner/story_runner.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,48 +1,70 @@
 module Spec
   module Story
     class Step
-      PARAM_PATTERN = /(\$\w*)/
+      PARAM_PATTERN = /([^\\]|^)(\$(?!\$)\w*)/
+      PARAM_OR_GROUP_PATTERN = /(\$(?!\$)\w*)|\(.*?\)/
       
       attr_reader :name
+      
       def initialize(name, &amp;block)
-        @name = name
-        assign_expression(name)
-        init_module(name, &amp;block)
+        init_name(name)
+        init_expression(name)
+        block_given? ? init_module(name, &amp;block) : set_pending
       end
 
       def perform(instance, *args)
+        raise Spec::Example::ExamplePendingError.new(&quot;Not Yet Implemented&quot;) if pending?
         instance.extend(@mod)
-        instance.__send__(@name, *args)
-      end
-
-      def init_module(name, &amp;block)
-        @mod = Module.new do
-          define_method(name.to_s, &amp;block)
-        end
+        instance.__send__(sanitize(@name), *args)
       end
 
       def matches?(name)
-        !(matches = name.match(@expression)).nil?
+        !(name.strip =~ @expression).nil?
       end
             
       def parse_args(name)
-        name.match(@expression)[1..-1]
+        name.strip.match(@expression)[1..-1]
       end
 
       private
       
-        def assign_expression(name)
-          expression = name.dup
-          if String === expression
-            expression.gsub! '(', '\('
-            expression.gsub! ')', '\)'
-            while expression =~ PARAM_PATTERN
-              expression.gsub!($1, &quot;(.*)&quot;)
-            end
-          end
-          @expression = Regexp.new(&quot;^#{expression}$&quot;)
+      def sanitize(a_string_or_regexp)
+        return a_string_or_regexp.source if Regexp == a_string_or_regexp
+        a_string_or_regexp.to_s
+      end
+
+      def init_module(name, &amp;block)
+        sanitized_name = sanitize(name)
+        @mod = Module.new do
+          define_method(sanitized_name, &amp;block)
         end
+      end
+    
+      def set_pending
+        @pending = true
+      end
+      
+      def pending?
+        @pending == true
+      end
+      
+      def init_name(name)
+        @name = name
+      end
+    
+      def init_expression(string_or_regexp)
+        if String === string_or_regexp
+          expression = string_or_regexp.dup
+          %w&lt;? ( ) [ ] { } ^ !&gt;.each {|c| expression.gsub! c, &quot;\\#{c}&quot;}
+        elsif Regexp === string_or_regexp
+          expression = string_or_regexp.source
+        end
+        while expression =~ PARAM_PATTERN
+          expression.sub!($2, &quot;(.*?)&quot;)
+        end
+        @expression = Regexp.new(&quot;\\A#{expression}\\Z&quot;, Regexp::MULTILINE)
+      end
 
     end
   end
-end
\ No newline at end of file
+end</diff>
      <filename>vendor/plugins/rspec/lib/spec/story/step.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,7 +16,7 @@ module Spec
         @step_group
       end
       
-      def initialize(init_defaults=true,&amp;block)
+      def initialize(init_defaults=true, &amp;block)
         @hash_of_lists_of_steps = Hash.new {|h, k| h[k] = []}
         if init_defaults
           self.class.steps.add_to(self)
@@ -52,7 +52,6 @@ module Spec
       alias :when :When
       alias :then :Then
       
-      
       def add(type, steps)
         (@hash_of_lists_of_steps[type] &lt;&lt; steps).flatten!
       end</diff>
      <filename>vendor/plugins/rspec/lib/spec/story/step_group.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,7 +13,8 @@ module Spec
         @steps.add(type, step)
       end
       
-      def find(type, name)
+      def find(type, unstripped_name)
+        name = unstripped_name.strip
         if @steps.find(type, name).nil?
           @steps.add(type,
           Step.new(name) do</diff>
      <filename>vendor/plugins/rspec/lib/spec/story/step_mother.rb</filename>
    </modified>
    <modified>
      <diff>@@ -19,17 +19,14 @@ module Spec
       end
       
       def assign_steps_to(assignee)
-        if @params[:steps]
-          assignee.use(@params[:steps])
-        else
-          case keys = @params[:steps_for]
-          when Symbol
-            keys = [keys]
-          when nil
-            keys = []
-          end
-          keys.each do |key|
-            assignee.use(steps_for(key))
+        if steps=@params[:steps_for]
+          steps = [steps] unless steps.is_a?(Array)
+          steps.each do |step|
+            if step.is_a?(StepGroup)
+              assignee.use(step)
+            else
+              assignee.use(steps_for(step))
+            end
           end
         end
       end</diff>
      <filename>vendor/plugins/rspec/lib/spec/story/story.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,3 @@
-require 'rubygems'
 require 'spec/expectations'
 require 'spec/matchers'
 require 'spec/example/pending'
@@ -16,77 +15,78 @@ module Spec
     module World
       include ::Spec::Example::Pending
       include ::Spec::Matchers
-      # store steps and listeners in the singleton metaclass.
-      # This serves both to keep them out of the way of runtime Worlds
-      # and to make them available to all instances.
-      class &lt;&lt; self
-        def create(cls = Object, *args)
-          cls.new(*args).extend(World)
-        end
-        
-        def listeners
-          @listeners ||= []
-        end
-        
-        def add_listener(listener)
-          listeners() &lt;&lt; listener
-        end
-        
-        def step_mother
-          @step_mother ||= StepMother.new
-        end
-                
-        def use(steps)
-          step_mother.use(steps)
+
+      def self.create(cls = Object, *args)
+        cls.new(*args).extend(World)
+      end
+      
+      def self.listeners
+        @listeners ||= []
+      end
+      
+      def self.add_listener(listener)
+        listeners() &lt;&lt; listener
+      end
+      
+      def self.step_mother
+        @step_mother ||= StepMother.new
+      end
+              
+      def self.use(steps)
+        step_mother.use(steps)
+      end
+      
+      def self.step_names
+        @step_names ||= []
+      end
+
+      def self.run_given_scenario_with_suspended_listeners(world, type, name, scenario)
+        current_listeners = Array.new(listeners)
+        begin
+          listeners.each { |l| l.found_scenario(type, name) }
+          @listeners.clear
+          scenario.perform(world, name) unless dry_run
+        ensure
+          @listeners.replace(current_listeners)
         end
-        
-        def step_names
-          @step_names ||= []
+      end
+      
+      def self.store_and_call(world, type, name, *args, &amp;block)
+        if block_given?
+          step_mother.store(type, Step.new(name, &amp;block))
         end
+        step = step_mother.find(type, name)
 
-        def run_given_scenario_with_suspended_listeners(world, type, name, scenario)
-          current_listeners = Array.new(listeners)
-          begin
-            listeners.each { |l| l.found_scenario(type, name) }
-            @listeners.clear
-            scenario.perform(world, name) unless ::Spec::Story::Runner.dry_run
-          ensure
-            @listeners.replace(current_listeners)
-          end
-        end
+        step_name = step.name
+        step_names &lt;&lt; step_name
         
-        def store_and_call(world, type, name, *args, &amp;block)
-          if block_given?
-            step_mother.store(type, Step.new(name, &amp;block))
-          end
-          step = step_mother.find(type, name)
-
-          step_name = step.name
-          step_names &lt;&lt; step_name
-          
-          # It's important to have access to the parsed args here, so
-          # we can give them to the listeners. The HTML reporter needs
-          # the args so it can style them. See the generated output in
-          # story_server/prototype/rspec_stories.html (generated by rake stories)
-          args = step.parse_args(name) if args.empty?
-          begin
-            step.perform(world, *args) unless ::Spec::Story::Runner.dry_run
-            listeners.each { |l| l.step_succeeded(type, step_name, *args) }
-          rescue Exception =&gt; e
-            case e
-            when Spec::Example::ExamplePendingError
-              @listeners.each { |l| l.step_pending(type, step_name, *args) }
-            else
-              @listeners.each { |l| l.step_failed(type, step_name, *args) }
-            end
-            errors &lt;&lt; e
+        # It's important to have access to the parsed args here, so
+        # we can give them to the listeners. The HTML reporter needs
+        # the args so it can style them. See the generated output in
+        # story_server/prototype/rspec_stories.html (generated by rake stories)
+        args = step.parse_args(name) if args.empty?
+        begin
+          listeners.each { |l| l.step_upcoming(type, step_name, *args) }
+          step.perform(world, *args) unless dry_run
+          listeners.each { |l| l.step_succeeded(type, step_name, *args) }
+        rescue Exception =&gt; e
+          case e
+          when Spec::Example::ExamplePendingError
+            @listeners.each { |l| l.step_pending(type, step_name, *args) }
+          else
+            @listeners.each { |l| l.step_failed(type, step_name, *args) }
           end
+          errors &lt;&lt; e
         end
-        
-        def errors
-          @errors ||= []
-        end
-      end # end of class &lt;&lt; self
+      end
+      
+      def self.errors
+        @errors ||= []
+      end
+      
+      def self.dry_run
+        ::Spec::Story::Runner.dry_run
+      end
       
       def start_collecting_errors
         errors.clear</diff>
      <filename>vendor/plugins/rspec/lib/spec/story/world.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,21 +3,13 @@ module Spec
     unless defined? MAJOR
       MAJOR  = 1
       MINOR  = 1
-      TINY   = 0
-      RELEASE_CANDIDATE = nil
+      TINY   = 11
+      MINESCULE = 1
+      
 
-      # RANDOM_TOKEN: 0.885013695004692
-      REV = &quot;$LastChangedRevision: 2958 $&quot;.match(/LastChangedRevision: (\d+)/)[1]
+      STRING = [MAJOR, MINOR, TINY, MINESCULE].join('.')
 
-      STRING = [MAJOR, MINOR, TINY].join('.')
-      TAG = &quot;REL_#{[MAJOR, MINOR, TINY, RELEASE_CANDIDATE].compact.join('_')}&quot;.upcase.gsub(/\.|-/, '_')
-      FULL_VERSION = &quot;#{[MAJOR, MINOR, TINY, RELEASE_CANDIDATE].compact.join('.')} (r#{REV})&quot;
-
-      NAME   = &quot;RSpec&quot;
-      URL    = &quot;http://rspec.rubyforge.org/&quot;  
-    
-      DESCRIPTION = &quot;#{NAME}-#{FULL_VERSION} - BDD for Ruby\n#{URL}&quot;
+      SUMMARY = &quot;rspec #{STRING}&quot;
     end
   end
-end
-
+end
\ No newline at end of file</diff>
      <filename>vendor/plugins/rspec/lib/spec/version.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,11 @@
 require File.expand_path(File.join(File.dirname(__FILE__), &quot;..&quot;, &quot;..&quot;, &quot;lib&quot;, &quot;spec&quot;, &quot;mocks&quot;))
+require 'spec/mocks/framework'
+require 'spec/mocks/extensions'
 
 module Spec
   module Plugins
     module MockFramework
-      include Spec::Mocks::SpecMethods
+      include Spec::Mocks::ExampleMethods
       def setup_mocks_for_rspec
         $rspec_mocks ||= Spec::Mocks::Space.new
       end</diff>
      <filename>vendor/plugins/rspec/plugins/mock_frameworks/rspec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,6 +4,6 @@ require 'spec/rake/spectask'
 desc &quot;Generate HTML report for failing examples&quot;
 Spec::Rake::SpecTask.new('failing_examples_with_html') do |t|
   t.spec_files = FileList['failing_examples/**/*.rb']
-  t.spec_opts = [&quot;--format&quot;, &quot;html:../doc/output/documentation/tools/failing_examples.html&quot;, &quot;--diff&quot;]
+  t.spec_opts = [&quot;--format&quot;, &quot;html:doc/reports/tools/failing_examples.html&quot;, &quot;--diff&quot;]
   t.fail_on_error = false
 end
\ No newline at end of file</diff>
      <filename>vendor/plugins/rspec/rake_tasks/failing_examples_with_html.rake</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,6 @@ require 'rake'
 require 'spec/rake/verify_rcov'
 
 RCov::VerifyTask.new(:verify_rcov =&gt; :spec) do |t|
-  t.threshold = 100.0 # Make sure you have rcov 0.7 or higher!
-  t.index_html = '../doc/output/coverage/index.html'
+  t.threshold = 100.0
+  t.index_html = 'coverage/index.html'
 end</diff>
      <filename>vendor/plugins/rspec/rake_tasks/verify_rcov.rake</filename>
    </modified>
    <modified>
      <diff>@@ -7,6 +7,7 @@ ant
 # put JRuby's bin dir on your PATH
 jruby -S gem install rake --no-ri --no-rdoc
 jruby -S gem install diff-lcs
+jruby -S gem install syntax
 cd ../testsuites/rspec
 mkdir target
 jruby -S rake checkout_code</diff>
      <filename>vendor/plugins/rspec/spec/README.jruby</filename>
    </modified>
    <modified>
      <diff>@@ -1,19 +1,8 @@
-require File.dirname(__FILE__) + &quot;/../autotest_helper&quot;
+require File.dirname(__FILE__) + &quot;/autotest_helper&quot;
 
-module DiscoveryHelper
-  def load_discovery
+describe Autotest::Rspec, &quot;discovery&quot; do
+  it &quot;adds the rspec autotest plugin&quot; do
+    Autotest.should_receive(:add_discovery)
     require File.dirname(__FILE__) + &quot;/../../lib/autotest/discover&quot;
   end
-end
-
-
-class Autotest
-  describe Rspec, &quot;discovery&quot; do
-    include DiscoveryHelper
-    
-    it &quot;should add the rspec autotest plugin&quot; do
-      Autotest.should_receive(:add_discovery).and_yield
-      load_discovery
-    end
-  end  
-end
+end  </diff>
      <filename>vendor/plugins/rspec/spec/autotest/discover_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,264 +1,114 @@
-require File.dirname(__FILE__) + &quot;/../autotest_helper&quot;
+require File.dirname(__FILE__) + &quot;/autotest_helper&quot;
 
 class Autotest
   
-  module AutotestHelper
-    def rspec_output
-      &lt;&lt;-HERE
-.............PPF
-
-1)
-'false should be false' FAILED
-expected: true,
-     got: false (using ==)
-./spec/autotest/rspec_spec.rb:203:
-
-Finished in 0.158674 seconds
-
-16 examples, 1 failure, 2 pending
-
-Pending:
-Autotest::Rspec handling failed results should return an array of failed examples and errors (TODO)
-Autotest::Rspec tests/specs for a given file should find all the specs for a given file (TODO)
-HERE
-    end
-    
-    
-    def common_setup
-      @proc = mock Proc
-      @kernel = mock Kernel
-      @kernel.stub!(:proc).and_return @proc
-
-      File.stub!(:exists).and_return true
-      @windows_alt_separator = &quot;\\&quot;
-      @posix_separator = '/'
+  describe Rspec do
+    describe &quot;adding spec.opts --options&quot; do 
+      before(:each) do
+        @rspec_autotest = Rspec.new
+      end
 
-      @rspec_output = rspec_output
-    end
-  end
+      it &quot;should return the command line option to add spec.opts if the options file exists&quot; do
+        File.stub!(:exist?).and_return true
+        @rspec_autotest.add_options_if_present.should == &quot;-O spec/spec.opts &quot;
+      end
 
-  describe Rspec, &quot;rspec_commands&quot; do
-    it &quot;should contain the various commands, ordered by preference&quot; do
-      Rspec.new.spec_commands.should == [
-        File.expand_path(&quot;#{File.dirname(__FILE__)}/../../bin/spec&quot;),
-        &quot;#{Config::CONFIG['bindir']}/spec&quot;
-      ]
-    end
-  end
+      it &quot;should return an empty string if no spec.opts exists&quot; do
+        File.stub!(:exist?).and_return false
+        Rspec.new.add_options_if_present.should == &quot;&quot;
+      end
+    end  
   
-  describe Rspec, &quot;selection of rspec command&quot; do
-    include AutotestHelper
-    
-    before :each do
-      common_setup
-      @rspec_autotest = Rspec.new(@kernel)
-    end
-    
-    it &quot;should try to find the spec command if it exists in ./bin and use it above everything else&quot; do
-      File.stub!(:exists?).and_return true
-
-      spec_path = File.expand_path(&quot;#{File.dirname(__FILE__)}/../../bin/spec&quot;)
-      File.should_receive(:exists?).with(spec_path).and_return true
-      @rspec_autotest.spec_command.should == spec_path
-    end
-
-    it &quot;should otherwise select the default spec command in gem_dir/bin/spec&quot; do
-      @rspec_autotest.stub!(:spec_commands).and_return [&quot;/foo/spec&quot;]
-      Config::CONFIG.stub!(:[]).and_return &quot;/foo&quot;
-      File.should_receive(:exists?).with(&quot;/foo/spec&quot;).and_return(true)
-
-      @rspec_autotest.spec_command.should == &quot;/foo/spec&quot;
-    end
-    
-    it &quot;should raise an error if no spec command is found at all&quot; do
-      File.stub!(:exists?).and_return false
+    describe &quot;commands&quot; do
+      before(:each) do
+        @rspec_autotest = Rspec.new
+        @rspec_autotest.stub!(:ruby).and_return &quot;ruby&quot;
+        @rspec_autotest.stub!(:add_options_if_present).and_return &quot;-O spec/spec.opts&quot;
       
-      lambda {
-        @rspec_autotest.spec_command
-      }.should raise_error(RspecCommandError, &quot;No spec command could be found!&quot;)
-    end
-    
-  end
-  
-  describe Rspec, &quot;selection of rspec command (windows compatibility issues)&quot; do
-    include AutotestHelper
-    
-    before :each do
-      common_setup
-    end
-    
-    it &quot;should use the ALT_SEPARATOR if it is non-nil&quot; do
-      @rspec_autotest = Rspec.new(@kernel, @posix_separator, @windows_alt_separator)
-      spec_command = File.expand_path(&quot;#{File.dirname(__FILE__)}/../../bin/spec&quot;)
-      @rspec_autotest.stub!(:spec_commands).and_return [spec_command]
-      @rspec_autotest.spec_command.should == spec_command.gsub('/', '\\')
-    end
-    
-    it &quot;should not use the ALT_SEPATOR if it is nil&quot; do
-      @windows_alt_separator = nil
-      @rspec_autotest = Rspec.new(@kernel, @posix_separator, @windows_alt_separator)
-      spec_command = File.expand_path(&quot;#{File.dirname(__FILE__)}/../../bin/spec&quot;)
-      @rspec_autotest.stub!(:spec_commands).and_return [spec_command]
-      @rspec_autotest.spec_command.should == spec_command
-    end
-  end
-
-  describe Rspec, &quot;adding spec.opts --options&quot; do 
-    before :each do
-      @rspec_autotest = Rspec.new
-    end
+        @ruby = @rspec_autotest.ruby
+        @spec_cmd = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'bin', 'spec'))
+        @options = @rspec_autotest.add_options_if_present
+        @files_to_test = {
+          :spec =&gt; [&quot;file_one&quot;, &quot;file_two&quot;]
+        }
+        # this is not the inner representation of Autotest!
+        @rspec_autotest.stub!(:files_to_test).and_return @files_to_test
+        @files_to_test.stub!(:keys).and_return @files_to_test[:spec]
+        @to_test = @files_to_test.keys.flatten.join ' '
+      end
+    
+      it &quot;should make the appropriate test command&quot; do
+        @rspec_autotest.make_test_cmd(@files_to_test).should == &quot;#{@ruby} #{@spec_cmd} #{@to_test} #{@options}&quot;
+      end
 
-    it &quot;should return the command line option to add spec.opts if the options file exists&quot; do
-      File.stub!(:exist?).and_return true
-      @rspec_autotest.add_options_if_present.should == &quot;-O spec/spec.opts &quot;
-    end
-
-    it &quot;should return an empty string if no spec.opts exists&quot; do
-      File.stub!(:exist?).and_return false
-      Rspec.new.add_options_if_present.should == &quot;&quot;
-    end
-  end  
-  
-  describe Rspec do
-    before :each do
-      @rspec_autotest = Rspec.new
-      @rspec_autotest.stub!(:ruby).and_return &quot;ruby&quot;
-      @rspec_autotest.stub!(:add_options_if_present).and_return &quot;-O spec/spec.opts&quot;
-      
-      @ruby = @rspec_autotest.ruby
-      @spec_command = @rspec_autotest.spec_command
-      @options = @rspec_autotest.add_options_if_present
-      @files_to_test = {
-        :spec =&gt; [&quot;file_one&quot;, &quot;file_two&quot;]
-      }
-      # this is not the inner representation of Autotest!
-      @rspec_autotest.stub!(:files_to_test).and_return @files_to_test
-      @files_to_test.stub!(:keys).and_return @files_to_test[:spec]
-      @to_test = @files_to_test.keys.flatten.join ' '
-    end
-    
-    it &quot;should make the apropriate test command&quot; do
-      @rspec_autotest.make_test_cmd(@files_to_test).should == &quot;#{@ruby} -S #{@spec_command} #{@options} #{@to_test}&quot;
-    end
-  end
-  
-  describe Rspec, &quot;test mappings&quot; do
-    before :each do
-      @proc = mock Proc
-      @kernel = mock Kernel
-      @kernel.stub!(:proc).and_return @proc
-      @rspec_autotest = Rspec.new(@kernel)
-    end
-      
-    it &quot;should map all filenames in spec/ which end in .rb&quot; do
-      @rspec_autotest.test_mappings[%r%^spec/.*\.rb$%].should == @proc
-    end
-    
-    it &quot;should map all names in lib which end in .rb to the corresponding ones in spec/&quot; do
-      @rspec_autotest.test_mappings[%r%^lib/(.*)\.rb$%].should == @proc
-    end
-    
-    it &quot;should find all files in spec/shares/* and the spec helper in spec/spec_helper&quot;  do
-      @rspec_autotest.test_mappings[%r%^spec/(spec_helper|shared/.*)\.rb$%].should == @proc
-    end
-  end
-  
-  describe Rspec, &quot;handling results&quot; do
-    include AutotestHelper
-    
-    before :each do
-      common_setup
-      @rspec_autotest = Rspec.new(@kernel, @posix_separator, @windows_alt_separator)
-      @rspec_autotest.stub!(:hook)
-      
-      @results = mock String
-      @results.stub!(:scan).and_return &quot;&quot;
-    end
-    
-    it &quot;should call hook(:red) if there are failures&quot; do
-      @rspec_autotest.stub!(:consolidate_failures).and_return [&quot;spec/some_spec.rb&quot;]
-      
-      @rspec_autotest.should_receive(:hook).with(:red)
-      @rspec_autotest.handle_results(@results)
+      it &quot;should return a blank command for no files&quot; do
+        @rspec_autotest.make_test_cmd({}).should == ''
+      end
     end
-    
-    it &quot;should call hook(:green) if there are no failures&quot; do
-      @rspec_autotest.stub!(:consolidate_failures).and_return []
-      @rspec_autotest.should_receive(:hook).with(:green)
-      @rspec_autotest.handle_results(@results)
-    end
-  end
   
-  describe Rspec, &quot;handling failed results&quot; do
-    include AutotestHelper
+    describe &quot;mappings&quot; do
     
-    before :each do
-      common_setup
-    end
+      before(:each) do
+        @lib_file = &quot;lib/something.rb&quot;
+        @spec_file = &quot;spec/something_spec.rb&quot;
+        @rspec_autotest = Rspec.new
+        @rspec_autotest.hook :initialize
+      end
     
-    it %(should scan the output into a multi-dimensional array, 
-        consisting of the failing spec's name as the first element, 
-        and the failure as the second) do
-      @rspec_autotest = Rspec.new
-      @rspec_autotest.failed_results(@rspec_output).should == [
-        [
-          &quot;false should be false&quot;, 
-          &quot;expected: true,\n     got: false (using ==)\n./spec/autotest/rspec_spec.rb:203:&quot;
-        ]
-      ]
-    end
-  end
-  
-  describe Rspec, &quot;specs for a given file&quot; do
-    before :each do
-      @lib_file = &quot;lib/something.rb&quot;
-      @spec_file = &quot;spec/something_spec.rb&quot;
-      @rspec_autotest = Rspec.new
-
-      @rspec_autotest.instance_variable_set(&quot;@files&quot;, {@lib_file =&gt; Time.now, @spec_file =&gt; Time.now})
-      @rspec_autotest.stub!(:find_files_to_test).and_return true
-    end
+      it &quot;should find the spec file for a given lib file&quot; do
+        @rspec_autotest.should map_specs([@spec_file]).to(@lib_file)
+      end
     
-    it &quot;should find the spec file for a given lib file&quot; do
-      @rspec_autotest.specs_for_file(@lib_file).should == [@spec_file]
-    end
+      it &quot;should find the spec file if given a spec file&quot; do
+        @rspec_autotest.should map_specs([@spec_file]).to(@spec_file)
+      end
     
-    it &quot;should find the spec file if given a spec file&quot; do
-      @rspec_autotest.specs_for_file(@spec_file).should == [@spec_file]
-    end
+      it &quot;should ignore files in spec dir that aren't specs&quot; do
+        @rspec_autotest.should map_specs([]).to(&quot;spec/spec_helper.rb&quot;)
+      end
     
-    it &quot;should only find the file if the file is being tracked (in @file)&quot;  do
-      @other_file = &quot;lib/some_non_tracked_file&quot;
-      @rspec_autotest.specs_for_file(@other_file).should == []
+      it &quot;should ignore untracked files (in @file)&quot;  do
+        @rspec_autotest.should map_specs([]).to(&quot;lib/untracked_file&quot;)
+      end
     end
-  end
   
-  describe Rspec, &quot;consolidating failures&quot; do
-    include AutotestHelper
-    
-    before :each do
-      common_setup
-      @rspec_autotest = Rspec.new
+    describe &quot;consolidating failures&quot; do
+      before(:each) do
+        @rspec_autotest = Rspec.new
       
-      @spec_file = &quot;./spec/autotest/rspec_spec.rb&quot;
-      @rspec_autotest.instance_variable_set(&quot;@files&quot;, {@spec_file =&gt; Time.now})
-      @rspec_autotest.stub!(:find_files_to_test).and_return true
-    end
-    
-    it &quot;should return no failures if no failures were given in the output&quot; do
-      @rspec_autotest.stub!(:failed_results).and_return [[]]
-      @rspec_autotest.consolidate_failures(@rspec_autotest.failed_results).should == {}
-    end
-    
-    it &quot;should return a hash with the spec filename =&gt; spec name for each failure or error&quot; do
-      @rspec_autotest.stub!(:failed_results).and_return([
-        [
-          &quot;false should be false&quot;, 
-          &quot;expected: true,\n     got: false (using ==)\n./spec/autotest/rspec_spec.rb:203:&quot;
+        @spec_file = &quot;spec/autotest/some_spec.rb&quot;
+        @rspec_autotest.instance_variable_set(&quot;@files&quot;, {@spec_file =&gt; Time.now})
+        @rspec_autotest.stub!(:find_files_to_test).and_return true
+      end
+    
+      it &quot;should return no failures if no failures were given in the output&quot; do
+        @rspec_autotest.consolidate_failures([[]]).should == {}
+      end
+    
+      it &quot;should return a hash with the spec filename =&gt; spec name for each failure or error&quot; do
+        @rspec_autotest.stub!(:test_files_for).and_return &quot;spec/autotest/some_spec.rb&quot;
+        failures = [
+          [
+            &quot;false should be false&quot;, 
+            &quot;expected: true,\n     got: false (using ==)\n#{@spec_file}:203:&quot;
+          ]
         ]
-      ])
-      @rspec_autotest.consolidate_failures(@rspec_autotest.failed_results).should == {@spec_file =&gt; [&quot;false should be false&quot;]}
+        @rspec_autotest.consolidate_failures(failures).should == {
+          @spec_file =&gt; [&quot;false should be false&quot;]
+        }
+      end
+    
+      it &quot;should not include the subject file&quot; do
+        subject_file = &quot;lib/autotest/some.rb&quot;
+        @rspec_autotest.stub!(:test_files_for).and_return &quot;spec/autotest/some_spec.rb&quot;
+        failures = [
+          [
+            &quot;false should be false&quot;, 
+            &quot;expected: true,\n     got: false (using ==)\n#{subject_file}:143:\n#{@spec_file}:203:&quot;
+          ]
+        ]
+        @rspec_autotest.consolidate_failures(failures).keys.should_not include(subject_file)
+      end
     end
-    
   end
 end</diff>
      <filename>vendor/plugins/rspec/spec/autotest/rspec_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,6 @@
 if __FILE__ == $0
   dir = File.dirname(__FILE__)
-  Dir[&quot;#{dir}/**/*_spec.rb&quot;].each do |file|
-#    puts &quot;require '#{file}'&quot;
+  Dir[&quot;#{dir}/**/*_spec.rb&quot;].reverse.each do |file|
     require file
   end
 end</diff>
      <filename>vendor/plugins/rspec/spec/rspec_suite.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,288 +2,294 @@ require File.dirname(__FILE__) + '/../../spec_helper.rb'
 
 module Spec
   module Example
-    ConfigurationSpec =
-      describe Configuration, :shared =&gt; true do
+    describe Configuration do
+
+      describe &quot;#mock_with&quot; do
+
         before(:each) do
           @config = Configuration.new
-          @behaviour = mock(&quot;behaviour&quot;)
+          @example_group = mock(&quot;example_group&quot;)
         end
-      end
-    
-    describe Configuration, &quot;#mock_with&quot; do
-      include ConfigurationSpec
-      it &quot;should default mock framework to rspec&quot; do
-        @config.mock_framework.should =~ /\/plugins\/mock_frameworks\/rspec$/
-      end
 
-      it &quot;should let you set rspec mocking explicitly&quot; do
-        @config.mock_with(:rspec)
-        @config.mock_framework.should =~ /\/plugins\/mock_frameworks\/rspec$/
-      end
+        it &quot;should default mock framework to rspec&quot; do
+          @config.mock_framework.should =~ /\/plugins\/mock_frameworks\/rspec$/
+        end
 
-      it &quot;should let you set mocha&quot; do
-        @config.mock_with(:mocha)
-        @config.mock_framework.should =~ /\/plugins\/mock_frameworks\/mocha$/
-      end
+        it &quot;should set rspec mocking explicitly&quot; do
+          @config.mock_with(:rspec)
+          @config.mock_framework.should =~ /\/plugins\/mock_frameworks\/rspec$/
+        end
 
-      it &quot;should let you set flexmock&quot; do
-        @config.mock_with(:flexmock)
-        @config.mock_framework.should =~ /\/plugins\/mock_frameworks\/flexmock$/
-      end
+        it &quot;should set mocha&quot; do
+          @config.mock_with(:mocha)
+          @config.mock_framework.should =~ /\/plugins\/mock_frameworks\/mocha$/
+        end
 
-      it &quot;should let you set rr&quot; do
-        @config.mock_with(:rr)
-        @config.mock_framework.should =~ /\/plugins\/mock_frameworks\/rr$/
-      end
+        it &quot;should set flexmock&quot; do
+          @config.mock_with(:flexmock)
+          @config.mock_framework.should =~ /\/plugins\/mock_frameworks\/flexmock$/
+        end
 
-      it &quot;should let you set an arbitrary adapter module&quot; do
-        adapter = Module.new
-        @config.mock_with(adapter)
-        @config.mock_framework.should == adapter
+        it &quot;should set rr&quot; do
+          @config.mock_with(:rr)
+          @config.mock_framework.should =~ /\/plugins\/mock_frameworks\/rr$/
+        end
+
+        it &quot;should set an arbitrary adapter module&quot; do
+          adapter = Module.new
+          @config.mock_with(adapter)
+          @config.mock_framework.should == adapter
+        end
       end
-    end
 
-    describe Configuration, &quot;#include&quot; do
-      include ConfigurationSpec
+      with_sandboxed_config do
 
-      before do
-        @original_configuration = Spec::Runner.configuration
-        spec_configuration = @config
-        Spec::Runner.instance_eval {@configuration = spec_configuration}
-        @example_group_class = Class.new(ExampleGroup) do
-          class &lt;&lt; self
-            def this_class_has_special_methods
-            end
+        describe &quot;#include&quot; do
+          
+          before(:each) do
+            @example_group_class = Class.new(ExampleGroup) {}
+            ExampleGroupFactory.register(:foobar, @example_group_class)
           end
-        end
-        ExampleGroupFactory.register(:foobar, @example_group_class)
-      end
 
-      after do
-        original_configuration = @original_configuration
-        Spec::Runner.instance_eval {@configuration = original_configuration}
-        ExampleGroupFactory.reset
-      end
+          it &quot;should include the submitted module in ExampleGroup subclasses&quot; do
+            mod = Module.new
+            config.include mod
+            Class.new(@example_group_class).included_modules.should include(mod)
+          end
 
-      it &quot;should include the submitted module in ExampleGroup subclasses&quot; do
-        mod = Module.new
-        @config.include mod
-        Class.new(@example_group_class).included_modules.should include(mod)
-      end
+          it &quot;should scope modules to be included for a specific type&quot; do
+            mod = Module.new
+            config.include mod, :type =&gt; :foobar
+            Class.new(@example_group_class).included_modules.should include(mod)
+          end
 
-      it &quot;should let you define modules to be included for a specific type&quot; do
-        mod = Module.new
-        @config.include mod, :behaviour_type =&gt; :foobar
-        Class.new(@example_group_class).included_modules.should include(mod)
-      end
+          it &quot;should not include modules in a type they are not intended for&quot; do
+            mod = Module.new
+            @other_example_group_class = Class.new(ExampleGroup)
+            ExampleGroupFactory.register(:baz, @other_example_group_class)
 
-      it &quot;should not include modules in a type they are not intended for&quot; do
-        mod = Module.new
-        @other_example_group_class = Class.new(ExampleGroup)
-        ExampleGroupFactory.register(:baz, @other_example_group_class)
+            config.include mod, :type =&gt; :foobar
 
-        @config.include mod, :behaviour_type =&gt; :foobar
+            Class.new(@other_example_group_class).included_modules.should_not include(mod)
+          end
 
-        Class.new(@other_example_group_class).included_modules.should_not include(mod)
-      end
+        end
       
-      it &quot;should not extend the ExampleGroup baseclass (to enable the included hook to work properly)&quot; do
-        pending(&quot;need to figure out how to best express this one&quot;)
-      end
-    end
+        describe &quot;#extend&quot; do
+        
+          before(:each) do
+            @example_group_class = Class.new(ExampleGroup) {}
+            ExampleGroupFactory.register(:foobar, @example_group_class)
+          end
 
-    ConfigurationCallbacksSpec =
-      describe Configuration, &quot; callbacks&quot;, :shared =&gt; true do
-        before do
-          @config = Configuration.new
-          @special_behaviour = Class.new(ExampleGroup)
-          @special_child_behaviour = Class.new(@special_behaviour)
-          @nonspecial_behaviour = Class.new(ExampleGroup)
-          ExampleGroupFactory.register(:special, @special_behaviour)
-          ExampleGroupFactory.register(:special_child, @special_child_behaviour)
-          ExampleGroupFactory.register(:non_special, @nonspecial_behaviour)
-          @behaviour = @special_child_behaviour.describe &quot;Special Example Group&quot;
-          @unselected_behaviour = Class.new(@nonspecial_behaviour).describe &quot;Non Special Example Group&quot;
-        end
+          it &quot;should extend all groups&quot; do
+            mod = Module.new
+            ExampleGroup.should_receive(:extend).with(mod)
+            Spec::Runner.configuration.extend mod
+          end
+      
+          it &quot;should extend specified groups&quot; do
+            mod = Module.new
+            @example_group_class.should_receive(:extend).with(mod)
+            Spec::Runner.configuration.extend mod, :type =&gt; :foobar
+          end
+      
+          it &quot;should not extend non-specified groups&quot; do
+            @other_example_group_class = Class.new(ExampleGroup)
+            ExampleGroupFactory.register(:baz, @other_example_group_class)
 
-        after do
-          ExampleGroupFactory.reset
+            mod = Module.new
+            @other_example_group_class.should_not_receive(:extend)          
+
+            Spec::Runner.configuration.extend mod, :type =&gt; :foobar
+          end
+        
         end
       end
 
-    describe Configuration, &quot;#prepend_before&quot; do
-      include ConfigurationCallbacksSpec
-
-      it &quot;prepends the before block on all instances of the passed in behaviour_type&quot; do
-        order = []
-        @config.prepend_before(:all) do
-          order &lt;&lt; :prepend__before_all
-        end
-        @config.prepend_before(:all, :behaviour_type =&gt; :special) do
-          order &lt;&lt; :special_prepend__before_all
-        end
-        @config.prepend_before(:all, :behaviour_type =&gt; :special_child) do
-          order &lt;&lt; :special_child_prepend__before_all
-        end
-        @config.prepend_before(:each) do
-          order &lt;&lt; :prepend__before_each
-        end
-        @config.prepend_before(:each, :behaviour_type =&gt; :special) do
-          order &lt;&lt; :special_prepend__before_each
-        end
-        @config.prepend_before(:each, :behaviour_type =&gt; :special_child) do
-          order &lt;&lt; :special_child_prepend__before_each
-        end
-        @config.prepend_before(:all, :behaviour_type =&gt; :non_special) do
-          order &lt;&lt; :special_prepend__before_all
-        end
-        @config.prepend_before(:each, :behaviour_type =&gt; :non_special) do
-          order &lt;&lt; :special_prepend__before_each
-        end
-        @behaviour.it &quot;calls prepend_before&quot; do
+      describe Configuration do
+            
+        before(:each) do
+          @special_example_group = Class.new(ExampleGroup).describe(&quot;special_example_group&quot;)
+          @special_child_example_group = Class.new(@special_example_group).describe(&quot;special_child_example_group&quot;)
+          @nonspecial_example_group = Class.new(ExampleGroup).describe(&quot;nonspecial_example_group&quot;)
+          ExampleGroupFactory.register(:special, @special_example_group)
+          ExampleGroupFactory.register(:special_child, @special_child_example_group)
+          ExampleGroupFactory.register(:non_special, @nonspecial_example_group)
+          @example_group = @special_child_example_group.describe &quot;Special Example Group&quot;
+          @unselected_example_group = Class.new(@nonspecial_example_group).describe &quot;Non Special Example Group&quot;
         end
+
+        describe &quot;#prepend_before&quot; do
+          it &quot;prepends the before block on all instances of the passed in type&quot; do
+            order = []
+            config.prepend_before(:all) do
+              order &lt;&lt; :prepend__before_all
+            end
+            config.prepend_before(:all, :type =&gt; :special) do
+              order &lt;&lt; :special_prepend__before_all
+            end
+            config.prepend_before(:all, :type =&gt; :special_child) do
+              order &lt;&lt; :special_child_prepend__before_all
+            end
+            config.prepend_before(:each) do
+              order &lt;&lt; :prepend__before_each
+            end
+            config.prepend_before(:each, :type =&gt; :special) do
+              order &lt;&lt; :special_prepend__before_each
+            end
+            config.prepend_before(:each, :type =&gt; :special_child) do
+              order &lt;&lt; :special_child_prepend__before_each
+            end
+            config.prepend_before(:all, :type =&gt; :non_special) do
+              order &lt;&lt; :special_prepend__before_all
+            end
+            config.prepend_before(:each, :type =&gt; :non_special) do
+              order &lt;&lt; :special_prepend__before_each
+            end
+            @example_group.it &quot;calls prepend_before&quot; do
+            end
         
-        @behaviour.suite.run
-        order.should == [
-          :prepend__before_all,
-          :special_prepend__before_all,
-          :special_child_prepend__before_all,
-          :prepend__before_each,
-          :special_prepend__before_each,
-          :special_child_prepend__before_each
-        ]
-      end
-    end
+            @example_group.run
+            order.should == [
+              :prepend__before_all,
+              :special_prepend__before_all,
+              :special_child_prepend__before_all,
+              :prepend__before_each,
+              :special_prepend__before_each,
+              :special_child_prepend__before_each
+            ]
+          end
+        end
 
-    describe Configuration, &quot;#append_before&quot; do
-      include ConfigurationCallbacksSpec
+        describe &quot;#append_before&quot; do
 
-      it &quot;calls append_before on the behaviour_type&quot; do
-        order = []
-        @config.append_before(:all) do
-          order &lt;&lt; :append_before_all
-        end
-        @config.append_before(:all, :behaviour_type =&gt; :special) do
-          order &lt;&lt; :special_append_before_all
-        end
-        @config.append_before(:all, :behaviour_type =&gt; :special_child) do
-          order &lt;&lt; :special_child_append_before_all
-        end
-        @config.append_before(:each) do
-          order &lt;&lt; :append_before_each
-        end
-        @config.append_before(:each, :behaviour_type =&gt; :special) do
-          order &lt;&lt; :special_append_before_each
-        end
-        @config.append_before(:each, :behaviour_type =&gt; :special_child) do
-          order &lt;&lt; :special_child_append_before_each
-        end
-        @config.append_before(:all, :behaviour_type =&gt; :non_special) do
-          order &lt;&lt; :special_append_before_all
-        end
-        @config.append_before(:each, :behaviour_type =&gt; :non_special) do
-          order &lt;&lt; :special_append_before_each
-        end
-        @behaviour.it &quot;calls append_before&quot; do
+          it &quot;calls append_before on the type&quot; do
+            order = []
+            config.append_before(:all) do
+              order &lt;&lt; :append_before_all
+            end
+            config.append_before(:all, :type =&gt; :special) do
+              order &lt;&lt; :special_append_before_all
+            end
+            config.append_before(:all, :type =&gt; :special_child) do
+              order &lt;&lt; :special_child_append_before_all
+            end
+            config.append_before(:each) do
+              order &lt;&lt; :append_before_each
+            end
+            config.append_before(:each, :type =&gt; :special) do
+              order &lt;&lt; :special_append_before_each
+            end
+            config.append_before(:each, :type =&gt; :special_child) do
+              order &lt;&lt; :special_child_append_before_each
+            end
+            config.append_before(:all, :type =&gt; :non_special) do
+              order &lt;&lt; :special_append_before_all
+            end
+            config.append_before(:each, :type =&gt; :non_special) do
+              order &lt;&lt; :special_append_before_each
+            end
+            @example_group.it &quot;calls append_before&quot; do
+            end
+
+            @example_group.run
+            order.should == [
+              :append_before_all,
+              :special_append_before_all,
+              :special_child_append_before_all,
+              :append_before_each,
+              :special_append_before_each,
+              :special_child_append_before_each
+            ]
+          end
         end
 
-        @behaviour.suite.run
-        order.should == [
-          :append_before_all,
-          :special_append_before_all,
-          :special_child_append_before_all,
-          :append_before_each,
-          :special_append_before_each,
-          :special_child_append_before_each
-        ]
-      end
-    end
+        describe &quot;#prepend_after&quot; do
 
-    describe Configuration, &quot;#prepend_after&quot; do
-      include ConfigurationCallbacksSpec
+          it &quot;prepends the after block on all instances of the passed in type&quot; do
+            order = []
+            config.prepend_after(:all) do
+              order &lt;&lt; :prepend__after_all
+            end
+            config.prepend_after(:all, :type =&gt; :special) do
+              order &lt;&lt; :special_prepend__after_all
+            end
+            config.prepend_after(:all, :type =&gt; :special) do
+              order &lt;&lt; :special_child_prepend__after_all
+            end
+            config.prepend_after(:each) do
+              order &lt;&lt; :prepend__after_each
+            end
+            config.prepend_after(:each, :type =&gt; :special) do
+              order &lt;&lt; :special_prepend__after_each
+            end
+            config.prepend_after(:each, :type =&gt; :special) do
+              order &lt;&lt; :special_child_prepend__after_each
+            end
+            config.prepend_after(:all, :type =&gt; :non_special) do
+              order &lt;&lt; :special_prepend__after_all
+            end
+            config.prepend_after(:each, :type =&gt; :non_special) do
+              order &lt;&lt; :special_prepend__after_each
+            end
+            @example_group.it &quot;calls prepend_after&quot; do
+            end
 
-      it &quot;prepends the after block on all instances of the passed in behaviour_type&quot; do
-        order = []
-        @config.prepend_after(:all) do
-          order &lt;&lt; :prepend__after_all
-        end
-        @config.prepend_after(:all, :behaviour_type =&gt; :special) do
-          order &lt;&lt; :special_prepend__after_all
-        end
-        @config.prepend_after(:all, :behaviour_type =&gt; :special) do
-          order &lt;&lt; :special_child_prepend__after_all
-        end
-        @config.prepend_after(:each) do
-          order &lt;&lt; :prepend__after_each
-        end
-        @config.prepend_after(:each, :behaviour_type =&gt; :special) do
-          order &lt;&lt; :special_prepend__after_each
-        end
-        @config.prepend_after(:each, :behaviour_type =&gt; :special) do
-          order &lt;&lt; :special_child_prepend__after_each
-        end
-        @config.prepend_after(:all, :behaviour_type =&gt; :non_special) do
-          order &lt;&lt; :special_prepend__after_all
-        end
-        @config.prepend_after(:each, :behaviour_type =&gt; :non_special) do
-          order &lt;&lt; :special_prepend__after_each
-        end
-        @behaviour.it &quot;calls prepend_after&quot; do
+            @example_group.run
+            order.should == [
+              :special_child_prepend__after_each,
+              :special_prepend__after_each,
+              :prepend__after_each,
+              :special_child_prepend__after_all,
+              :special_prepend__after_all,
+              :prepend__after_all
+            ]
+          end
         end
 
-        @behaviour.suite.run
-        order.should == [
-          :special_child_prepend__after_each,
-          :special_prepend__after_each,
-          :prepend__after_each,
-          :special_child_prepend__after_all,
-          :special_prepend__after_all,
-          :prepend__after_all
-        ]
-      end
-    end
+        describe &quot;#append_after&quot; do
 
-    describe Configuration, &quot;#append_after&quot; do
-      include ConfigurationCallbacksSpec
+          it &quot;calls append_after on the type&quot; do
+            order = []
+            config.append_after(:all) do
+              order &lt;&lt; :append__after_all
+            end
+            config.append_after(:all, :type =&gt; :special) do
+              order &lt;&lt; :special_append__after_all
+            end
+            config.append_after(:all, :type =&gt; :special_child) do
+              order &lt;&lt; :special_child_append__after_all
+            end
+            config.append_after(:each) do
+              order &lt;&lt; :append__after_each
+            end
+            config.append_after(:each, :type =&gt; :special) do
+              order &lt;&lt; :special_append__after_each
+            end
+            config.append_after(:each, :type =&gt; :special_child) do
+              order &lt;&lt; :special_child_append__after_each
+            end
+            config.append_after(:all, :type =&gt; :non_special) do
+              order &lt;&lt; :non_special_append_after_all
+            end
+            config.append_after(:each, :type =&gt; :non_special) do
+              order &lt;&lt; :non_special_append_after_each
+            end
+            @example_group.it &quot;calls append_after&quot; do
+            end
 
-      it &quot;calls append_after on the behaviour_type&quot; do
-        order = []
-        @config.append_after(:all) do
-          order &lt;&lt; :append__after_all
-        end
-        @config.append_after(:all, :behaviour_type =&gt; :special) do
-          order &lt;&lt; :special_append__after_all
-        end
-        @config.append_after(:all, :behaviour_type =&gt; :special_child) do
-          order &lt;&lt; :special_child_append__after_all
-        end
-        @config.append_after(:each) do
-          order &lt;&lt; :append__after_each
-        end
-        @config.append_after(:each, :behaviour_type =&gt; :special) do
-          order &lt;&lt; :special_append__after_each
-        end
-        @config.append_after(:each, :behaviour_type =&gt; :special_child) do
-          order &lt;&lt; :special_child_append__after_each
-        end
-        @config.append_after(:all, :behaviour_type =&gt; :non_special) do
-          order &lt;&lt; :non_special_append_after_all
-        end
-        @config.append_after(:each, :behaviour_type =&gt; :non_special) do
-          order &lt;&lt; :non_special_append_after_each
-        end
-        @behaviour.it &quot;calls append_after&quot; do
+            @example_group.run
+            order.should == [
+              :special_child_append__after_each,
+              :special_append__after_each,
+              :append__after_each,
+              :special_child_append__after_all,
+              :special_append__after_all,
+              :append__after_all
+            ]
+          end
         end
-
-        @behaviour.suite.run
-        order.should == [
-          :special_child_append__after_each,
-          :special_append__after_each,
-          :append__after_each,
-          :special_child_append__after_all,
-          :special_append__after_all,
-          :append__after_all
-        ]
       end
     end
   end</diff>
      <filename>vendor/plugins/rspec/spec/spec/example/configuration_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,37 +3,41 @@ require File.dirname(__FILE__) + '/../../spec_helper'
 module Spec
   module Example
     class ExampleGroupSubclass &lt; ExampleGroup
-      class &lt;&lt; self
-        attr_accessor :examples_ran
+      def self.examples_ran
+        @examples_ran
       end
 
-      @@klass_variable_set = true
-      CONSTANT = :foobar
+      def self.examples_ran=(examples_ran)
+        @examples_ran = examples_ran
+      end
+
+      @@class_variable = :class_variable
+      CONSTANT = :constant
 
       before do
-        @instance_variable = :hello
+        @instance_variable = :instance_variable
       end
-
-      it &quot;should run&quot; do
+      
+      after(:all) do
         self.class.examples_ran = true
       end
 
       it &quot;should have access to instance variables&quot; do
-        @instance_variable.should == :hello
+        @instance_variable.should == :instance_variable
       end
 
       it &quot;should have access to class variables&quot; do
-        @@klass_variable_set.should == true
+        @@class_variable.should == :class_variable
       end
 
       it &quot;should have access to constants&quot; do
-        CONSTANT.should == :foobar
+        CONSTANT.should == :constant
       end
 
       it &quot;should have access to methods defined in the Example Group&quot; do
         a_method.should == 22
       end
-
+      
       def a_method
         22
       end</diff>
      <filename>vendor/plugins/rspec/spec/spec/example/example_group_class_definition_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,144 +1,185 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
 
 module Spec
   module Example
-    describe ExampleGroupFactory, &quot;with :foobar registered as custom type&quot; do
+    describe ExampleGroupFactory do
+      describe &quot;#get&quot; do
+        attr_reader :example_group
+        before(:each) do
+          @example_group_class = Class.new(ExampleGroup)
+          ExampleGroupFactory.register(:registered_type, @example_group_class)
+        end
 
-      before do
-        @behaviour = Class.new(ExampleGroup)
-        ExampleGroupFactory.register(:foobar, @behaviour)
-      end
+        after(:each) do
+          ExampleGroupFactory.reset
+        end
 
-      after do
-        ExampleGroupFactory.reset
-      end
+        it &quot;should return the default ExampleGroup type for nil&quot; do
+          ExampleGroupFactory.get(nil).should == ExampleGroup
+        end
 
-      it &quot;should #get the default behaviour type when passed nil&quot; do
-        ExampleGroupFactory.get(nil).should == ExampleGroup
-      end
+        it &quot;should return the default ExampleGroup for an unregistered non-nil value&quot; do
+          ExampleGroupFactory.get(:does_not_exist).should == ExampleGroup
+        end
 
-      it &quot;should #get custom type for :foobar&quot; do
-        ExampleGroupFactory.get(:foobar).should == @behaviour
-      end
+        it &quot;should return custom type if registered&quot; do
+          ExampleGroupFactory.get(:registered_type).should == @example_group_class
+        end
 
-      it &quot;should #get the actual type when that is passed in&quot; do
-        ExampleGroupFactory.get(@behaviour).should == @behaviour
-      end
+        it &quot;should return the actual type when that is what is submitted&quot; do
+          ExampleGroupFactory.get(@example_group_class).should == @example_group_class
+        end
 
-      it &quot;should #get nil for unregistered non-nil values&quot; do
-        ExampleGroupFactory.get(:does_not_exist).should be_nil
+        it &quot;should get the custom type after setting the default&quot; do
+          @alternate_example_group_class = Class.new(ExampleGroup)
+          ExampleGroupFactory.default(@alternate_example_group_class)
+          ExampleGroupFactory.get(:registered_type).should == @example_group_class
+        end
       end
 
-      it &quot;should raise error for #get! with unknown key&quot; do
-        proc do
-          ExampleGroupFactory.get!(:does_not_exist)
-        end.should raise_error
-      end
-    end    
+      describe &quot;#create_example_group&quot; do
+        attr_reader :parent_example_group
+        before do
+          @parent_example_group = Class.new(ExampleGroup) do
+            def initialize(*args, &amp;block)
+              ;
+            end
+          end
+        end
 
-    describe ExampleGroupFactory, &quot;#create_example_group&quot; do
-      it &quot;should create a uniquely named class&quot; do
-        behaviour = Spec::Example::ExampleGroupFactory.create_example_group(&quot;behaviour&quot;) {}
-        behaviour.name.should =~ /Spec::Example::ExampleGroup::Subclass_\d+/
-      end
+        it &quot;should create a uniquely named class&quot; do
+          example_group = Spec::Example::ExampleGroupFactory.create_example_group(&quot;example_group&quot;) {}
+          example_group.name.should =~ /Spec::Example::ExampleGroup::Subclass_\d+/
+        end
 
-      it &quot;should create a Spec::Example::Example subclass by default&quot; do
-        behaviour = Spec::Example::ExampleGroupFactory.create_example_group(&quot;behaviour&quot;) {}
-        behaviour.superclass.should == Spec::Example::ExampleGroup
-      end
+        it &quot;should create a Spec::Example::Example subclass by default&quot; do
+          example_group = Spec::Example::ExampleGroupFactory.create_example_group(&quot;example_group&quot;) {}
+          example_group.superclass.should == Spec::Example::ExampleGroup
+        end
 
-      it &quot;should create a Spec::Example::Example when :type =&gt; :default&quot; do
-        behaviour = Spec::Example::ExampleGroupFactory.create_example_group(
-          &quot;behaviour&quot;, :type =&gt; :default
-        ) {}
-        behaviour.superclass.should == Spec::Example::ExampleGroup
-      end
+        it &quot;should raise when no description is given&quot; do
+          lambda {
+            Spec::Example::ExampleGroupFactory.create_example_group do; end
+          }.should raise_error(ArgumentError)
+        end
+        
+        it &quot;should raise when no block is given&quot; do
+          lambda { Spec::Example::ExampleGroupFactory.create_example_group &quot;foo&quot; }.should raise_error(ArgumentError)
+        end
 
-      it &quot;should create a Spec::Example::Example when :behaviour_type =&gt; :default&quot; do
-        behaviour = Spec::Example::ExampleGroupFactory.create_example_group(
-          &quot;behaviour&quot;, :behaviour_type =&gt; :default
-        ) {}
-        behaviour.superclass.should == Spec::Example::ExampleGroup
-      end
+        it &quot;should run registered ExampleGroups&quot; do
+          example_group = Spec::Example::ExampleGroupFactory.create_example_group &quot;The ExampleGroup&quot; do end
+          Spec::Runner.options.example_groups.should include(example_group)
+        end
 
-      it &quot;should create specified type when :type =&gt; :something_other_than_default&quot; do
-        klass = Class.new(ExampleGroup) do
-          def initialize(*args, &amp;block); end
+        it &quot;should not run unregistered ExampleGroups&quot; do
+          example_group = Spec::Example::ExampleGroupFactory.create_example_group &quot;The ExampleGroup&quot; do unregister; end
+          Spec::Runner.options.example_groups.should_not include(example_group)
         end
-        Spec::Example::ExampleGroupFactory.register(:something_other_than_default, klass)
-        behaviour = Spec::Example::ExampleGroupFactory.create_example_group(
-          &quot;behaviour&quot;, :type =&gt; :something_other_than_default
-        ) {}
-        behaviour.superclass.should == klass
-      end
 
-      it &quot;should create specified type when :behaviour_type =&gt; :something_other_than_default&quot; do
-        klass = Class.new(ExampleGroup) do
-          def initialize(*args, &amp;block); end
+        describe &quot;with :type =&gt; :default&quot; do
+          it &quot;should create a Spec::Example::ExampleGroup&quot; do
+            example_group = Spec::Example::ExampleGroupFactory.create_example_group(
+            &quot;example_group&quot;, :type =&gt; :default
+            ) {}
+            example_group.superclass.should == Spec::Example::ExampleGroup
+          end
         end
-        Spec::Example::ExampleGroupFactory.register(:something_other_than_default, klass)
-        behaviour = Spec::Example::ExampleGroupFactory.create_example_group(
-          &quot;behaviour&quot;, :behaviour_type =&gt; :something_other_than_default
-        ) {}
-        behaviour.superclass.should == klass
-      end
-      
-      it &quot;should create a type indicated by :spec_path&quot; do
-        klass = Class.new(ExampleGroup) do
-          def initialize(*args, &amp;block); end
-        end
-        Spec::Example::ExampleGroupFactory.register(:something_other_than_default, klass)
-        behaviour = Spec::Example::ExampleGroupFactory.create_example_group(
-          &quot;behaviour&quot;, :spec_path =&gt; &quot;./spec/something_other_than_default/some_spec.rb&quot;
-        ) {}
-        behaviour.superclass.should == klass
-      end
-      
-      it &quot;should create a type indicated by :spec_path (with spec_path generated by caller on windows)&quot; do
-        klass = Class.new(ExampleGroup) do
-          def initialize(*args, &amp;block); end
-        end
-        Spec::Example::ExampleGroupFactory.register(:something_other_than_default, klass)
-        behaviour = Spec::Example::ExampleGroupFactory.create_example_group(
-          &quot;behaviour&quot;, :spec_path =&gt; &quot;./spec\\something_other_than_default\\some_spec.rb&quot;
-        ) {}
-        behaviour.superclass.should == klass
-      end
-      
-      it &quot;should create and register a Spec::Example::Example if :shared =&gt; true&quot; do
-        shared_example_group = Spec::Example::ExampleGroupFactory.create_example_group(
-          &quot;name&quot;, :spec_path =&gt; '/blah/spec/models/blah.rb', :behaviour_type =&gt; :controller, :shared =&gt; true
-        ) {}
-        shared_example_group.should be_an_instance_of(Spec::Example::SharedExampleGroup)
-        SharedExampleGroup.shared_example_groups.should include(shared_example_group)
-      end
 
-      it &quot;should favor the :behaviour_type over the :spec_path&quot; do
-        klass = Class.new(ExampleGroup) do
-          def initialize(*args, &amp;block); end
+        describe &quot;with :type =&gt; :something_other_than_default&quot; do
+          it &quot;should create the specified type&quot; do
+            Spec::Example::ExampleGroupFactory.register(:something_other_than_default, parent_example_group)
+            non_default_example_group = Spec::Example::ExampleGroupFactory.create_example_group(
+              &quot;example_group&quot;, :type =&gt; :something_other_than_default
+            ) {}
+            non_default_example_group.superclass.should == parent_example_group
+          end
         end
-        Spec::Example::ExampleGroupFactory.register(:something_other_than_default, klass)
-        behaviour = Spec::Example::ExampleGroupFactory.create_example_group(
-          &quot;name&quot;, :spec_path =&gt; '/blah/spec/models/blah.rb', :behaviour_type =&gt; :something_other_than_default
-        ) {}
-        behaviour.superclass.should == klass
-      end
 
-      it &quot;should register ExampleGroup by default&quot; do
-        example_group = Spec::Example::ExampleGroupFactory.create_example_group(&quot;The ExampleGroup&quot;) do
+        it &quot;should create a type indicated by :spec_path&quot; do
+          Spec::Example::ExampleGroupFactory.register(:something_other_than_default, parent_example_group)
+          custom_example_group = Spec::Example::ExampleGroupFactory.create_example_group(
+            &quot;example_group&quot;, :spec_path =&gt; &quot;./spec/something_other_than_default/some_spec.rb&quot;
+          ) {}
+          custom_example_group.superclass.should == parent_example_group
+        end
+
+        it &quot;should create a type indicated by :spec_path (with spec_path generated by caller on windows)&quot; do
+          Spec::Example::ExampleGroupFactory.register(:something_other_than_default, parent_example_group)
+          custom_example_group = Spec::Example::ExampleGroupFactory.create_example_group(
+            &quot;example_group&quot;,
+            :spec_path =&gt; &quot;./spec\\something_other_than_default\\some_spec.rb&quot;
+          ) {}
+          custom_example_group.superclass.should == parent_example_group
+        end
+
+        describe &quot;with :shared =&gt; true&quot; do
+          def shared_example_group
+            @shared_example_group ||= Spec::Example::ExampleGroupFactory.create_example_group(
+              &quot;name&quot;, :spec_path =&gt; '/blah/spec/models/blah.rb', :type =&gt; :controller, :shared =&gt; true
+            ) {}
+          end
+
+          it &quot;should create and register a Spec::Example::SharedExampleGroup&quot; do
+            shared_example_group.should be_an_instance_of(Spec::Example::SharedExampleGroup)
+            SharedExampleGroup.should include(shared_example_group)
+          end
+        end
+
+        it &quot;should favor the :type over the :spec_path&quot; do
+          Spec::Example::ExampleGroupFactory.register(:something_other_than_default, parent_example_group)
+          custom_example_group = Spec::Example::ExampleGroupFactory.create_example_group(
+            &quot;name&quot;, :spec_path =&gt; '/blah/spec/models/blah.rb', :type =&gt; :something_other_than_default
+          ) {}
+          custom_example_group.superclass.should == parent_example_group
         end
-        rspec_options.example_groups.should include(example_group)
-      end
 
-      it &quot;should enable unregistering of ExampleGroups&quot; do
-        example_group = Spec::Example::ExampleGroupFactory.create_example_group(&quot;The ExampleGroup&quot;) do
-          unregister
+        it &quot;should register ExampleGroup by default&quot; do
+          example_group = Spec::Example::ExampleGroupFactory.create_example_group(&quot;The ExampleGroup&quot;) do
+          end
+          Spec::Runner.options.example_groups.should include(example_group)
+        end
+
+        it &quot;should enable unregistering of ExampleGroups&quot; do
+          example_group = Spec::Example::ExampleGroupFactory.create_example_group(&quot;The ExampleGroup&quot;) do
+            unregister
+          end
+          Spec::Runner.options.example_groups.should_not include(example_group)
+        end
+        
+        
+        after(:each) do
+          Spec::Example::ExampleGroupFactory.reset
         end
-        rspec_options.example_groups.should_not include(example_group)
       end
       
-      after(:each) do
-        Spec::Example::ExampleGroupFactory.reset
+      describe &quot;#registered_or_ancestor_of_registered?&quot; do
+        before(:each) do
+          @unregistered_parent = Class.new(ExampleGroup)
+          @registered_child = Class.new(@unregistered_parent)
+          @unregistered_grandchild = Class.new(@registered_child)
+          Spec::Example::ExampleGroupFactory.register :registered_child, @registered_child
+        end
+        
+        it &quot;should return true for empty list&quot; do
+          Spec::Example::ExampleGroupFactory.registered_or_ancestor_of_registered?([]).should be_true
+        end
+        
+        it &quot;should return true for a registered example group class&quot; do
+          Spec::Example::ExampleGroupFactory.registered_or_ancestor_of_registered?([@registered_child]).should be_true
+        end
+
+        it &quot;should return true for an ancestor of a registered example_group_classes&quot; do
+          Spec::Example::ExampleGroupFactory.registered_or_ancestor_of_registered?([@unregistered_parent]).should be_true
+        end
+
+        it &quot;should return false for a subclass of a registered example_group_class&quot; do
+          Spec::Example::ExampleGroupFactory.registered_or_ancestor_of_registered?([@unregistered_grandchild]).should be_false
+        end
+
+        after(:each) do
+          Spec::Example::ExampleGroupFactory.reset
+        end
       end
     end
   end</diff>
      <filename>vendor/plugins/rspec/spec/spec/example/example_group_factory_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,424 +2,648 @@ require File.dirname(__FILE__) + '/../../spec_helper'
 
 module Spec
   module Example
-    describe ExampleGroup do
-      attr_reader :options, :example_group, :result, :reporter
-      before(:all) do
-        @original_rspec_options = $rspec_options
-      end
+    class ExampleModuleScopingSpec &lt; ExampleGroup
+      describe ExampleGroup, &quot;via a class definition&quot;
 
-      before(:each) do
-        @options = ::Spec::Runner::Options.new(StringIO.new, StringIO.new)
-        $rspec_options = @options
-        options.formatters &lt;&lt; mock(&quot;formatter&quot;, :null_object =&gt; true)
-        options.backtrace_tweaker = mock(&quot;backtrace_tweaker&quot;, :null_object =&gt; true)
-        @reporter = FakeReporter.new(@options)
-        options.reporter = reporter
-        @example_group = Class.new(ExampleGroup) do
-          describe(&quot;example&quot;)
-          it &quot;does nothing&quot;
-        end
-        class &lt;&lt; example_group
-          public :include
+      module Foo
+        module Bar
+          def self.loaded?
+            true
+          end
         end
-        @result = nil
       end
+      include Foo
 
-      after(:each) do
-        $rspec_options = @original_rspec_options
-        ExampleGroup.reset
+      it &quot;should understand module scoping&quot; do
+        Bar.should be_loaded
       end
 
-      describe ExampleGroup, &quot;.describe&quot; do
-        attr_reader :child_example_group
-        before do
-          @child_example_group = @example_group.describe(&quot;Another ExampleGroup&quot;) do
-            it &quot;should pass&quot; do
-              true.should be_true
-            end
-          end
-        end
+      @@foo = 1
 
-        it &quot;should create a subclass of the ExampleGroup when passed a block&quot; do
-          child_example_group.superclass.should == @example_group
-          @options.example_groups.should include(child_example_group)
-        end
+      it &quot;should allow class variables to be defined&quot; do
+        @@foo.should == 1
+      end
+    end
 
-        it &quot;should not inherit examples&quot; do
-          child_example_group.examples.length.should == 1
-        end
+    class ExampleClassVariablePollutionSpec &lt; ExampleGroup
+      describe ExampleGroup, &quot;via a class definition without a class variable&quot;
+
+      it &quot;should not retain class variables from other Example classes&quot; do
+        proc do
+          @@foo
+        end.should raise_error
       end
+    end
 
-      describe ExampleGroup, &quot;.it&quot; do
-        it &quot;should should create an example instance&quot; do
-          lambda {
-            @example_group.it(&quot;&quot;)
-          }.should change { @example_group.examples.length }.by(1)
-        end
+    describe ExampleGroup, &quot;#pending&quot; do
+      it &quot;should raise a Pending error when its block fails&quot; do
+        block_ran = false
+        lambda {
+          pending(&quot;something&quot;) do
+            block_ran = true
+            raise &quot;something wrong with my example&quot;
+          end
+        }.should raise_error(Spec::Example::ExamplePendingError, &quot;something&quot;)
+        block_ran.should == true
       end
 
-      describe ExampleGroup, &quot;.xit&quot; do
-        before(:each) do
-          Kernel.stub!(:warn)
-        end
+      it &quot;should raise Spec::Example::PendingExampleFixedError when its block does not fail&quot; do
+        block_ran = false
+        lambda {
+          pending(&quot;something&quot;) do
+            block_ran = true
+          end
+        }.should raise_error(Spec::Example::PendingExampleFixedError, &quot;Expected pending 'something' to fail. No Error was raised.&quot;)
+        block_ran.should == true
+      end
+    end
+
+    describe ExampleGroup, &quot;#run with failure in example&quot;, :shared =&gt; true do
+      it &quot;should add an example failure to the TestResult&quot; do
+        example_group.run.should be_false
+      end
+    end
 
-        it &quot;should NOT  should create an example instance&quot; do
-          lambda {
-            @example_group.xit(&quot;&quot;)
-          }.should_not change(@example_group.examples, :length)
+    describe ExampleGroup, &quot;#run&quot; do
+      with_sandboxed_options do
+        attr_reader :example_group, :formatter, :reporter
+        before :each do
+          method_with_three_args = lambda { |arg1, arg2, arg3| }
+          @formatter = mock(&quot;formatter&quot;, :null_object =&gt; true, :example_pending =&gt; method_with_three_args)
+          options.formatters &lt;&lt; formatter
+          options.backtrace_tweaker = mock(&quot;backtrace_tweaker&quot;, :null_object =&gt; true)
+          @reporter = FakeReporter.new(options)
+          options.reporter = reporter
+          @example_group = Class.new(ExampleGroup) do
+            describe(&quot;example&quot;)
+            it &quot;does nothing&quot; do
+            end
+          end
+          class &lt;&lt; example_group
+            public :include
+          end
         end
 
-        it &quot;should warn that it is disabled&quot; do
-          Kernel.should_receive(:warn).with(&quot;Example disabled: foo&quot;)
-          @example_group.xit(&quot;foo&quot;)
+        after :each do
+          ExampleGroup.reset
         end
-      end
 
-      describe ExampleGroup, &quot;.suite&quot; do
-        it &quot;should return an empty ExampleSuite when there is no description&quot; do
-          ExampleGroup.description.should be_nil
-          ExampleGroup.suite.should be_instance_of(ExampleSuite)
-          ExampleGroup.suite.tests.should be_empty
+        it &quot;should not run when there are no examples&quot; do
+          example_group = Class.new(ExampleGroup) do
+            describe(&quot;Foobar&quot;)
+          end
+          example_group.examples.should be_empty
+
+          reporter = mock(&quot;Reporter&quot;)
+          reporter.should_not_receive(:add_example_group)
+          example_group.run
         end
+      
+        describe &quot;when before_each fails&quot; do
+          before(:each) do
+            $example_ran = $after_each_ran = false
+            @example_group = describe(&quot;Foobar&quot;) do
+              before(:each) {raise}
+              it &quot;should not be run&quot; do
+                $example_ran = true
+              end
+              after(:each) do
+                $after_each_ran = true
+              end
+            end
+          end
 
-        it &quot;should return an ExampleSuite with Examples&quot; do
-          behaviour = Class.new(ExampleGroup) do
-            describe('example')
-            it &quot;should pass&quot; do
-              1.should == 1
+          it &quot;should not run example block&quot; do
+            example_group.run
+            $example_ran.should be_false
+          end
+        
+          it &quot;should run after_each&quot; do
+            example_group.run
+            $after_each_ran.should be_true
+          end
+
+          it &quot;should report failure location when in before_each&quot; do
+            reporter.should_receive(:example_finished) do |example_group, error|
+              error.message.should eql(&quot;in before_each&quot;)
             end
+            example_group.run
           end
-          suite = behaviour.suite
-          suite.tests.length.should == 1
-          suite.tests.first._example.description.should == &quot;should pass&quot;
         end
 
-        it &quot;should include methods that begin with test and has an arity of 0 in suite&quot; do
-          behaviour = Class.new(ExampleGroup) do
-            describe('example')
-            def test_any_args(*args)
-              true.should be_true
-            end
-            def test_something
-              1.should == 1
-            end
-            def test
-              raise &quot;This is not a real test&quot;
-            end
-            def testify
-              raise &quot;This is not a real test&quot;
-            end
+        describe ExampleGroup, &quot;#run on dry run&quot; do
+          before do
+            @options.dry_run = true
+          end
+
+          it &quot;should not run before(:all) or after(:all)&quot; do
+            before_all_ran = false
+            after_all_ran = false
+            ExampleGroup.before(:all) { before_all_ran = true }
+            ExampleGroup.after(:all) { after_all_ran = true }
+            example_group.it(&quot;should&quot;) {}
+            example_group.run
+            before_all_ran.should be_false
+            after_all_ran.should be_false
+          end
+
+          it &quot;should not run example&quot; do
+            example_ran = false
+            example_group.it(&quot;should&quot;) {example_ran = true}
+            example_group.run
+            example_ran.should be_false
           end
-          suite = behaviour.suite
-          suite.tests.length.should == 2
-          descriptions = suite.tests.collect {|test| test._example.description}.sort
-          descriptions.should == [&quot;test_any_args&quot;, &quot;test_something&quot;]
-          suite.run.should be_true
         end
 
-        it &quot;should include methods that begin with should and has an arity of 0 in suite&quot; do
-          behaviour = Class.new(ExampleGroup) do
-            describe('example')
-            def shouldCamelCase
-              true.should be_true
+        describe ExampleGroup, &quot;#run with specified examples&quot; do
+          attr_reader :examples_that_were_run
+          before do
+            @examples_that_were_run = []
+          end
+
+          describe &quot;when specified_examples matches entire ExampleGroup&quot; do
+            before do
+              examples_that_were_run = @examples_that_were_run
+              @example_group = Class.new(ExampleGroup) do
+                describe(&quot;the ExampleGroup&quot;)
+                it(&quot;should be run&quot;) do
+                  examples_that_were_run &lt;&lt; 'should be run'
+                end
+
+                it(&quot;should also be run&quot;) do
+                  examples_that_were_run &lt;&lt; 'should also be run'
+                end
+              end
+              options.examples = [&quot;the ExampleGroup&quot;]
             end
-            def should_any_args(*args)
-              true.should be_true
+
+            it &quot;should not run the Examples in the ExampleGroup&quot; do
+              example_group.run
+              examples_that_were_run.should == ['should be run', 'should also be run']
             end
-            def should_something
-              1.should == 1
+          end
+
+          describe ExampleGroup, &quot;#run when specified_examples matches only Example description&quot; do
+            before do
+              examples_that_were_run = @examples_that_were_run
+              @example_group = Class.new(ExampleGroup) do
+                describe(&quot;example&quot;)
+                it(&quot;should be run&quot;) do
+                  examples_that_were_run &lt;&lt; 'should be run'
+                end
+              end
+              options.examples = [&quot;should be run&quot;]
             end
-            def should_not_something
-              1.should_not == 2
+
+            it &quot;should not run the example&quot; do
+              example_group.run
+              examples_that_were_run.should == ['should be run']
             end
-            def should
-              raise &quot;This is not a real example&quot;
+          end
+
+          describe ExampleGroup, &quot;#run when specified_examples does not match an Example description&quot; do
+            before do
+              examples_that_were_run = @examples_that_were_run
+              @example_group = Class.new(ExampleGroup) do
+                describe(&quot;example&quot;)
+                it(&quot;should be something else&quot;) do
+                  examples_that_were_run &lt;&lt; 'should be something else'
+                end
+              end
+              options.examples = [&quot;does not match anything&quot;]
             end
-            def should_not
-              raise &quot;This is not a real example&quot;
+
+            it &quot;should not run the example&quot; do
+              example_group.run
+              examples_that_were_run.should == []
             end
           end
-          behaviour = behaviour.dup
-          suite = behaviour.suite
-          suite.tests.length.should == 4
-          descriptions = suite.tests.collect {|test| test._example.description}.sort
-          descriptions.should include(&quot;shouldCamelCase&quot;)
-          descriptions.should include(&quot;should_any_args&quot;)
-          descriptions.should include(&quot;should_something&quot;)
-          descriptions.should include(&quot;should_not_something&quot;)
-        end
 
-        it &quot;should not include methods that begin with test_ and has an arity &gt; 0 in suite&quot; do
-          behaviour = Class.new(ExampleGroup) do
-            describe('example')
-            def test_invalid(foo)
-              1.should == 1
+          describe ExampleGroup, &quot;#run when specified_examples matches an Example description&quot; do
+            before do
+              examples_that_were_run = @examples_that_were_run
+              @example_group = Class.new(ExampleGroup) do
+                describe(&quot;example&quot;)
+                it(&quot;should be run&quot;) do
+                  examples_that_were_run &lt;&lt; 'should be run'
+                end
+                it(&quot;should not be run&quot;) do
+                  examples_that_were_run &lt;&lt; 'should not be run'
+                end
+              end
+              options.examples = [&quot;should be run&quot;]
             end
-            def testInvalidCamelCase(foo)
-              1.should == 1
+
+            it &quot;should run only the example, when there is only one&quot; do
+              example_group.run
+              examples_that_were_run.should == [&quot;should be run&quot;]
             end
+
+            it &quot;should run only the one example&quot; do
+              example_group.run
+              examples_that_were_run.should == [&quot;should be run&quot;]          end
           end
-          suite = behaviour.suite
-          suite.tests.length.should == 0
         end
 
-        it &quot;should not include methods that begin with should_ and has an arity &gt; 0 in suite&quot; do
-          behaviour = Class.new(ExampleGroup) do
-            describe('example')
-            def should_invalid(foo)
-              1.should == 1
-            end
-            def shouldInvalidCamelCase(foo)
-              1.should == 1
-            end
-            def should_not_invalid(foo)
-              1.should == 1
+        describe ExampleGroup, &quot;#run with success&quot; do
+          before do
+            @special_example_group = Class.new(ExampleGroup)
+            ExampleGroupFactory.register(:special, @special_example_group)
+            @not_special_example_group = Class.new(ExampleGroup)
+            ExampleGroupFactory.register(:not_special, @not_special_example_group)
+          end
+
+          after do
+            ExampleGroupFactory.reset
+          end
+
+          it &quot;should send reporter add_example_group&quot; do
+            example_group.run
+            reporter.example_groups.should == [example_group]
+          end
+
+          it &quot;should run example on run&quot; do
+            example_ran = false
+            example_group.it(&quot;should&quot;) {example_ran = true}
+            example_group.run
+            example_ran.should be_true
+          end
+
+          it &quot;should run before(:all) block only once&quot; do
+            before_all_run_count_run_count = 0
+            example_group.before(:all) {before_all_run_count_run_count += 1}
+            example_group.it(&quot;test&quot;) {true}
+            example_group.it(&quot;test2&quot;) {true}
+            example_group.run
+            before_all_run_count_run_count.should == 1
+          end
+
+          it &quot;should run after(:all) block only once&quot; do
+            after_all_run_count = 0
+            example_group.after(:all) {after_all_run_count += 1}
+            example_group.it(&quot;test&quot;) {true}
+            example_group.it(&quot;test2&quot;) {true}
+            example_group.run
+            after_all_run_count.should == 1
+            @reporter.rspec_verify
+          end
+
+          it &quot;after(:all) should have access to all instance variables defined in before(:all)&quot; do
+            context_instance_value_in = &quot;Hello there&quot;
+            context_instance_value_out = &quot;&quot;
+            example_group.before(:all) { @instance_var = context_instance_value_in }
+            example_group.after(:all) { context_instance_value_out = @instance_var }
+            example_group.it(&quot;test&quot;) {true}
+            example_group.run
+            context_instance_value_in.should == context_instance_value_out
+          end
+
+          it &quot;should copy instance variables from before(:all)'s execution context into spec's execution context&quot; do
+            context_instance_value_in = &quot;Hello there&quot;
+            context_instance_value_out = &quot;&quot;
+            example_group.before(:all) { @instance_var = context_instance_value_in }
+            example_group.it(&quot;test&quot;) {context_instance_value_out = @instance_var}
+            example_group.run
+            context_instance_value_in.should == context_instance_value_out
+          end
+
+          it &quot;should not add global before callbacks for untargetted example_group&quot; do
+            fiddle = []
+
+            ExampleGroup.before(:all) { fiddle &lt;&lt; &quot;Example.before(:all)&quot; }
+            ExampleGroup.prepend_before(:all) { fiddle &lt;&lt; &quot;Example.prepend_before(:all)&quot; }
+            @special_example_group.before(:each) { fiddle &lt;&lt; &quot;Example.before(:each, :type =&gt; :special)&quot; }
+            @special_example_group.prepend_before(:each) { fiddle &lt;&lt; &quot;Example.prepend_before(:each, :type =&gt; :special)&quot; }
+            @special_example_group.before(:all) { fiddle &lt;&lt; &quot;Example.before(:all, :type =&gt; :special)&quot; }
+            @special_example_group.prepend_before(:all) { fiddle &lt;&lt; &quot;Example.prepend_before(:all, :type =&gt; :special)&quot; }
+
+            example_group = Class.new(ExampleGroup) do
+              describe(&quot;I'm not special&quot;, :type =&gt; :not_special)
+              it &quot;does nothing&quot;
             end
+            example_group.run
+            fiddle.should == [
+              'Example.prepend_before(:all)',
+              'Example.before(:all)',
+            ]
           end
-          suite = behaviour.suite
-          suite.tests.length.should == 0
-        end
-      end
 
-      describe ExampleGroup, &quot;.description&quot; do
-        it &quot;should return the same description instance for each call&quot; do
-          @example_group.description.should eql(@example_group.description)
-        end
-      end
+          it &quot;should add global before callbacks for targetted example_groups&quot; do
+            fiddle = []
+
+            ExampleGroup.before(:all) { fiddle &lt;&lt; &quot;Example.before(:all)&quot; }
+            ExampleGroup.prepend_before(:all) { fiddle &lt;&lt; &quot;Example.prepend_before(:all)&quot; }
+            @special_example_group.before(:each) { fiddle &lt;&lt; &quot;special.before(:each, :type =&gt; :special)&quot; }
+            @special_example_group.prepend_before(:each) { fiddle &lt;&lt; &quot;special.prepend_before(:each, :type =&gt; :special)&quot; }
+            @special_example_group.before(:all) { fiddle &lt;&lt; &quot;special.before(:all, :type =&gt; :special)&quot; }
+            @special_example_group.prepend_before(:all) { fiddle &lt;&lt; &quot;special.prepend_before(:all, :type =&gt; :special)&quot; }
+            @special_example_group.append_before(:each) { fiddle &lt;&lt; &quot;special.append_before(:each, :type =&gt; :special)&quot; }
+
+            example_group = Class.new(@special_example_group).describe(&quot;I'm a special example_group&quot;) {}
+            example_group.it(&quot;test&quot;) {true}
+            example_group.run
+            fiddle.should == [
+              'Example.prepend_before(:all)',
+              'Example.before(:all)',
+              'special.prepend_before(:all, :type =&gt; :special)',
+              'special.before(:all, :type =&gt; :special)',
+              'special.prepend_before(:each, :type =&gt; :special)',
+              'special.before(:each, :type =&gt; :special)',
+              'special.append_before(:each, :type =&gt; :special)',
+            ]
+          end
 
-      describe ExampleGroup, &quot;.remove_after&quot; do
-        it &quot;should unregister a given after(:each) block&quot; do
-          after_all_ran = false
-          @example_group.it(&quot;example&quot;) {}
-          proc = Proc.new { after_all_ran = true }
-          ExampleGroup.after(:each, &amp;proc)
-          suite = @example_group.suite
-          suite.run
-          after_all_ran.should be_true
-
-          after_all_ran = false
-          ExampleGroup.remove_after(:each, &amp;proc)
-          suite = @example_group.suite
-          suite.run
-          after_all_ran.should be_false
-        end
-      end
+          it &quot;should order before callbacks from global to local&quot; do
+            fiddle = []
+            ExampleGroup.prepend_before(:all) { fiddle &lt;&lt; &quot;Example.prepend_before(:all)&quot; }
+            ExampleGroup.before(:all) { fiddle &lt;&lt; &quot;Example.before(:all)&quot; }
+            example_group.prepend_before(:all) { fiddle &lt;&lt; &quot;prepend_before(:all)&quot; }
+            example_group.before(:all) { fiddle &lt;&lt; &quot;before(:all)&quot; }
+            example_group.prepend_before(:each) { fiddle &lt;&lt; &quot;prepend_before(:each)&quot; }
+            example_group.before(:each) { fiddle &lt;&lt; &quot;before(:each)&quot; }
+            example_group.run
+            fiddle.should == [
+              'Example.prepend_before(:all)',
+              'Example.before(:all)',
+              'prepend_before(:all)',
+              'before(:all)',
+              'prepend_before(:each)',
+              'before(:each)'
+            ]
+          end
+
+          it &quot;should order after callbacks from local to global&quot; do
+            fiddle = []
+            example_group.after(:each) { fiddle &lt;&lt; &quot;after(:each)&quot; }
+            example_group.append_after(:each) { fiddle &lt;&lt; &quot;append_after(:each)&quot; }
+            example_group.after(:all) { fiddle &lt;&lt; &quot;after(:all)&quot; }
+            example_group.append_after(:all) { fiddle &lt;&lt; &quot;append_after(:all)&quot; }
+            ExampleGroup.after(:all) { fiddle &lt;&lt; &quot;Example.after(:all)&quot; }
+            ExampleGroup.append_after(:all) { fiddle &lt;&lt; &quot;Example.append_after(:all)&quot; }
+            example_group.run
+            fiddle.should == [
+              'after(:each)',
+              'append_after(:each)',
+              'after(:all)',
+              'append_after(:all)',
+              'Example.after(:all)',
+              'Example.append_after(:all)'
+            ]
+          end
 
-      describe ExampleGroup, &quot;.include&quot; do
-        it &quot;should have accessible class methods from included module&quot; do
-          mod1_method_called = false
-          mod1 = Module.new do
-            class_methods = Module.new do
+          it &quot;should have accessible instance methods from included module&quot; do
+            mod1_method_called = false
+            mod1 = Module.new do
               define_method :mod1_method do
                 mod1_method_called = true
               end
             end
 
-            metaclass.class_eval do
-              define_method(:included) do |receiver|
-                receiver.extend class_methods
+            mod2_method_called = false
+            mod2 = Module.new do
+              define_method :mod2_method do
+                mod2_method_called = true
               end
             end
+
+            example_group.include mod1, mod2
+
+            example_group.it(&quot;test&quot;) do
+              mod1_method
+              mod2_method
+            end
+            example_group.run
+            mod1_method_called.should be_true
+            mod2_method_called.should be_true
           end
 
-          mod2_method_called = false
-          mod2 = Module.new do
-            class_methods = Module.new do
-              define_method :mod2_method do
-                mod2_method_called = true
-              end
+          it &quot;should include targetted modules included using configuration&quot; do
+            mod1 = Module.new
+            mod2 = Module.new
+            mod3 = Module.new
+            Spec::Runner.configuration.include(mod1, mod2)
+            Spec::Runner.configuration.include(mod3, :type =&gt; :not_special)
+
+            example_group = Class.new(@special_example_group).describe(&quot;I'm special&quot;, :type =&gt; :special) do
+              it &quot;does nothing&quot;
             end
+            example_group.run
+
+            example_group.included_modules.should include(mod1)
+            example_group.included_modules.should include(mod2)
+            example_group.included_modules.should_not include(mod3)
+          end
 
-            metaclass.class_eval do
-              define_method(:included) do |receiver|
-                receiver.extend class_methods
+          it &quot;should include any predicate_matchers included using configuration&quot; do
+            $included_predicate_matcher_found = false
+            Spec::Runner.configuration.predicate_matchers[:do_something] = :does_something?
+            example_group = Class.new(ExampleGroup) do
+              describe('example')
+              it &quot;should respond to do_something&quot; do
+                $included_predicate_matcher_found = respond_to?(:do_something)
               end
             end
+            example_group.run
+            $included_predicate_matcher_found.should be(true)
           end
 
-          @example_group.include mod1, mod2
+          it &quot;should use a mock framework set up in config&quot; do
+            mod = Module.new do
+              def self.included(mod)
+                $included_module = mod
+              end
 
-          @example_group.mod1_method
-          @example_group.mod2_method
-          mod1_method_called.should be_true
-          mod2_method_called.should be_true
-        end
-      end
+              def teardown_mocks_for_rspec
+                $torn_down = true
+              end
+            end
 
-      describe ExampleGroup, &quot;.number_of_examples&quot; do
-        it &quot;should count number of specs&quot; do
-          proc do
-            @example_group.it(&quot;one&quot;) {}
-            @example_group.it(&quot;two&quot;) {}
-            @example_group.it(&quot;three&quot;) {}
-            @example_group.it(&quot;four&quot;) {}
-          end.should change {@example_group.number_of_examples}.by(4)
-        end
-      end
+            begin
+              $included_module = nil
+              $torn_down = true
+              Spec::Runner.configuration.mock_with mod
+
+              example_group = Class.new(ExampleGroup) do
+                describe('example')
+                it &quot;does nothing&quot;
+              end
+              example_group.run
 
-      describe ExampleGroup, &quot;.class_eval&quot; do
-        it &quot;should allow constants to be defined&quot; do
-          behaviour = Class.new(ExampleGroup) do
-            describe('example')
-            FOO = 1
-            it &quot;should reference FOO&quot; do
-              FOO.should == 1
+              $included_module.should_not be_nil
+              $torn_down.should == true
+            ensure
+              Spec::Runner.configuration.mock_with :rspec
             end
           end
-          suite = behaviour.suite
-          suite.run
-          Object.const_defined?(:FOO).should == false
         end
-      end
 
-      describe ExampleGroup, '.register' do
-        it &quot;should add ExampleGroup to set of ExampleGroups to be run&quot; do
-          example_group.register
-          options.example_groups.should include(example_group)
-        end
-      end
+        describe ExampleGroup, &quot;#run with pending example that has a failing assertion&quot; do
+          before do
+            example_group.it(&quot;should be pending&quot;) do
+              pending(&quot;Example fails&quot;) {false.should be_true}
+            end
+          end
 
-      describe ExampleGroup, '.unregister' do
-        before do
-          example_group.register
-          options.example_groups.should include(example_group)
+          it &quot;should send example_pending to formatter&quot; do
+            @formatter.should_receive(:example_pending).with(&quot;example&quot;, &quot;should be pending&quot;, &quot;Example fails&quot;)
+            example_group.run
+          end
         end
 
-        it &quot;should remove ExampleGroup from set of ExampleGroups to be run&quot; do
-          example_group.unregister
-          options.example_groups.should_not include(example_group)
-        end
-      end
-    end
+        describe ExampleGroup, &quot;#run with pending example that does not have a failing assertion&quot; do
+          it_should_behave_like &quot;Spec::Example::ExampleGroup#run with failure in example&quot;
 
-    class ExampleModuleScopingSpec &lt; ExampleGroup
-      describe ExampleGroup, &quot; via a class definition&quot;
+          before do
+            example_group.it(&quot;should be pending&quot;) do
+              pending(&quot;Example passes&quot;) {true.should be_true}
+            end
+          end
 
-      module Foo
-        module Bar
-          def self.loaded?
-            true
+          it &quot;should send example_pending to formatter&quot; do
+            @formatter.should_receive(:example_pending).with(&quot;example&quot;, &quot;should be pending&quot;, &quot;Example passes&quot;)
+            example_group.run
           end
         end
-      end
-      include Foo
-
-      it &quot;should understand module scoping&quot; do
-        Bar.should be_loaded
-      end
 
-      @@foo = 1
+        describe ExampleGroup, &quot;#run when before(:all) fails&quot; do
+          it_should_behave_like &quot;Spec::Example::ExampleGroup#run with failure in example&quot;
 
-      it &quot;should allow class variables to be defined&quot; do
-        @@foo.should == 1
-      end
-    end
+          before do
+            ExampleGroup.before(:all) { raise NonStandardError, &quot;before(:all) failure&quot; }
+          end
 
-    class ExampleClassVariablePollutionSpec &lt; ExampleGroup
-      describe ExampleGroup, &quot; via a class definition without a class variable&quot;
+          it &quot;should not run any example&quot; do
+            spec_ran = false
+            example_group.it(&quot;test&quot;) {spec_ran = true}
+            example_group.run
+            spec_ran.should be_false
+          end
 
-      it &quot;should not retain class variables from other Example classes&quot; do
-        proc do
-          @@foo
-        end.should raise_error
-      end
-    end
+          it &quot;should run ExampleGroup after(:all)&quot; do
+            after_all_ran = false
+            ExampleGroup.after(:all) { after_all_ran = true }
+            example_group.run
+            after_all_ran.should be_true
+          end
 
-    describe ExampleGroup, '.run functional example' do
-      def count
-        @count ||= 0
-        @count = @count + 1
-        @count
-      end
+          it &quot;should run example_group after(:all)&quot; do
+            after_all_ran = false
+            example_group.after(:all) { after_all_ran = true }
+            example_group.run
+            after_all_ran.should be_true
+          end
 
-      before(:all) do
-        count.should == 1
-      end
+          it &quot;should supply before(:all) as description&quot; do
+            @reporter.should_receive(:failure) do |example, error|
+              example.description.should eql(&quot;before(:all)&quot;)
+              error.message.should eql(&quot;before(:all) failure&quot;)
+            end
 
-      before(:all) do
-        count.should == 2
-      end
+            example_group.it(&quot;test&quot;) {true}
+            example_group.run
+          end
+        end
 
-      before(:each) do
-        count.should == 3
-      end
+        describe ExampleGroup, &quot;#run when before(:each) fails&quot; do
+          it_should_behave_like &quot;Spec::Example::ExampleGroup#run with failure in example&quot;
 
-      before(:each) do
-        count.should == 4
-      end
+          before do
+            ExampleGroup.before(:each) { raise NonStandardError }
+          end
 
-      it &quot;should run before(:all), before(:each), example, after(:each), after(:all) in order&quot; do
-        count.should == 5
-      end
+          it &quot;should run after(:all)&quot; do
+            after_all_ran = false
+            ExampleGroup.after(:all) { after_all_ran = true }
+            example_group.run
+            after_all_ran.should be_true
+          end
+        end
 
-      after(:each) do
-        count.should == 7
-      end
+        describe ExampleGroup, &quot;#run when any example fails&quot; do
+          it_should_behave_like &quot;Spec::Example::ExampleGroup#run with failure in example&quot;
 
-      after(:each) do
-        count.should == 6
-      end
+          before do
+            example_group.it(&quot;should&quot;) { raise NonStandardError }
+          end
 
-      after(:all) do
-        count.should == 9
-      end
+          it &quot;should run after(:all)&quot; do
+            after_all_ran = false
+            ExampleGroup.after(:all) { after_all_ran = true }
+            example_group.run
+            after_all_ran.should be_true
+          end
+        end
 
-      after(:all) do
-        count.should == 8
-      end
-    end
+        describe ExampleGroup, &quot;#run when first after(:each) block fails&quot; do
+          it_should_behave_like &quot;Spec::Example::ExampleGroup#run with failure in example&quot;
 
-    describe ExampleGroup, &quot;#initialize&quot; do
-      the_behaviour = self
-      it &quot;should have copy of behaviour&quot; do
-        the_behaviour.superclass.should == ExampleGroup
-      end
-    end
+          before do
+            class &lt;&lt; example_group
+              attr_accessor :first_after_ran, :second_after_ran
+            end
+            example_group.first_after_ran = false
+            example_group.second_after_ran = false
 
-    describe ExampleGroup, &quot;#pending&quot; do
-      it &quot;should raise a Pending error when its block fails&quot; do
-        block_ran = false
-        lambda {
-          pending(&quot;something&quot;) do
-            block_ran = true
-            raise &quot;something wrong with my example&quot;
+            example_group.after(:each) do
+              self.class.second_after_ran = true
+            end
+            example_group.after(:each) do
+              self.class.first_after_ran = true
+              raise &quot;first&quot;
+            end
           end
-        }.should raise_error(Spec::Example::ExamplePendingError, &quot;something&quot;)
-        block_ran.should == true
-      end
 
-      it &quot;should raise Spec::Example::PendingExampleFixedError when its block does not fail&quot; do
-        block_ran = false
-        lambda {
-          pending(&quot;something&quot;) do
-            block_ran = true
+          it &quot;should run second after(:each) block&quot; do
+            reporter.should_receive(:example_finished) do |example, error|
+              example.should equal(example)
+              error.message.should eql(&quot;first&quot;)
+            end
+            example_group.run
+            example_group.first_after_ran.should be_true
+            example_group.second_after_ran.should be_true
           end
-        }.should raise_error(Spec::Example::PendingExampleFixedError, &quot;Expected pending 'something' to fail. No Error was raised.&quot;)
-        block_ran.should == true
-      end
-    end
+        end
 
-    describe ExampleGroup, &quot;#run&quot; do
-      before do
-        @options = ::Spec::Runner::Options.new(StringIO.new, StringIO.new)
-        @original_rspec_options = $rspec_options
-        $rspec_options = @options
-      end
+        describe ExampleGroup, &quot;#run when first before(:each) block fails&quot; do
+          it_should_behave_like &quot;Spec::Example::ExampleGroup#run with failure in example&quot;
 
-      after do
-        $rspec_options = @original_rspec_options
-      end
+          before do
+            class &lt;&lt; example_group
+              attr_accessor :first_before_ran, :second_before_ran
+            end
+            example_group.first_before_ran = false
+            example_group.second_before_ran = false
+
+            example_group.before(:each) do
+              self.class.first_before_ran = true
+              raise &quot;first&quot;
+            end
+            example_group.before(:each) do
+              self.class.second_before_ran = true
+            end
+          end
 
-      it &quot;should not run when there are no examples&quot; do
-        behaviour = Class.new(ExampleGroup) do
-          describe(&quot;Foobar&quot;)
+          it &quot;should not run second before(:each)&quot; do
+            reporter.should_receive(:example_finished) do |name, error|
+              error.message.should eql(&quot;first&quot;)
+            end
+            example_group.run
+            example_group.first_before_ran.should be_true
+            example_group.second_before_ran.should be_false
+          end
         end
-        behaviour.examples.should be_empty
 
-        reporter = mock(&quot;Reporter&quot;)
-        reporter.should_not_receive(:add_example_group)
-        suite = behaviour.suite
-        suite.run
+        describe ExampleGroup, &quot;#run when failure in after(:all)&quot; do
+          it_should_behave_like &quot;Spec::Example::ExampleGroup#run with failure in example&quot;
+
+          before do
+            ExampleGroup.after(:all) { raise NonStandardError, &quot;in after(:all)&quot; }
+          end
+
+          it &quot;should return false&quot; do
+            example_group.run.should be_false
+          end
+        end
       end
     end
 
@@ -432,36 +656,19 @@ module Spec
       end
 
       it &quot;should have access to the described_type&quot; do
-        behaviour = Class.new(ExampleSubclass) do
+        example_group = Class.new(ExampleSubclass) do
           describe(Array)
         end
-        behaviour.send(:described_type).should == Array
-      end
-    end
-
-    describe Enumerable do
-      def each(&amp;block)
-        [&quot;4&quot;, &quot;2&quot;, &quot;1&quot;].each(&amp;block)
+        example_group.__send__(:described_type).should == Array
       end
 
-      it &quot;should be included in examples because it is a module&quot; do
-        map{|e| e.to_i}.should == [4,2,1]
-      end
-    end
-
-    describe &quot;An&quot;, Enumerable, &quot;as a second argument&quot; do
-      def each(&amp;block)
-        [&quot;4&quot;, &quot;2&quot;, &quot;1&quot;].each(&amp;block)
-      end
-
-      it &quot;should be included in examples because it is a module&quot; do
-        map{|e| e.to_i}.should == [4,2,1]
-      end
-    end
-
-    describe String do
-      it &quot;should not be included in examples because it is not a module&quot; do
-        lambda{self.map}.should raise_error(NoMethodError, /undefined method `map' for/)
+      it &quot;should concat descriptions when nested&quot; do
+        example_group = Class.new(ExampleSubclass) do
+          describe(Array)
+          $nested_group = describe(&quot;when empty&quot;) do
+          end
+        end
+        $nested_group.description.to_s.should == &quot;Array when empty&quot;
       end
     end
   end</diff>
      <filename>vendor/plugins/rspec/spec/spec/example/example_group_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,60 +2,43 @@ require File.dirname(__FILE__) + '/../../spec_helper.rb'
 
 module Spec
   module Example
-    module ExampleMatcherSpecHelper
-      class MatchDescription
-        def initialize(description)
-          @description = description
-        end
-        
-        def matches?(matcher)
-          matcher.matches?(@description)
-        end
-        
-        def failure_message
-          &quot;expected matcher.matches?(#{@description.inspect}) to return true, got false&quot;
-        end
-        
-        def negative_failure_message
-          &quot;expected matcher.matches?(#{@description.inspect}) to return false, got true&quot;
-        end
-      end
+    describe ExampleMatcher, &quot;#matches?&quot; do
       def match_description(description)
-        MatchDescription.new(description)
+        simple_matcher do |actual, matcher|
+          matcher.failure_message = &quot;expected matcher.matches?(#{description.inspect}) to return true, got false&quot;
+          matcher.negative_failure_message = &quot;expected matcher.matches?(#{description.inspect}) to return false, got true&quot;
+          actual.matches?(description)
+        end
       end
-    end
-
-    describe ExampleMatcher, &quot;#matches?&quot; do
-      include ExampleMatcherSpecHelper
       
-      it &quot;should match correct behaviour and example&quot; do
-        matcher = ExampleMatcher.new(&quot;behaviour&quot;, &quot;example&quot;)
-        matcher.should match_description(&quot;behaviour example&quot;)
+      it &quot;should match correct example_group and example&quot; do
+        matcher = ExampleMatcher.new(&quot;example_group&quot;, &quot;example&quot;)
+        matcher.should match_description(&quot;example_group example&quot;)
       end
       
       it &quot;should not match wrong example&quot; do
-        matcher = ExampleMatcher.new(&quot;behaviour&quot;, &quot;other example&quot;)
-        matcher.should_not match_description(&quot;behaviour example&quot;)
+        matcher = ExampleMatcher.new(&quot;example_group&quot;, &quot;other example&quot;)
+        matcher.should_not match_description(&quot;example_group example&quot;)
       end
       
-      it &quot;should not match wrong behaviour&quot; do
-        matcher = ExampleMatcher.new(&quot;other behaviour&quot;, &quot;example&quot;)
-        matcher.should_not match_description(&quot;behaviour example&quot;)
+      it &quot;should not match wrong example_group&quot; do
+        matcher = ExampleMatcher.new(&quot;other example_group&quot;, &quot;example&quot;)
+        matcher.should_not match_description(&quot;example_group example&quot;)
       end
       
       it &quot;should match example only&quot; do
-        matcher = ExampleMatcher.new(&quot;behaviour&quot;, &quot;example&quot;)
+        matcher = ExampleMatcher.new(&quot;example_group&quot;, &quot;example&quot;)
         matcher.should match_description(&quot;example&quot;)
       end
 
-      it &quot;should match behaviour only&quot; do
-        matcher = ExampleMatcher.new(&quot;behaviour&quot;, &quot;example&quot;)
-        matcher.should match_description(&quot;behaviour&quot;)
+      it &quot;should match example_group only&quot; do
+        matcher = ExampleMatcher.new(&quot;example_group&quot;, &quot;example&quot;)
+        matcher.should match_description(&quot;example_group&quot;)
       end
 
-      it &quot;should match behaviour ending with before(:all)&quot; do
-        matcher = ExampleMatcher.new(&quot;behaviour&quot;, &quot;example&quot;)
-        matcher.should match_description(&quot;behaviour before(:all)&quot;)
+      it &quot;should match example_group ending with before(:all)&quot; do
+        matcher = ExampleMatcher.new(&quot;example_group&quot;, &quot;example&quot;)
+        matcher.should match_description(&quot;example_group before(:all)&quot;)
       end
       
       it &quot;should escape regexp chars&quot; do
@@ -63,7 +46,7 @@ module Spec
         matcher.should_not match_description(&quot;con p&quot;)
       end
       
-      it &quot;should match when behaviour is modularized&quot; do
+      it &quot;should match when example_group is modularized&quot; do
         matcher = ExampleMatcher.new(&quot;MyModule::MyClass&quot;, &quot;example&quot;)
         matcher.should match_description(&quot;MyClass example&quot;)
       end      </diff>
      <filename>vendor/plugins/rspec/spec/spec/example/example_matcher_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,62 +14,308 @@ module Spec
       end
     end
 
-    describe &quot;ExampleMethods with an included module that is reopened&quot; do
-      it &quot;should have repoened methods&quot; do
-        method(:module_that_is_reopened_method).should_not be_nil
+    describe ExampleMethods do
+      describe &quot;with an included module that is reopened&quot; do
+        it &quot;should have repoened methods&quot; do
+          method(:module_that_is_reopened_method).should_not be_nil
+        end
       end
-    end
 
-    describe ExampleMethods, &quot; lifecycle&quot; do
-      before do
-        @options = ::Spec::Runner::Options.new(StringIO.new, StringIO.new)
-        @options.formatters &lt;&lt; mock(&quot;formatter&quot;, :null_object =&gt; true)
-        @options.backtrace_tweaker = mock(&quot;backtrace_tweaker&quot;, :null_object =&gt; true)
-        @reporter = FakeReporter.new(@options)
-        @options.reporter = @reporter
-
-        ExampleMethods.before_all_parts.should == []
-        ExampleMethods.before_each_parts.should == []
-        ExampleMethods.after_each_parts.should == []
-        ExampleMethods.after_all_parts.should == []
-        def ExampleMethods.count
-          @count ||= 0
-          @count = @count + 1
-          @count
+      describe &quot;lifecycle&quot; do
+        with_sandboxed_options do
+          before do
+            @options.formatters &lt;&lt; mock(&quot;formatter&quot;, :null_object =&gt; true)
+            @options.backtrace_tweaker = mock(&quot;backtrace_tweaker&quot;, :null_object =&gt; true)
+            @reporter = FakeReporter.new(@options)
+            @options.reporter = @reporter
+            
+            ExampleGroup.before_all_parts.should == []
+            ExampleGroup.before_each_parts.should == []
+            ExampleGroup.after_each_parts.should == []
+            ExampleGroup.after_all_parts.should == []
+            def ExampleGroup.count
+              @count ||= 0
+              @count = @count + 1
+              @count
+            end
+          end
+
+          after do
+            ExampleGroup.instance_variable_set(&quot;@before_all_parts&quot;, [])
+            ExampleGroup.instance_variable_set(&quot;@before_each_parts&quot;, [])
+            ExampleGroup.instance_variable_set(&quot;@after_each_parts&quot;, [])
+            ExampleGroup.instance_variable_set(&quot;@after_all_parts&quot;, [])
+          end
+
+          it &quot;should pass before and after callbacks to all ExampleGroup subclasses&quot; do
+            ExampleGroup.before(:suite) do
+              ExampleGroup.count.should == 1
+            end
+
+            ExampleGroup.before(:all) do
+              ExampleGroup.count.should == 2
+            end
+
+            ExampleGroup.before(:each) do
+              ExampleGroup.count.should == 3
+            end
+
+            ExampleGroup.after(:each) do
+              ExampleGroup.count.should == 4
+            end
+
+            ExampleGroup.after(:all) do
+              ExampleGroup.count.should == 5
+            end
+
+            ExampleGroup.after(:suite) do
+              ExampleGroup.count.should == 6
+            end
+
+            Class.new(ExampleGroup) do
+              it &quot;should use ExampleMethods callbacks&quot; do end
+            end
+            @options.run_examples
+            ExampleGroup.count.should == 7
+          end
+
+          describe &quot;eval_block&quot; do
+            before(:each) do
+              @example_group = Class.new(ExampleGroup)
+            end
+          
+            describe &quot;with a given description&quot; do
+              it &quot;should provide the given description&quot; do
+                @example = @example_group.it(&quot;given description&quot;) { 2.should == 2 }
+                @example.eval_block
+                @example.description.should == &quot;given description&quot;
+              end
+            end
+
+            describe &quot;with no given description&quot; do
+              it &quot;should provide the generated description&quot; do
+                @example = @example_group.it { 2.should == 2 }
+                @example.eval_block
+                @example.description.should == &quot;should == 2&quot;
+              end
+            end
+          
+            describe &quot;with no implementation&quot; do
+              it &quot;should raise an NotYetImplementedError&quot; do
+                lambda {
+                  @example = @example_group.it
+                  @example.eval_block
+                }.should raise_error(Spec::Example::NotYetImplementedError, &quot;Not Yet Implemented&quot;)
+              end
+            
+              def extract_error(&amp;blk)
+                begin
+                  blk.call
+                rescue Exception =&gt; e
+                  return e
+                end
+              
+                nil
+              end
+            
+              it &quot;should use the proper file and line number for the NotYetImplementedError&quot; do
+                file = __FILE__
+                line_number = __LINE__ + 3
+              
+                error = extract_error do
+                  @example = @example_group.it
+                  @example.eval_block
+                end
+              
+                error.pending_caller.should == &quot;#{file}:#{line_number}&quot;
+              end
+            end
+          end
         end
       end
 
-      after do
-        ExampleMethods.instance_variable_set(&quot;@before_all_parts&quot;, [])
-        ExampleMethods.instance_variable_set(&quot;@before_each_parts&quot;, [])
-        ExampleMethods.instance_variable_set(&quot;@after_each_parts&quot;, [])
-        ExampleMethods.instance_variable_set(&quot;@after_all_parts&quot;, [])
+      describe &quot;#backtrace&quot; do        
+        with_sandboxed_options do
+          it &quot;returns the backtrace from where the example was defined&quot; do
+            example_group = Class.new(ExampleGroup) do
+              example &quot;of something&quot; do; end
+            end
+            
+            example = example_group.examples.first
+            example.backtrace.join(&quot;\n&quot;).should include(&quot;#{__FILE__}:#{__LINE__-4}&quot;)
+          end
+        end
       end
+      
+      describe &quot;#implementation_backtrace (deprecated)&quot; do
+        with_sandboxed_options do
+          before(:each) do
+            Kernel.stub!(:warn)
+          end
 
-      it &quot;should pass before and after callbacks to all ExampleGroup subclasses&quot; do
-        ExampleMethods.before(:all) do
-          ExampleMethods.count.should == 1
+          it &quot;sends a deprecation warning&quot; do
+            example_group = Class.new(ExampleGroup) {}
+            example = example_group.example(&quot;&quot;) {}
+            Kernel.should_receive(:warn).with(/#implementation_backtrace.*deprecated.*#backtrace instead/m)
+            example.implementation_backtrace
+          end
+          
+          it &quot;returns the backtrace from where the example was defined&quot; do
+            example_group = Class.new(ExampleGroup) do
+              example &quot;of something&quot; do; end
+            end
+            
+            example = example_group.examples.first
+            example.backtrace.join(&quot;\n&quot;).should include(&quot;#{__FILE__}:#{__LINE__-4}&quot;)
+          end
         end
+      end
 
-        ExampleMethods.before(:each) do
-          ExampleMethods.count.should == 2
+      describe &quot;#full_description&quot; do
+        it &quot;should return the full description of the ExampleGroup and Example&quot; do
+          example_group = Class.new(ExampleGroup).describe(&quot;An ExampleGroup&quot;) do
+            it &quot;should do something&quot; do
+            end
+          end
+          example = example_group.examples.first
+          example.full_description.should == &quot;An ExampleGroup should do something&quot;
         end
-
-        ExampleMethods.after(:each) do
-          ExampleMethods.count.should == 3
+      end
+      
+      describe &quot;#subject&quot; do
+        with_sandboxed_options do
+          it &quot;should return an instance variable named after the described type&quot; do
+            example_group = Class.new(ExampleGroup).describe(Array) do
+              example {}
+            end
+            example = example_group.examples.first
+            example.subject.should == []
+          end
+      
+          it &quot;should not barf on a module (as opposed to a class)&quot; do
+            example_group = Class.new(ExampleGroup).describe(ObjectSpace) do
+              example {}
+            end
+            example_group.examples.first.subject.should be_nil
+          end
+      
+          it &quot;should not barf on a string&quot; do
+            example_group = Class.new(ExampleGroup).describe('foo') do
+              example {}
+            end
+            example_group.examples.first.subject.should be_nil
+          end
+      
+          it &quot;should interact with the same scope as the before block&quot; do
+            example_group = Class.new(ExampleGroup) do
+              subject { @foo = 'foo'}
+              example { should == @foo}
+              it { should == 'foo'}
+            end
+            example_group.run.should be_true
+          end
         end
+      end
+
+      describe &quot;#should&quot; do
+        with_sandboxed_options do
+          class Thing
+            def ==(other)
+              true
+            end
+          end
+          
+          describe &quot;in an ExampleGroup with the ivar defined in before&quot; do
+            attr_reader :example, :success
+
+            before(:each) do
+              example_group = describe(Thing, &quot;1&quot;) do
+                before(:each) { @spec_example_thing = 'expected' }
+                it { should eql('expected') }
+              end
+              @example = example_group.examples.first
+              @success = example_group.run
+            end
+
+            it &quot;should create an example using the description from the matcher&quot; do
+              example.description.should == 'should eql &quot;expected&quot;'
+            end
 
-        ExampleMethods.after(:all) do
-          ExampleMethods.count.should == 4
+            it &quot;should test the matcher returned from the block&quot; do
+              success.should be_true
+            end
+          end
+
+          describe &quot;in an ExampleGroup with the subject defined using #subject&quot; do
+            it &quot;should create an example using the description from the matcher&quot; do
+              example_group = describe(Thing, &quot;2&quot;) do
+                subject {'this is the subject'}
+                it { should eql('this is the subject') }
+              end
+              example = example_group.examples.first
+              example_group.run
+              example.description.should =~ /should eql &quot;this is the subject&quot;/
+            end
+          end
+          
+          describe &quot;in an ExampleGroup using an implicit ivar&quot; do
+            it &quot;should create an example using the description from the matcher&quot; do
+              example_group = describe(Thing, &quot;3&quot;) do
+                it { should == Thing.new }
+              end
+              example = example_group.examples.first
+              success = example_group.run
+              example.description.should =~ /should == #&lt;Spec::Example::Thing/
+              success.should be_true
+            end
+          end
+          
+          after(:each) do
+            ExampleGroup.reset
+          end
+          
         end
+      end
+
+      describe &quot;#should_not&quot; do
+        with_sandboxed_options do
 
-        @example_group = Class.new(ExampleGroup) do
-          it &quot;should use ExampleMethods callbacks&quot; do
+          attr_reader :example_group, :example, :success
+
+          before do
+            @example_group = Class.new(ExampleGroup) do
+              def subject; @actual; end
+              before(:each) { @actual = 'expected' }
+              it { should_not eql('unexpected') }
+            end
+            @example = @example_group.examples.first
+
+            @success = example_group.run
+          end
+
+          it &quot;should create an example using the description from the matcher&quot; do
+            example.description.should == 'should not eql &quot;unexpected&quot;'
           end
+
+          it &quot;should test the matcher returned from the block&quot; do
+            success.should be_true
+          end
+
+          after do
+            ExampleGroup.reset
+          end
+
         end
-        @example_group.suite.run
-        ExampleMethods.count.should == 5
       end
     end
+
+    describe &quot;#options&quot; do
+      it &quot;should expose the options hash&quot; do
+        example_group = Class.new(ExampleGroup)
+        example = example_group.example &quot;name&quot;, :this =&gt; 'that' do; end
+        example.options[:this].should == 'that'
+      end
+    end
+
   end
-end
\ No newline at end of file
+end</diff>
      <filename>vendor/plugins/rspec/spec/spec/example/example_methods_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,249 +2,193 @@ require File.dirname(__FILE__) + '/../../spec_helper.rb'
 
 module Spec
   module Example
-    describe ExampleRunner, &quot;#run&quot;, :shared =&gt; true do
-      before(:each) do
-        @options = ::Spec::Runner::Options.new(StringIO.new, StringIO.new)
-        @reporter = ::Spec::Runner::Reporter.new(@options)
-        @options.reporter = @reporter
-        @example_group_class = Class.new(ExampleGroup) do
-          describe(&quot;Some Examples&quot;)
-        end
-      end
-
-      def create_runner(example_definition)
-        example = @example_group_class.new(example_definition)
-        runner = ExampleRunner.new(@options, example)
-        runner.stub!(:verify_mocks)
-        runner.stub!(:teardown_mocks)
-        runner
-      end
-    end
-
-    describe ExampleRunner, &quot;#run with blank passing example&quot; do
-      it_should_behave_like &quot;Spec::Example::ExampleRunner#run&quot;
-
-      before do
-        @e = @example_group_class.it(&quot;example&quot;) {}
-        @runner = create_runner(@e)
-      end
-      
-      it &quot;should send reporter example_started&quot; do
-        @reporter.should_receive(:example_started).with(equal(@e))
-        @runner.run
-      end
-
-      it &quot;should report its name for dry run&quot; do
-        @options.dry_run = true
-        @reporter.should_receive(:example_finished).with(equal(@e), nil, &quot;example&quot;)
-        @runner.run
-      end
-
-      it &quot;should report success&quot; do
-        @reporter.should_receive(:example_finished).with(equal(@e), nil, nil)
-        @runner.run
-      end
-    end
-
-    describe ExampleRunner, &quot;#run with a failing example&quot; do
-      predicate_matchers[:is_a] = [:is_a?]
-      it_should_behave_like &quot;Spec::Example::ExampleRunner#run&quot;
-
-      before do
-        @e = @example_group_class.it(&quot;example&quot;) do
-          (2+2).should == 5
-        end
-        @runner = create_runner(@e)
-      end
-
-      it &quot;should report failure due to failure&quot; do
-        @reporter.should_receive(:example_finished).with(
-          equal(@e),
-          is_a(Spec::Expectations::ExpectationNotMetError),
-          &quot;example&quot;
-        )
-        @runner.run
-      end
-    end
-
-    describe ExampleRunner, &quot;#run with a erroring example&quot; do
-      it_should_behave_like &quot;Spec::Example::ExampleRunner#run&quot;
-
-      before do
-        @error = error = NonStandardError.new(&quot;in body&quot;)
-        @example_definition = @example_group_class.it(&quot;example&quot;) do
-          raise(error)
-        end
-        @runner = create_runner(@example_definition)
-      end
-
-      it &quot;should report failure due to error&quot; do
-        @reporter.should_receive(:example_finished).with(
-          equal(@example_definition),
-          @error,
-          &quot;example&quot;
-        )
-        @runner.run
-      end
-
-      it &quot;should run after_each block&quot; do
-        @example_group_class.after(:each) do
-          raise(&quot;in after_each&quot;)
-        end
-        @reporter.should_receive(:example_finished) do |example_definition, error, location|
-          example_definition.should equal(@example_definition)
-          location.should eql(&quot;example&quot;)
-          error.message.should eql(&quot;in body&quot;)
-        end
-        @runner.run
-      end      
-    end
-
-    describe ExampleRunner, &quot;#run where before_each fails&quot; do
-      it_should_behave_like &quot;Spec::Example::ExampleRunner#run&quot;
-
-      before do
-        @example_ran = example_ran = false
-        @example_definition = @example_group_class.it(&quot;should not run&quot;) do
-          example_ran = true
-        end
-        @runner = create_runner(@example_definition)
-        @example_group_class.before(:each) {raise NonStandardError, &quot;in before_each&quot;}
-      end
-
-      it &quot;should not run example block if before_each fails&quot; do
-        @runner.run
-        @example_ran.should == false
-      end
-
-      it &quot;should run after_each block&quot; do
-        after_each_ran = false
-        @example_group_class.after(:each) {after_each_ran = true}
-        @runner.run
-        after_each_ran.should == true
-      end
-
-      it &quot;should report failure location when in before_each&quot; do
-        @reporter.should_receive(:example_finished) do |example_definition, error, location|
-          example_definition.should equal(@example_definition)
-          error.message.should eql(&quot;in before_each&quot;)
-          location.should eql(&quot;before(:each)&quot;)
-        end
-        @runner.run
-      end
-    end
-
-    describe ExampleRunner, &quot;#run where after_each fails&quot; do
-      it_should_behave_like &quot;Spec::Example::ExampleRunner#run&quot;
-
-      before do
-        @example_ran = example_ran = false
-        @example_definition = @example_group_class.it(&quot;should not run&quot;) do
-          example_ran = true
-        end
-        @runner = create_runner(@example_definition)
-        @example_group_class.after(:each) { raise(NonStandardError.new(&quot;in after_each&quot;)) }
-      end
-
-      it &quot;should report failure location when in after_each&quot; do
-        @reporter.should_receive(:example_finished) do |example_definition, error, location|
-          example_definition.should equal(@example_definition)
-          error.message.should eql(&quot;in after_each&quot;)
-          location.should eql(&quot;after(:each)&quot;)
-        end
-        @runner.run
-      end
-    end
-
-    describe ExampleRunner, &quot;#run with use cases&quot; do
-      predicate_matchers[:is_a] = [:is_a?]
-      it_should_behave_like &quot;Spec::Example::ExampleRunner#run&quot;
-
-      it &quot;should run example block in scope of example&quot; do
-        scope_object = nil
-        @example_definition = @example_group_class.it(&quot;should pass&quot;) do
-          self.instance_of?(Example).should == false
-          scope_object = self
-        end
-        @runner = create_runner(@example_definition)
-        @example_group_instance = @runner.example_group_instance
-
-        @reporter.should_receive(:example_finished).with(equal(@example_definition), nil, nil)
-        @runner.run
-        
-        scope_object.should == @example_group_instance
-        scope_object.should be_instance_of(@example_group_class)
-      end
-
-      it &quot;should report NO NAME when told to use generated description with --dry-run&quot; do
-        @options.dry_run = true
-        example_definition = @example_group_class.it(:__generate_docstring) do
-          5.should == 5
-        end
-        runner = create_runner(example_definition)
-
-        @reporter.should_receive(:example_finished) do |example_definition, error, location|
-          example_definition.description.should == &quot;NO NAME (Because of --dry-run)&quot;
-          location.should == &quot;NO NAME (Because of --dry-run)&quot;
-         end
-        runner.run
-      end
-
-      it &quot;should report given name if present with --dry-run&quot; do
-        @options.dry_run = true
-        example_definition = @example_group_class.it(&quot;example name&quot;) do
-          5.should == 5
-        end
-        runner = create_runner(example_definition)
-
-        @reporter.should_receive(:example_finished) do |example_definition, error, location|
-          example_definition.description.should == &quot;example name&quot;
-          location.should == &quot;example name&quot;
-         end
-        runner.run
-      end
-
-      it &quot;should report NO NAME when told to use generated description with no expectations&quot; do
-        example_definition = @example_group_class.it(:__generate_docstring) {}
-        runner = create_runner(example_definition)
-        @reporter.should_receive(:example_finished) do |example, error, location|
-          example.description.should == &quot;NO NAME (Because there were no expectations)&quot;
-        end
-        runner.run
-      end
-
-      it &quot;should report NO NAME when told to use generated description and matcher fails&quot; do
-        example_definition = @example_group_class.it(:__generate_docstring) do
-          5.should &quot;&quot; # Has no matches? method..
-        end
-        runner = create_runner(example_definition)
-
-        @reporter.should_receive(:example_finished) do |example, error, location|
-          example_definition.description.should == &quot;NO NAME (Because of Error raised in matcher)&quot;
-          location.should == &quot;NO NAME (Because of Error raised in matcher)&quot;
-        end
-        runner.run
-      end
-
-      it &quot;should report generated description when told to and it is available&quot; do
-        example_definition = @example_group_class.it(:__generate_docstring) {
-          5.should == 5
-        }
-        runner = create_runner(example_definition)
-        
-        @reporter.should_receive(:example_finished) do |example_definition, error, location|
-          example_definition.description.should == &quot;should == 5&quot;
-        end
-        runner.run
-      end
-
-      it &quot;should unregister description_generated callback (lest a memory leak should build up)&quot; do
-        example_definition = @example_group_class.it(&quot;something&quot;)
-        runner = create_runner(example_definition)
-
-        Spec::Matchers.should_receive(:clear_generated_description)
-        runner.run
-      end
-    end
+    # describe &quot;Spec::Example::ExampleRunner&quot;, &quot;#run&quot;, :shared =&gt; true do
+    #   before(:each) do
+    #     @options = ::Spec::Runner::Options.new(StringIO.new, StringIO.new)
+    #     @reporter = ::Spec::Runner::Reporter.new(@options)
+    #     @options.reporter = @reporter
+    #     @example_group_class = Class.new(ExampleGroup) do
+    #       plugin_mock_framework
+    #       describe(&quot;Some Examples&quot;)
+    #     end
+    #   end
+    # 
+    #   def create_runner(example_definition)
+    #     example = @example_group_class.new(example_definition)
+    #     runner = ExampleGroup.new(@options, example)
+    #     runner.stub!(:verify_mocks)
+    #     runner.stub!(:teardown_mocks)
+    #     runner
+    #   end
+    # end
+    # 
+    # describe ExampleRunner, &quot;#run with blank passing example&quot; do
+    #   it_should_behave_like &quot;Spec::Example::ExampleRunner#run&quot;
+    # 
+    #   before do
+    #     @e = @example_group_class.it(&quot;example&quot;) {}
+    #     @runner = create_runner(@e)
+    #   end
+    #   
+    #   it &quot;should send reporter example_started&quot; do
+    #     @reporter.should_receive(:example_started).with(equal(@e))
+    #     @runner.run
+    #   end
+    # 
+    #   it &quot;should report its name for dry run&quot; do
+    #     @options.dry_run = true
+    #     @reporter.should_receive(:example_finished).with(equal(@e), nil)
+    #     @runner.run
+    #   end
+    # 
+    #   it &quot;should report success&quot; do
+    #     @reporter.should_receive(:example_finished).with(equal(@e), nil)
+    #     @runner.run
+    #   end
+    # end
+    # 
+    # describe ExampleRunner, &quot;#run with a failing example&quot; do
+    #   predicate_matchers[:is_a] = [:is_a?]
+    #   it_should_behave_like &quot;Spec::Example::ExampleRunner#run&quot;
+    # 
+    #   before do
+    #     @e = @example_group_class.it(&quot;example&quot;) do
+    #       (2+2).should == 5
+    #     end
+    #     @runner = create_runner(@e)
+    #   end
+    # 
+    #   it &quot;should report failure due to failure&quot; do
+    #     @reporter.should_receive(:example_finished).with(
+    #       equal(@e),
+    #       is_a(Spec::Expectations::ExpectationNotMetError)
+    #     )
+    #     @runner.run
+    #   end
+    # end
+    # 
+    # describe ExampleRunner, &quot;#run with a erroring example&quot; do
+    #   it_should_behave_like &quot;Spec::Example::ExampleRunner#run&quot;
+    # 
+    #   before do
+    #     @error = error = NonStandardError.new(&quot;in body&quot;)
+    #     @example_definition = @example_group_class.it(&quot;example&quot;) do
+    #       raise(error)
+    #     end
+    #     @runner = create_runner(@example_definition)
+    #   end
+    # 
+    #   it &quot;should report failure due to error&quot; do
+    #     @reporter.should_receive(:example_finished).with(
+    #       equal(@example_definition),
+    #       @error
+    #     )
+    #     @runner.run
+    #   end
+    # 
+    #   it &quot;should run after_each block&quot; do
+    #     @example_group_class.after(:each) do
+    #       raise(&quot;in after_each&quot;)
+    #     end
+    #     @reporter.should_receive(:example_finished) do |example_definition, error|
+    #       example_definition.should equal(@example_definition)
+    #       error.message.should eql(&quot;in body&quot;)
+    #     end
+    #     @runner.run
+    #   end      
+    # end
+    # 
+    # describe ExampleRunner, &quot;#run where after_each fails&quot; do
+    #   it_should_behave_like &quot;Spec::Example::ExampleRunner#run&quot;
+    # 
+    #   before do
+    #     @example_ran = example_ran = false
+    #     @example_definition = @example_group_class.it(&quot;should not run&quot;) do
+    #       example_ran = true
+    #     end
+    #     @runner = create_runner(@example_definition)
+    #     @example_group_class.after(:each) { raise(NonStandardError.new(&quot;in after_each&quot;)) }
+    #   end
+    # 
+    #   it &quot;should report failure location when in after_each&quot; do
+    #     @reporter.should_receive(:example_finished) do |example_definition, error|
+    #       example_definition.should equal(@example_definition)
+    #       error.message.should eql(&quot;in after_each&quot;)
+    #     end
+    #     @runner.run
+    #   end
+    # end
+    # 
+    # describe ExampleRunner, &quot;#run with use cases&quot; do
+    #   predicate_matchers[:is_a] = [:is_a?]
+    #   it_should_behave_like &quot;Spec::Example::ExampleRunner#run&quot;
+    # 
+    #   it &quot;should report NO NAME when told to use generated description with --dry-run&quot; do
+    #     @options.dry_run = true
+    #     example_definition = @example_group_class.it() do
+    #       5.should == 5
+    #     end
+    #     runner = create_runner(example_definition)
+    # 
+    #     @reporter.should_receive(:example_finished) do |example_definition, error|
+    #       example_definition.description.should == &quot;NO NAME (Because of --dry-run)&quot;
+    #      end
+    #     runner.run
+    #   end
+    # 
+    #   it &quot;should report given name if present with --dry-run&quot; do
+    #     @options.dry_run = true
+    #     example_definition = @example_group_class.it(&quot;example name&quot;) do
+    #       5.should == 5
+    #     end
+    #     runner = create_runner(example_definition)
+    # 
+    #     @reporter.should_receive(:example_finished) do |example_definition, error|
+    #       example_definition.description.should == &quot;example name&quot;
+    #      end
+    #     runner.run
+    #   end
+    # 
+    #   it &quot;should report NO NAME when told to use generated description with no expectations&quot; do
+    #     example_definition = @example_group_class.it() {}
+    #     runner = create_runner(example_definition)
+    #     @reporter.should_receive(:example_finished) do |example, error|
+    #       example.description.should == &quot;NO NAME (Because there were no expectations)&quot;
+    #     end
+    #     runner.run
+    #   end
+    # 
+    #   it &quot;should report NO NAME when told to use generated description and matcher fails&quot; do
+    #     example_definition = @example_group_class.it() do
+    #       5.should &quot;&quot; # Has no matches? method..
+    #     end
+    #     runner = create_runner(example_definition)
+    # 
+    #     @reporter.should_receive(:example_finished) do |example, error|
+    #       example_definition.description.should == &quot;NO NAME (Because of Error raised in matcher)&quot;
+    #     end
+    #     runner.run
+    #   end
+    # 
+    #   it &quot;should report generated description when told to and it is available&quot; do
+    #     example_definition = @example_group_class.it() {
+    #       5.should == 5
+    #     }
+    #     runner = create_runner(example_definition)
+    #     
+    #     @reporter.should_receive(:example_finished) do |example_definition, error|
+    #       example_definition.description.should == &quot;should == 5&quot;
+    #     end
+    #     runner.run
+    #   end
+    # 
+    #   it &quot;should unregister description_generated callback (lest a memory leak should build up)&quot; do
+    #     example_definition = @example_group_class.it(&quot;something&quot;)
+    #     runner = create_runner(example_definition)
+    # 
+    #     Spec::Matchers.should_receive(:example_finished)
+    #     runner.run
+    #   end
+    # end
   end
 end</diff>
      <filename>vendor/plugins/rspec/spec/spec/example/example_runner_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -55,5 +55,17 @@ module Spec
         end
       end
     end
+
+    describe &quot;Nested Example Groups&quot; do
+      describe &quot;description options&quot;, :other_options =&gt; &quot;other options&quot; do
+        it &quot;should have a spec_path&quot; do
+          self.class.description_options[:spec_path].should match(/#{__FILE__}/)
+        end
+
+        it &quot;should pass other options&quot; do
+          self.class.description_options[:other_options].should == &quot;other options&quot;
+        end
+      end
+    end
   end
 end</diff>
      <filename>vendor/plugins/rspec/spec/spec/example/nested_example_group_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,28 +4,136 @@ module Spec
       
       it 'should raise an ExamplePendingError if no block is supplied' do
         lambda {
-          include Pending
           pending &quot;TODO&quot;
         }.should raise_error(ExamplePendingError, /TODO/)
       end
       
       it 'should raise an ExamplePendingError if a supplied block fails as expected' do
         lambda {
-          include Pending
           pending &quot;TODO&quot; do
             raise &quot;oops&quot;
           end
         }.should raise_error(ExamplePendingError, /TODO/)
       end
       
+      it 'should raise an ExamplePendingError if a supplied block fails as expected with a mock' do
+        lambda {
+          pending &quot;TODO&quot; do
+            m = mock('thing')
+            m.should_receive(:foo)
+            m.rspec_verify
+          end
+        }.should raise_error(ExamplePendingError, /TODO/)
+      end
+      
       it 'should raise a PendingExampleFixedError if a supplied block starts working' do
         lambda {
-          include Pending
           pending &quot;TODO&quot; do
             # success!
           end
         }.should raise_error(PendingExampleFixedError, /TODO/)
       end
+      
+      it &quot;should have the correct file and line number for pending given with a block which fails&quot; do
+        file = __FILE__
+        line_number = __LINE__ + 2
+        begin
+          pending do
+            raise
+          end
+        rescue =&gt; error
+          error.pending_caller.should == &quot;#{file}:#{line_number}&quot;
+        end
+      end
+      
+      it &quot;should have the correct file and line number for pending given with no block&quot; do
+        file = __FILE__
+        line_number = __LINE__ + 2
+        begin
+          pending(&quot;TODO&quot;)
+        rescue =&gt; error
+          error.pending_caller.should == &quot;#{file}:#{line_number}&quot;
+        end
+      end
+    end
+    
+    describe ExamplePendingError do
+      it &quot;should have the caller (from two calls from initialization)&quot; do
+        two_calls_ago = caller[0]
+        ExamplePendingError.new(&quot;a message&quot;).pending_caller.should == two_calls_ago
+      end
+      
+      it &quot;should keep the trace information from initialization&quot; do
+        two_calls_ago = caller[0]
+        obj = ExamplePendingError.new(&quot;a message&quot;)
+        obj.pending_caller
+        def another_caller(obj)
+          obj.pending_caller
+        end
+        
+        another_caller(obj).should == two_calls_ago
+      end
+      
+      it &quot;should have the message provided&quot; do
+        ExamplePendingError.new(&quot;a message&quot;).message.should == &quot;a message&quot;
+      end
+
+      it &quot;should use a 'ExamplePendingError' as it's default message&quot; do
+        ExamplePendingError.new.message.should == &quot;Spec::Example::ExamplePendingError&quot;
+      end
+    end
+    
+    describe NotYetImplementedError do
+      def rspec_root
+        File.expand_path(__FILE__.gsub(&quot;/spec/spec/example/pending_module_spec.rb&quot;, &quot;/lib&quot;))
+      end
+      
+      it &quot;should have the root rspec path&quot; do
+        NotYetImplementedError::RSPEC_ROOT_LIB.should == rspec_root
+      end
+      
+      it &quot;should always have the error 'Not Yet Implemented'&quot; do
+        NotYetImplementedError.new([]).message.should == &quot;Not Yet Implemented&quot;
+      end
+      
+      describe &quot;pending_caller&quot; do
+        it &quot;should select an element out of the backtrace&quot; do
+          error = NotYetImplementedError.new([&quot;foo/bar.rb:18&quot;])
+          
+          error.pending_caller.should == &quot;foo/bar.rb:18&quot;
+        end
+        
+        it &quot;should actually report the element from the backtrace&quot; do
+          error = NotYetImplementedError.new([&quot;bar.rb:18&quot;])
+          
+          error.pending_caller.should == &quot;bar.rb:18&quot;
+        end
+        
+        it &quot;should not use an element with the rspec root path&quot; do
+          error = NotYetImplementedError.new([&quot;#{rspec_root}:8&quot;])
+          
+          error.pending_caller.should be_nil
+        end
+        
+        it &quot;should select the first line in the backtrace which isn't in the rspec root&quot; do
+          error = NotYetImplementedError.new([
+            &quot;#{rspec_root}/foo.rb:2&quot;,
+            &quot;#{rspec_root}/foo/bar.rb:18&quot;,
+            &quot;path1.rb:22&quot;,
+            &quot;path2.rb:33&quot;
+          ])
+          
+          error.pending_caller.should == &quot;path1.rb:22&quot;
+        end
+        
+        it &quot;should cache the caller&quot; do
+          backtrace = mock('backtrace')
+          backtrace.should_receive(:detect).once
+          
+          error = NotYetImplementedError.new(backtrace)
+          error.pending_caller.should == error.pending_caller
+        end
+      end
     end
   end
 end</diff>
      <filename>vendor/plugins/rspec/spec/spec/example/pending_module_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,269 +3,254 @@ require File.dirname(__FILE__) + '/../../spec_helper'
 module Spec
   module Example
     describe ExampleGroup, &quot;with :shared =&gt; true&quot; do
-      before(:each) do
-        @options = ::Spec::Runner::Options.new(StringIO.new, StringIO.new)
-        @original_rspec_options = $rspec_options
-        $rspec_options = @options
-        @formatter = Spec::Mocks::Mock.new(&quot;formatter&quot;, :null_object =&gt; true)
-        @options.formatters &lt;&lt; @formatter
-        @behaviour = Class.new(ExampleGroup).describe(&quot;behaviour&quot;)
-        class &lt;&lt; @behaviour
-          public :include
+      with_sandboxed_options do
+        attr_reader :formatter, :example_group
+        before(:each) do
+          @formatter = Spec::Mocks::Mock.new(&quot;formatter&quot;, :null_object =&gt; true)
+          options.formatters &lt;&lt; formatter
+          @example_group = Class.new(ExampleGroup).describe(&quot;example_group&quot;)
+          class &lt;&lt; example_group
+            public :include
+          end
         end
-      end
-
-      after(:each) do
-        $rspec_options = @original_rspec_options
-        @formatter.rspec_verify
-        @behaviour = nil
-        $shared_example_groups.clear unless $shared_example_groups.nil?
-      end
-
-      def make_shared_example_group(name, opts=nil, &amp;block)
-        behaviour = SharedExampleGroup.new(name, :shared =&gt; true, &amp;block)
-        SharedExampleGroup.add_shared_example_group(behaviour)
-        behaviour
-      end
-
-      def non_shared_example_group()
-        @non_shared_example_group ||= Class.new(ExampleGroup).describe(&quot;behaviour&quot;)
-      end
-
-      it &quot;should accept an optional options hash&quot; do
-        lambda { Class.new(ExampleGroup).describe(&quot;context&quot;) }.should_not raise_error(Exception)
-        lambda { Class.new(ExampleGroup).describe(&quot;context&quot;, :shared =&gt; true) }.should_not raise_error(Exception)
-      end
-
-      it &quot;should return all shared behaviours&quot; do
-        b1 = make_shared_example_group(&quot;b1&quot;, :shared =&gt; true) {}
-        b2 = make_shared_example_group(&quot;b2&quot;, :shared =&gt; true) {}
-
-        b1.should_not be(nil)
-        b2.should_not be(nil)
-
-        SharedExampleGroup.find_shared_example_group(&quot;b1&quot;).should equal(b1)
-        SharedExampleGroup.find_shared_example_group(&quot;b2&quot;).should equal(b2)
-      end
-
-      it &quot;should register as shared behaviour&quot; do
-        behaviour = make_shared_example_group(&quot;behaviour&quot;) {}
-        SharedExampleGroup.shared_example_groups.should include(behaviour)
-      end
-
-      it &quot;should not be shared when not configured as shared&quot; do
-        behaviour = non_shared_example_group
-        SharedExampleGroup.shared_example_groups.should_not include(behaviour)
-      end
-
-      it &quot;should raise if run when shared&quot; do
-        behaviour = make_shared_example_group(&quot;context&quot;) {}
-        $example_ran = false
-        behaviour.it(&quot;test&quot;) {$example_ran = true}
-        lambda { behaviour.run(@formatter) }.should raise_error
-        $example_ran.should be_false
-      end
-
-      it &quot;should contain examples when shared&quot; do
-        shared_example_group = make_shared_example_group(&quot;shared behaviour&quot;) {}
-        shared_example_group.it(&quot;shared example&quot;) {}
-        shared_example_group.number_of_examples.should == 1
-      end
 
-      it &quot;should complain when adding a second shared behaviour with the same description&quot; do
-        describe &quot;shared behaviour&quot;, :shared =&gt; true do
+        after(:each) do
+          @formatter.rspec_verify
+          @example_group = nil
+          Spec::Example::SharedExampleGroup.clear
         end
-        lambda do
-          describe &quot;shared behaviour&quot;, :shared =&gt; true do
+        
+        describe &quot;#register&quot; do
+          it &quot;creates a new shared example group with the submitted args&quot; do
+            block = lambda {}
+            group = SharedExampleGroup.new(&quot;shared group&quot;) do end
+            Spec::Example::SharedExampleGroup.should_receive(:new).with(&quot;share me&quot;, &amp;block).and_return(group)
+            Spec::Example::SharedExampleGroup.register(&quot;share me&quot;, &amp;block)
           end
-        end.should raise_error(ArgumentError)
-      end
 
-      it &quot;should NOT complain when adding the same shared behaviour instance again&quot; do
-        shared_example_group = Class.new(ExampleGroup).describe(&quot;shared behaviour&quot;, :shared =&gt; true)
-        SharedExampleGroup.add_shared_example_group(shared_example_group)
-        SharedExampleGroup.add_shared_example_group(shared_example_group)
-      end
-
-      it &quot;should NOT complain when adding the same shared behaviour again (i.e. file gets reloaded)&quot; do
-        lambda do
-          2.times do
-            describe &quot;shared behaviour which gets loaded twice&quot;, :shared =&gt; true do
-            end
+          it &quot;registers the shared example group&quot; do
+            lambda do
+              Spec::Example::SharedExampleGroup.register &quot;share me&quot; do end
+            end.should change {Spec::Example::SharedExampleGroup.count}.by(1)
           end
-        end.should_not raise_error(ArgumentError)
-      end
+        end
 
-      it &quot;should NOT complain when adding the same shared behaviour in same file with different absolute path&quot; do
-        shared_example_group_1 = Class.new(ExampleGroup).describe(&quot;shared behaviour&quot;, :shared =&gt; true)
-        shared_example_group_2 = Class.new(ExampleGroup).describe(&quot;shared behaviour&quot;, :shared =&gt; true)
+        it &quot;complains when adding a second shared example_group with the same description&quot; do
+          describe &quot;shared example_group&quot;, :shared =&gt; true do
+          end
+          lambda do
+            describe &quot;shared example_group&quot;, :shared =&gt; true do
+            end
+          end.should raise_error(ArgumentError)
+        end
+        
+        it &quot;does NOT add the same group twice&quot; do
+          lambda do
+            2.times do
+              describe &quot;shared example_group which gets loaded twice&quot;, :shared =&gt; true do
+              end
+            end
+          end.should change {Spec::Example::SharedExampleGroup.count}.by(1)
+        end
 
-        shared_example_group_1.description[:spec_path] = &quot;/my/spec/a/../shared.rb&quot;
-        shared_example_group_2.description[:spec_path] = &quot;/my/spec/b/../shared.rb&quot;
+        it &quot;does NOT complain when adding the same shared example_group again (i.e. file gets reloaded)&quot; do
+          lambda do
+            2.times do
+              describe &quot;shared example_group which gets loaded twice&quot;, :shared =&gt; true do
+              end
+            end
+          end.should_not raise_error(ArgumentError)
+        end
 
-        SharedExampleGroup.add_shared_example_group(shared_example_group_1)
-        SharedExampleGroup.add_shared_example_group(shared_example_group_2)
-      end
+        it &quot;does NOT complain when adding the same shared example_group in same file with different absolute path&quot; do
+          SharedExampleGroup.register(
+            &quot;shared example_group&quot;,
+            :shared =&gt; true,
+            :spec_path =&gt; &quot;/my/spec/a/../shared.rb&quot;
+          )
+          SharedExampleGroup.register(
+            &quot;shared example_group&quot;,
+            :shared =&gt; true,
+            :spec_path =&gt; &quot;/my/spec/b/../shared.rb&quot;
+          )
+        end
 
-      it &quot;should complain when adding a different shared behaviour with the same name in a different file with the same basename&quot; do
-        shared_example_group_1 = Class.new(ExampleGroup).describe(&quot;shared behaviour&quot;, :shared =&gt; true)
-        shared_example_group_2 = Class.new(ExampleGroup).describe(&quot;shared behaviour&quot;, :shared =&gt; true)
+        it &quot;complains when adding a different shared example_group with the same name in a different file with the same basename&quot; do
+          SharedExampleGroup.register(
+            &quot;shared example_group&quot;,
+            :shared =&gt; true,
+            :spec_path =&gt; &quot;/my/spec/a/shared.rb&quot;
+          )
+          lambda do
+            SharedExampleGroup.register(
+              &quot;shared example_group&quot;,
+              :shared =&gt; true,
+              :spec_path =&gt; &quot;/my/spec/b/shared.rb&quot;
+            )
+          end.should raise_error(ArgumentError, /already exists/)
+        end
 
-        shared_example_group_1.description[:spec_path] = &quot;/my/spec/a/shared.rb&quot;
-        shared_example_group_2.description[:spec_path] = &quot;/my/spec/b/shared.rb&quot;
+        it &quot;adds examples to current example_group using it_should_behave_like&quot; do
+          shared_example_group = SharedExampleGroup.register(&quot;shared example_group&quot;) do
+            it(&quot;shared example&quot;) {}
+            it(&quot;shared example 2&quot;) {}
+          end
 
-        SharedExampleGroup.add_shared_example_group(shared_example_group_1)
-        lambda do
-          SharedExampleGroup.add_shared_example_group(shared_example_group_2)
-        end.should raise_error(ArgumentError, /already exists/)
-      end
+          example_group.it(&quot;example&quot;) {}
+          example_group.number_of_examples.should == 1
+          example_group.it_should_behave_like(&quot;shared example_group&quot;)
+          example_group.number_of_examples.should == 3
+        end
 
-      it &quot;should add examples to current behaviour using it_should_behave_like&quot; do
-        shared_example_group = make_shared_example_group(&quot;shared behaviour&quot;) {}
-        shared_example_group.it(&quot;shared example&quot;) {}
-        shared_example_group.it(&quot;shared example 2&quot;) {}
+        it &quot;adds examples to from two shared groups&quot; do
+          shared_example_group_1 = SharedExampleGroup.register(&quot;shared example_group 1&quot;) do
+            it(&quot;shared example 1&quot;) {}
+          end
 
-        @behaviour.it(&quot;example&quot;) {}
-        @behaviour.number_of_examples.should == 1
-        @behaviour.it_should_behave_like(&quot;shared behaviour&quot;)
-        @behaviour.number_of_examples.should == 3
-      end
+          shared_example_group_1 = SharedExampleGroup.register(&quot;shared example_group 2&quot;) do
+            it(&quot;shared example 2&quot;) {}
+          end
 
-      it &quot;should add examples to current behaviour using include&quot; do
-        shared_example_group = describe &quot;all things&quot;, :shared =&gt; true do
-          it &quot;should do stuff&quot; do end
+          example_group.it(&quot;example&quot;) {}
+          example_group.number_of_examples.should == 1
+          example_group.it_should_behave_like(&quot;shared example_group 1&quot;, &quot;shared example_group 2&quot;)
+          example_group.number_of_examples.should == 3
         end
+
+        it &quot;adds examples to current example_group using include&quot; do
+          shared_example_group = describe &quot;all things&quot;, :shared =&gt; true do
+            it &quot;should do stuff&quot; do end
+          end
         
-        behaviour = describe &quot;one thing&quot; do
-          include shared_example_group
-        end
+          example_group = describe &quot;one thing&quot; do
+            include shared_example_group
+          end
         
-        behaviour.number_of_examples.should == 1
-      end
-
-      it &quot;should add examples to current behaviour using it_should_behave_like with a module&quot; do
-        AllThings = describe &quot;all things&quot;, :shared =&gt; true do
-          it &quot;should do stuff&quot; do end
+          example_group.number_of_examples.should == 1
         end
+
+        it &quot;adds examples to current example_group using it_should_behave_like with a module&quot; do
+          AllThings = describe &quot;all things&quot;, :shared =&gt; true do
+            it &quot;should do stuff&quot; do end
+          end
         
-        behaviour = describe &quot;one thing&quot; do
-          it_should_behave_like AllThings
-        end
+          example_group = describe &quot;one thing&quot; do
+            it_should_behave_like AllThings
+          end
         
-        behaviour.number_of_examples.should == 1
-      end
-
-      it &quot;should run shared examples&quot; do
-        shared_example_ran = false
-        shared_example_group = make_shared_example_group(&quot;shared behaviour&quot;) {}
-        shared_example_group.it(&quot;shared example&quot;) { shared_example_ran = true }
+          example_group.number_of_examples.should == 1
+        end
 
-        example_ran = false
+        it &quot;runs shared examples&quot; do
+          shared_example_ran = false
+          shared_example_group = SharedExampleGroup.register(&quot;shared example_group&quot;) do
+            it(&quot;shared example&quot;) { shared_example_ran = true }
+          end
 
-        @behaviour.it_should_behave_like(&quot;shared behaviour&quot;)
-        @behaviour.it(&quot;example&quot;) {example_ran = true}
-        suite = @behaviour.suite
-        suite.run
-        example_ran.should be_true
-        shared_example_ran.should be_true
-      end
+          example_ran = false
 
-      it &quot;should run setup and teardown from shared behaviour&quot; do
-        shared_setup_ran = false
-        shared_teardown_ran = false
-        shared_example_group = make_shared_example_group(&quot;shared behaviour&quot;) {}
-        shared_example_group.before { shared_setup_ran = true }
-        shared_example_group.after { shared_teardown_ran = true }
-        shared_example_group.it(&quot;shared example&quot;) { shared_example_ran = true }
-
-        example_ran = false
-
-        @behaviour.it_should_behave_like(&quot;shared behaviour&quot;)
-        @behaviour.it(&quot;example&quot;) {example_ran = true}
-        suite = @behaviour.suite
-        suite.run
-        example_ran.should be_true
-        shared_setup_ran.should be_true
-        shared_teardown_ran.should be_true
-      end
+          example_group.it_should_behave_like(&quot;shared example_group&quot;)
+          example_group.it(&quot;example&quot;) {example_ran = true}
+          example_group.run
+          example_ran.should be_true
+          shared_example_ran.should be_true
+        end
 
-      it &quot;should run before(:all) and after(:all) only once from shared behaviour&quot; do
-        shared_before_all_run_count = 0
-        shared_after_all_run_count = 0
-        shared_example_group = make_shared_example_group(&quot;shared behaviour&quot;) {}
-        shared_example_group.before(:all) { shared_before_all_run_count += 1}
-        shared_example_group.after(:all) { shared_after_all_run_count += 1}
-        shared_example_group.it(&quot;shared example&quot;) { shared_example_ran = true }
-
-        example_ran = false
-
-        @behaviour.it_should_behave_like(&quot;shared behaviour&quot;)
-        @behaviour.it(&quot;example&quot;) {example_ran = true}
-        suite = @behaviour.suite
-        suite.run
-        example_ran.should be_true
-        shared_before_all_run_count.should == 1
-        shared_after_all_run_count.should == 1
-      end
+        it &quot;runs before(:each) and after(:each) from shared example_group&quot; do
+          shared_setup_ran = false
+          shared_teardown_ran = false
+          shared_example_group = SharedExampleGroup.register(&quot;shared example_group&quot;) do
+            before(:each) { shared_setup_ran = true }
+            after(:each)  { shared_teardown_ran = true }
+            it(&quot;shared example&quot;) { shared_example_ran = true }
+          end
 
-      it &quot;should include modules, included into shared behaviour, into current behaviour&quot; do
-        @formatter.should_receive(:add_example_group).with(any_args)
-        @formatter.should_receive(:example_finished).twice.with(any_args)
+          example_ran = false
 
-        shared_example_group = make_shared_example_group(&quot;shared behaviour&quot;) {}
-        shared_example_group.it(&quot;shared example&quot;) { shared_example_ran = true }
+          example_group.it_should_behave_like(&quot;shared example_group&quot;)
+          example_group.it(&quot;example&quot;) {example_ran = true}
+          example_group.run
+          example_ran.should be_true
+          shared_setup_ran.should be_true
+          shared_teardown_ran.should be_true
+        end
 
-        mod1_method_called = false
-        mod1 = Module.new do
-          define_method :mod1_method do
-            mod1_method_called = true
+        it &quot;should run before(:all) and after(:all) only once from shared example_group&quot; do
+          shared_before_all_run_count = 0
+          shared_after_all_run_count = 0
+          shared_example_group = SharedExampleGroup.register(&quot;shared example_group&quot;) do
+            before(:all) { shared_before_all_run_count += 1}
+            after(:all)  { shared_after_all_run_count += 1}
+            it(&quot;shared example&quot;) { shared_example_ran = true }
           end
+
+          example_ran = false
+
+          example_group.it_should_behave_like(&quot;shared example_group&quot;)
+          example_group.it(&quot;example&quot;) {example_ran = true}
+          example_group.run
+          example_ran.should be_true
+          shared_before_all_run_count.should == 1
+          shared_after_all_run_count.should == 1
         end
 
-        mod2_method_called = false
-        mod2 = Module.new do
-          define_method :mod2_method do
-            mod2_method_called = true
+        it &quot;should include modules, included into shared example_group, into current example_group&quot; do
+          @formatter.should_receive(:add_example_group).with(any_args)
+
+          shared_example_group = SharedExampleGroup.register(&quot;shared example_group&quot;) do
+            it(&quot;shared example&quot;) { shared_example_ran = true }
+          end
+
+          mod1_method_called = false
+          mod1 = Module.new do
+            define_method :mod1_method do
+              mod1_method_called = true
+            end
           end
-        end
 
-        shared_example_group.include mod2
+          mod2_method_called = false
+          mod2 = Module.new do
+            define_method :mod2_method do
+              mod2_method_called = true
+            end
+          end
 
-        @behaviour.it_should_behave_like(&quot;shared behaviour&quot;)
-        @behaviour.include mod1
+          shared_example_group.__send__ :include, mod2
 
-        @behaviour.it(&quot;test&quot;) do
-          mod1_method
-          mod2_method
-        end
-        suite = @behaviour.suite
-        suite.run
-        mod1_method_called.should be_true
-        mod2_method_called.should be_true
-      end
+          example_group.it_should_behave_like(&quot;shared example_group&quot;)
+          example_group.include mod1
 
-      it &quot;should make methods defined in the shared behaviour available in consuming behaviour&quot; do
-        shared_example_group = make_shared_example_group(&quot;shared behaviour xyz&quot;) do
-          def a_shared_helper_method
-            &quot;this got defined in a shared behaviour&quot;
+          example_group.it(&quot;test&quot;) do
+            mod1_method
+            mod2_method
           end
+          example_group.run
+          mod1_method_called.should be_true
+          mod2_method_called.should be_true
         end
-        @behaviour.it_should_behave_like(&quot;shared behaviour xyz&quot;)
-        success = false
-        @behaviour.it(&quot;should access a_shared_helper_method&quot;) do
-          a_shared_helper_method
-          success = true
+
+        it &quot;should make methods defined in the shared example_group available in consuming example_group&quot; do
+          shared_example_group = SharedExampleGroup.register(&quot;shared example_group xyz&quot;) do
+            def a_shared_helper_method
+              &quot;this got defined in a shared example_group&quot;
+            end
+          end
+          example_group.it_should_behave_like(&quot;shared example_group xyz&quot;)
+          success = false
+          example_group.it(&quot;should access a_shared_helper_method&quot;) do
+            a_shared_helper_method
+            success = true
+          end
+          example_group.run
+          success.should be_true
         end
-        suite = @behaviour.suite
-        suite.run
-        success.should be_true
-      end
 
-      it &quot;should raise when named shared behaviour can not be found&quot; do
-        lambda {
-          @behaviour.it_should_behave_like(&quot;non-existent shared example group&quot;)
-          violated
-        }.should raise_error(&quot;Shared Example Group 'non-existent shared example group' can not be found&quot;)
+        it &quot;should raise when named shared example_group can not be found&quot; do
+          lambda {
+            example_group.it_should_behave_like(&quot;non-existent shared example group&quot;)
+            violated
+          }.should raise_error(&quot;Shared Example Group 'non-existent shared example group' can not be found&quot;)
+        end
       end
     end
   end</diff>
      <filename>vendor/plugins/rspec/spec/spec/example/shared_example_group_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -28,7 +28,25 @@ describe &quot;Diff&quot; do
   it &quot;should output unified diff of two strings&quot; do
     expected=&quot;foo\nbar\nzap\nthis\nis\nsoo\nvery\nvery\nequal\ninsert\na\nline\n&quot;
     actual=&quot;foo\nzap\nbar\nthis\nis\nsoo\nvery\nvery\nequal\ninsert\na\nanother\nline\n&quot;
-    expected_diff=&quot;\n\n@@ -1,6 +1,6 @@\n foo\n-bar\n zap\n+bar\n this\n is\n soo\n@@ -9,5 +9,6 @@\n equal\n insert\n a\n+another\n line\n&quot;
+    expected_diff= &lt;&lt;'EOD'
+
+
+@@ -1,6 +1,6 @@
+ foo
+-zap
+ bar
++zap
+ this
+ is
+ soo
+@@ -9,6 +9,5 @@
+ equal
+ insert
+ a
+-another
+ line
+EOD
+
     diff = @differ.diff_as_string(expected, actual)
     diff.should eql(expected_diff)
   end
@@ -44,11 +62,11 @@ describe &quot;Diff&quot; do
   :metasyntactic,
   &quot;variable&quot;,
   :delta,
-- &quot;charlie&quot;,
-+ &quot;tango&quot;,
+- &quot;tango&quot;,
++ &quot;charlie&quot;,
   :width,
-- &quot;quite wide&quot;]
-+ &quot;very wide&quot;]
+- &quot;very wide&quot;]
++ &quot;quite wide&quot;]
 EOD
 
 
@@ -65,8 +83,8 @@ EOD
 @@ -1,5 +1,5 @@
  &lt;Animal
    name=bob,
--  species=giraffe
-+  species=tortoise
+-  species=tortoise
++  species=giraffe
  &gt;
 EOD
 
@@ -94,12 +112,12 @@ describe &quot;Diff in context format&quot; do
 *** 1,5 ****
   &lt;Animal
     name=bob,
-!   species=giraffe
+!   species=tortoise
   &gt;
 --- 1,5 ----
   &lt;Animal
     name=bob,
-!   species=tortoise
+!   species=giraffe
   &gt;
 EOD
 </diff>
      <filename>vendor/plugins/rspec/spec/spec/expectations/differs/default_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -39,12 +39,6 @@ describe Object, &quot;#should&quot; do
     }.should raise_error(Spec::Expectations::InvalidMatcherError)
   end
   
-  it &quot;should raise error if it receives nil&quot; do
-    lambda {
-      @target.should nil
-    }.should raise_error(Spec::Expectations::InvalidMatcherError)
-  end
-
   it &quot;should raise error if it receives no argument and it is not used as a left side of an operator&quot; do
     pending &quot;Is it even possible to catch this?&quot;
     lambda {
@@ -92,12 +86,6 @@ describe Object, &quot;#should_not&quot; do
     }.should raise_error(Spec::Expectations::InvalidMatcherError)
   end
 
-  it &quot;should raise error if it receives nil&quot; do
-    lambda {
-      @target.should_not nil
-    }.should raise_error(Spec::Expectations::InvalidMatcherError)
-  end
-
   it &quot;should raise error if it receives no argument and it is not used as a left side of an operator&quot; do
     pending &quot;Is it even possible to catch this?&quot;
     lambda {</diff>
      <filename>vendor/plugins/rspec/spec/spec/expectations/extensions/object_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,38 +1,40 @@
 require File.dirname(__FILE__) + '/../../spec_helper.rb'
 module Spec
   module Matchers
-    describe BeClose do
+    describe &quot;be_close&quot; do
       it &quot;should match when value == target&quot; do
-        BeClose.new(5.0, 0.5).matches?(5.0).should be_true
+        be_close(5.0, 0.5).matches?(5.0).should be_true
       end
       it &quot;should match when value &lt; (target + delta)&quot; do
-        BeClose.new(5.0, 0.5).matches?(5.49).should be_true
+        be_close(5.0, 0.5).matches?(5.49).should be_true
       end
       it &quot;should match when value &gt; (target - delta)&quot; do
-        BeClose.new(5.0, 0.5).matches?(4.51).should be_true
+        be_close(5.0, 0.5).matches?(4.51).should be_true
       end
       it &quot;should not match when value == (target - delta)&quot; do
-        BeClose.new(5.0, 0.5).matches?(4.5).should be_false
+        be_close(5.0, 0.5).matches?(4.5).should be_false
       end
       it &quot;should not match when value &lt; (target - delta)&quot; do
-        BeClose.new(5.0, 0.5).matches?(4.49).should be_false
+        be_close(5.0, 0.5).matches?(4.49).should be_false
       end
       it &quot;should not match when value == (target + delta)&quot; do
-        BeClose.new(5.0, 0.5).matches?(5.5).should be_false
+        be_close(5.0, 0.5).matches?(5.5).should be_false
       end
       it &quot;should not match when value &gt; (target + delta)&quot; do
-        BeClose.new(5.0, 0.5).matches?(5.51).should be_false
+        be_close(5.0, 0.5).matches?(5.51).should be_false
       end
       it &quot;should provide a useful failure message&quot; do
         #given
-          matcher = BeClose.new(5.0, 0.5)
+          matcher = be_close(5.0, 0.5)
         #when
           matcher.matches?(5.51)
         #then
           matcher.failure_message.should == &quot;expected 5.0 +/- (&lt; 0.5), got 5.51&quot;
       end
       it &quot;should describe itself&quot; do
-        BeClose.new(5.0, 0.5).description.should == &quot;be close to 5.0 (within +- 0.5)&quot;
+        matcher = be_close(5.0, 0.5)
+        matcher.matches?(5.1)
+        matcher.description.should == &quot;be close to 5.0 (within +- 0.5)&quot;
       end
     end
   end</diff>
      <filename>vendor/plugins/rspec/spec/spec/matchers/be_close_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,7 @@ describe &quot;should be_predicate&quot; do
   end
 
   it &quot;should pass when actual returns true for :predicates? (present tense)&quot; do
-    actual = stub(&quot;actual&quot;, :exists? =&gt; true)
+    actual = stub(&quot;actual&quot;, :exists? =&gt; true, :exist? =&gt; true)
     actual.should be_exist
   end
 
@@ -21,7 +21,23 @@ describe &quot;should be_predicate&quot; do
   it &quot;should fail when actual does not respond to :predicate?&quot; do
     lambda {
       Object.new.should be_happy
-    }.should raise_error(NameError)
+    }.should raise_error(NameError, /happy\?/)
+  end
+  
+  it &quot;should fail on error other than NameError&quot; do
+    actual = stub(&quot;actual&quot;)
+    actual.should_receive(:foo?).and_raise(&quot;aaaah&quot;)
+    lambda {
+      actual.should be_foo
+    }.should raise_error(/aaaah/)
+  end
+  
+  it &quot;should fail on error other than NameError (with the present tense predicate)&quot; do
+    actual = Object.new
+    actual.should_receive(:foos?).and_raise(&quot;aaaah&quot;)
+    lambda {
+      actual.should be_foo
+    }.should raise_error(/aaaah/)
   end
 end
 
@@ -121,7 +137,7 @@ describe &quot;should be_nil&quot; do
   it &quot;should fail when actual is not nil&quot; do
     lambda {
       :not_nil.should be_nil
-    }.should fail_with(&quot;expected nil, got :not_nil&quot;)
+    }.should fail_with(&quot;expected nil? to return true, got false&quot;)
   end
 end
 
@@ -133,7 +149,7 @@ describe &quot;should_not be_nil&quot; do
   it &quot;should fail when actual is nil&quot; do
     lambda {
       nil.should_not be_nil
-    }.should fail_with(&quot;expected not nil, got nil&quot;)
+    }.should fail_with(&quot;expected nil? to return false, got true&quot;)
   end
 end
 
@@ -195,7 +211,30 @@ describe &quot;should be ===&quot; do
   end
 
   it &quot;should fail when === operator returns false&quot; do
-    lambda { Hash.should be === &quot;not a hash&quot; }.should fail_with(%[expected === &quot;not a hash&quot;, got Hash])
+    lambda { Hash.should be === &quot;not a hash&quot; }.should fail_with(%[expected === not a hash, got Hash])
+  end
+end
+
+describe &quot;should_not with operators&quot; do
+  it &quot;should coach user to stop using operators with should_not&quot; do
+    lambda {
+      5.should_not be &lt; 6
+    }.should raise_error(/not only FAILED,\nit reads really poorly./m)
+  end
+end
+
+describe &quot;should be&quot; do
+  it &quot;should pass if actual is true or a set value&quot; do
+    true.should be
+    1.should be
+  end
+
+  it &quot;should fail if actual is false&quot; do
+    lambda {false.should be}.should fail_with(&quot;expected true, got false&quot;)
+  end
+
+  it &quot;should fail if actual is nil&quot; do
+    lambda {nil.should be}.should fail_with(&quot;expected true, got nil&quot;)
   end
 end
 
@@ -207,3 +246,36 @@ describe &quot;should be(value)&quot; do
     lambda { 5.should be(6) }.should fail_with(&quot;expected 6, got 5&quot;)
   end
 end
+
+describe &quot;'should be' with operator&quot; do
+  it &quot;should include 'be' in the description&quot; do
+    (be &gt; 6).description.should =~ /be &gt; 6/
+    (be &gt;= 6).description.should =~ /be &gt;= 6/
+    (be &lt;= 6).description.should =~ /be &lt;= 6/
+    (be &lt; 6).description.should =~ /be &lt; 6/
+  end
+end
+
+
+describe &quot;arbitrary predicate with DelegateClass&quot; do
+  it &quot;should access methods defined in the delegating class (LH[#48])&quot; do
+    pending(%{
+      Looks like DelegateClass is delegating #should to the
+      delegate. Not sure how to fix this one. Or if we even should.&quot;
+    })
+    require 'delegate'
+    class ArrayDelegate &lt; DelegateClass(Array)
+      def initialize(array)
+        @internal_array = array
+        super(@internal_array)
+      end
+
+      def large?
+        @internal_array.size &gt;= 5
+      end
+    end
+
+    delegate = ArrayDelegate.new([1,2,3,4,5,6])
+    delegate.should be_large
+  end
+end</diff>
      <filename>vendor/plugins/rspec/spec/spec/matchers/be_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -55,10 +55,9 @@ describe &quot;should change { block }&quot; do
     end.should fail_with(&quot;result should have changed, but is still 5&quot;)
   end
   
-  it &quot;should warn if passed a block using do/end&quot; do
+  it &quot;should warn if passed a block using do/end instead of {}&quot; do
     lambda do
-      lambda {}.should change do
-      end
+      lambda {}.should change do; end
     end.should raise_error(Spec::Matchers::MatcherError, /block passed to should or should_not/)
   end
 end
@@ -79,10 +78,9 @@ describe &quot;should_not change { block }&quot; do
     end.should fail_with(&quot;result should not have changed, but did change from 5 to 6&quot;)
   end
   
-  it &quot;should warn if passed a block using do/end&quot; do
+  it &quot;should warn if passed a block using do/end instead of {}&quot; do
     lambda do
-      lambda {}.should_not change do
-      end
+      lambda {}.should_not change do; end
     end.should raise_error(Spec::Matchers::MatcherError, /block passed to should or should_not/)
   end
 end
@@ -317,3 +315,15 @@ describe &quot;should change{ block }.from(old).to(new)&quot; do
     lambda { @instance.some_value = &quot;cat&quot; }.should change{@instance.some_value}.from(&quot;string&quot;).to(&quot;cat&quot;)
   end
 end
+
+describe Spec::Matchers::Change do
+  it &quot;should work when the receiver has implemented #send&quot; do
+    @instance = SomethingExpected.new
+    @instance.some_value = &quot;string&quot;
+    def @instance.send(*args); raise &quot;DOH! Library developers shouldn't use #send!&quot; end
+    
+    lambda {
+      lambda { @instance.some_value = &quot;cat&quot; }.should change(@instance, :some_value)
+    }.should_not raise_error
+  end
+end</diff>
      <filename>vendor/plugins/rspec/spec/spec/matchers/change_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,14 +1,10 @@
 require File.dirname(__FILE__) + '/../../spec_helper.rb'
 
 describe &quot;Matchers should be able to generate their own descriptions&quot; do
-  before(:each) do
-    Spec::Matchers.clear_generated_description
-  end
-
   after(:each) do
     Spec::Matchers.clear_generated_description
   end
-  
+
   it &quot;should == expected&quot; do
     &quot;this&quot;.should == &quot;this&quot;
     Spec::Matchers.generated_description.should == &quot;should == \&quot;this\&quot;&quot;
@@ -111,6 +107,11 @@ describe &quot;Matchers should be able to generate their own descriptions&quot; do
     [1,2,3].should include(3)
     Spec::Matchers.generated_description.should == &quot;should include 3&quot;
   end
+
+  it &quot;array.should =~ [1,2,3]&quot; do
+    [1,2,3].should =~ [1,2,3]
+    Spec::Matchers.generated_description.should == &quot;should contain exactly 1, 2 and 3&quot;
+  end
   
   it &quot;should match&quot; do
     &quot;this string&quot;.should match(/this string/)
@@ -134,7 +135,7 @@ describe &quot;Matchers should be able to generate their own descriptions&quot; do
   
   it &quot;should respond_to&quot; do
     [].should respond_to(:insert)
-    Spec::Matchers.generated_description.should == &quot;should respond to #insert&quot;
+    Spec::Matchers.generated_description.should == &quot;should respond to [:insert]&quot;
   end
   
   it &quot;should throw symbol&quot; do
@@ -155,3 +156,17 @@ describe &quot;Matchers should be able to generate their own descriptions&quot; do
     end.new
   end
 end
+
+describe &quot;a Matcher with no description&quot; do
+  def matcher
+     Class.new do
+       def matches?(ignore); true; end
+       def failure_message; &quot;&quot;; end
+     end.new
+  end
+  
+  it &quot;should provide a helpful message when used in a string-less example block&quot; do
+    5.should matcher
+    Spec::Matchers.generated_description.should =~ /When you call.*description method/m
+  end
+end</diff>
      <filename>vendor/plugins/rspec/spec/spec/matchers/description_generation_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,24 +2,25 @@ require File.dirname(__FILE__) + '/../../spec_helper.rb'
 
 module Spec
   module Matchers
-    describe Eql do
+    describe &quot;eql&quot; do
       it &quot;should match when actual.eql?(expected)&quot; do
-        Eql.new(1).matches?(1).should be_true
+        eql(1).matches?(1).should be_true
       end
       it &quot;should not match when !actual.eql?(expected)&quot; do
-        Eql.new(1).matches?(2).should be_false
+        eql(1).matches?(2).should be_false
       end
       it &quot;should describe itself&quot; do
-        matcher = Eql.new(1)
+        matcher = eql(1)
+        matcher.matches?(1)
         matcher.description.should == &quot;eql 1&quot;
       end
       it &quot;should provide message, expected and actual on #failure_message&quot; do
-        matcher = Eql.new(&quot;1&quot;)
+        matcher = eql(&quot;1&quot;)
         matcher.matches?(1)
         matcher.failure_message.should == [&quot;expected \&quot;1\&quot;, got 1 (using .eql?)&quot;, &quot;1&quot;, 1]
       end
       it &quot;should provide message, expected and actual on #negative_failure_message&quot; do
-        matcher = Eql.new(1)
+        matcher = eql(1)
         matcher.matches?(1)
         matcher.negative_failure_message.should == [&quot;expected 1 not to equal 1 (using .eql?)&quot;, 1, 1]
       end</diff>
      <filename>vendor/plugins/rspec/spec/spec/matchers/eql_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,24 +2,25 @@ require File.dirname(__FILE__) + '/../../spec_helper.rb'
 
 module Spec
   module Matchers
-    describe Equal do
+    describe &quot;equal&quot; do
       it &quot;should match when actual.equal?(expected)&quot; do
-        Equal.new(1).matches?(1).should be_true
+        equal(1).matches?(1).should be_true
       end
       it &quot;should not match when !actual.equal?(expected)&quot; do
-        Equal.new(&quot;1&quot;).matches?(&quot;1&quot;).should be_false
+        equal(&quot;1&quot;).matches?(&quot;1&quot;).should be_false
       end
       it &quot;should describe itself&quot; do
-        matcher = Equal.new(1)
+        matcher = equal(1)
+        matcher.matches?(1)
         matcher.description.should == &quot;equal 1&quot;
       end
       it &quot;should provide message, expected and actual on #failure_message&quot; do
-        matcher = Equal.new(&quot;1&quot;)
+        matcher = equal(&quot;1&quot;)
         matcher.matches?(1)
         matcher.failure_message.should == [&quot;expected \&quot;1\&quot;, got 1 (using .equal?)&quot;, &quot;1&quot;, 1]
       end
       it &quot;should provide message, expected and actual on #negative_failure_message&quot; do
-        matcher = Equal.new(1)
+        matcher = equal(1)
         matcher.matches?(1)
         matcher.negative_failure_message.should == [&quot;expected 1 not to equal 1 (using .equal?)&quot;, 1, 1]
       end</diff>
      <filename>vendor/plugins/rspec/spec/spec/matchers/equal_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,27 +1,5 @@
 require File.dirname(__FILE__) + '/../../spec_helper.rb'
 
-# NOTE - this was initially handled by an explicit matcher, but is now
-# handled by a default set of predicate_matchers.
-
-# module Spec
-#   module Matchers
-#     class Exist
-#       def matches? actual
-#         @actual = actual
-#         @actual.exist?
-#       end
-#       def failure_message
-#         &quot;expected #{@actual.inspect} to exist, but it doesn't.&quot;
-#       end
-#       def negative_failure_message
-#         &quot;expected #{@actual.inspect} to not exist, but it does.&quot;
-#       end
-#     end
-#     def exist; Exist.new; end
-#   end
-# end
-
-
 class Substance
   def initialize exists, description
     @exists = exists
@@ -45,31 +23,35 @@ class SubstanceTester
   end
 end
 
-describe &quot;should exist&quot; do
+describe &quot;should exist,&quot; do
+  
   before(:each) do
     @real = Substance.new true, 'something real'
     @imaginary = Substance.new false, 'something imaginary'
   end
+
+  describe &quot;within an example group&quot; do
   
-  it &quot;should pass if target exists&quot; do
-    @real.should exist
-  end
+    it &quot;should pass if target exists&quot; do
+      @real.should exist
+    end
   
-  it &quot;should fail if target does not exist&quot; do
-    lambda { @imaginary.should exist }.
-      should fail
+    it &quot;should fail if target does not exist&quot; do
+      lambda { @imaginary.should exist }.should fail
+    end
+    
+    it &quot;should pass if target doesn't exist&quot; do
+      lambda { @real.should_not exist }.should fail
+    end
   end
-end
 
-describe &quot;should exist, outside of a behavior&quot; do
-  before(:each) do
-    @real = Substance.new true, 'something real'
-    @imaginary = Substance.new false, 'something imaginary'
-  end
-  it &quot;should pass if target exists&quot; do
-    pending(&quot;need to either find a way to include stock predicate matchers in Spec::Matchers or add Bret's Exist matcher&quot;) do
+  describe &quot;outside of an example group&quot; do
+
+    it &quot;should pass if target exists&quot; do
       real_tester = SubstanceTester.new @real
       real_tester.should_exist
     end
+
   end
+
 end</diff>
      <filename>vendor/plugins/rspec/spec/spec/matchers/exist_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -48,53 +48,73 @@ end
 
 module Spec
   module Expectations
-    describe ExpectationMatcherHandler, &quot;.handle_matcher&quot; do
-      it &quot;should ask the matcher if it matches&quot; do
-        matcher = mock(&quot;matcher&quot;)
-        actual = Object.new
-        matcher.should_receive(:matches?).with(actual).and_return(true)
-        ExpectationMatcherHandler.handle_matcher(actual, matcher)
-      end
-      
-      it &quot;should explain when the matcher parameter is not a matcher&quot; do
-        begin
-          nonmatcher = mock(&quot;nonmatcher&quot;)
+    describe ExpectationMatcherHandler do
+      describe &quot;#handle_matcher&quot; do
+        it &quot;should ask the matcher if it matches&quot; do
+          matcher = mock(&quot;matcher&quot;)
           actual = Object.new
-          ExpectationMatcherHandler.handle_matcher(actual, nonmatcher)
-        rescue Spec::Expectations::InvalidMatcherError =&gt; e
+          matcher.should_receive(:matches?).with(actual).and_return(true)
+          Spec::Expectations::ExpectationMatcherHandler.handle_matcher(actual, matcher)
         end
+      
+        it &quot;should explain when the matcher parameter is not a matcher&quot; do
+          begin
+            nonmatcher = mock(&quot;nonmatcher&quot;)
+            actual = Object.new
+            Spec::Expectations::ExpectationMatcherHandler.handle_matcher(actual, nonmatcher)
+          rescue Spec::Expectations::InvalidMatcherError =&gt; e
+          end
 
-        e.message.should =~ /^Expected a matcher, got /
+          e.message.should =~ /^Expected a matcher, got /
+        end
+        
+        it &quot;should return the match value&quot; do
+          matcher = mock(&quot;matcher&quot;)
+          actual = Object.new
+          matcher.should_receive(:matches?).with(actual).and_return(:this_value)
+          Spec::Expectations::ExpectationMatcherHandler.handle_matcher(actual, matcher).should == :this_value
+        end
       end
     end
 
-    describe NegativeExpectationMatcherHandler, &quot;.handle_matcher&quot; do
-      it &quot;should explain when matcher does not support should_not&quot; do
-        matcher = mock(&quot;matcher&quot;)
-        matcher.stub!(:matches?)
-        actual = Object.new
-        lambda {
-          NegativeExpectationMatcherHandler.handle_matcher(actual, matcher)
-        }.should fail_with(/Matcher does not support should_not.\n/)
-      end      
-      
-      it &quot;should ask the matcher if it matches&quot; do
-        matcher = mock(&quot;matcher&quot;)
-        actual = Object.new
-        matcher.stub!(:negative_failure_message)
-        matcher.should_receive(:matches?).with(actual).and_return(false)
-        NegativeExpectationMatcherHandler.handle_matcher(actual, matcher)
-      end
+    describe NegativeExpectationMatcherHandler do
+      describe &quot;#handle_matcher&quot; do
+        it &quot;should explain when matcher does not support should_not&quot; do
+          matcher = mock(&quot;matcher&quot;)
+          matcher.stub!(:matches?)
+          actual = Object.new
+          lambda {
+            Spec::Expectations::NegativeExpectationMatcherHandler.handle_matcher(actual, matcher)
+          }.should fail_with(/Matcher does not support should_not.\n/)
+        end      
       
-      it &quot;should explain when the matcher parameter is not a matcher&quot; do
-        begin
-          nonmatcher = mock(&quot;nonmatcher&quot;)
+        it &quot;should ask the matcher if it matches&quot; do
+          matcher = mock(&quot;matcher&quot;)
           actual = Object.new
-          NegativeExpectationMatcherHandler.handle_matcher(actual, nonmatcher)
-        rescue Spec::Expectations::InvalidMatcherError =&gt; e
+          matcher.stub!(:negative_failure_message)
+          matcher.should_receive(:matches?).with(actual).and_return(false)
+          Spec::Expectations::NegativeExpectationMatcherHandler.handle_matcher(actual, matcher)
         end
+      
+        it &quot;should explain when the matcher parameter is not a matcher&quot; do
+          begin
+            nonmatcher = mock(&quot;nonmatcher&quot;)
+            actual = Object.new
+            Spec::Expectations::NegativeExpectationMatcherHandler.handle_matcher(actual, nonmatcher)
+          rescue Spec::Expectations::InvalidMatcherError =&gt; e
+          end
 
-        e.message.should =~ /^Expected a matcher, got /
+          e.message.should =~ /^Expected a matcher, got /
+        end
+
+        
+        it &quot;should return the match value&quot; do
+          matcher = mock(&quot;matcher&quot;)
+          actual = Object.new
+          matcher.should_receive(:matches?).with(actual).and_return(false)
+          matcher.stub!(:negative_failure_message).and_return(&quot;ignore&quot;)
+          Spec::Expectations::NegativeExpectationMatcherHandler.handle_matcher(actual, matcher).should be_false
+        end
       end
     end
     
@@ -124,6 +144,7 @@ module Spec
         }.should fail_with(/Matcher does not support should_not.\n/)
       end
 
+
     end
   end
 end</diff>
      <filename>vendor/plugins/rspec/spec/spec/matchers/handler_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,6 +16,14 @@ describe &quot;should have_sym(*args)&quot; do
       Object.new.should have_key(:a)
     }.should raise_error(NoMethodError)
   end
+  
+  it &quot;should reraise an exception thrown in #has_sym?(*args)&quot; do
+    o = Object.new
+    def o.has_sym?(*args)
+      raise &quot;Funky exception&quot;
+    end
+    lambda { o.should have_sym(:foo) }.should raise_error(&quot;Funky exception&quot;)
+  end
 end
 
 describe &quot;should_not have_sym(*args)&quot; do
@@ -34,4 +42,22 @@ describe &quot;should_not have_sym(*args)&quot; do
       Object.new.should have_key(:a)
     }.should raise_error(NoMethodError)
   end
+  
+  it &quot;should reraise an exception thrown in #has_sym?(*args)&quot; do
+    o = Object.new
+    def o.has_sym?(*args)
+      raise &quot;Funky exception&quot;
+    end
+    lambda { o.should_not have_sym(:foo) }.should raise_error(&quot;Funky exception&quot;)
+  end
+end
+
+describe &quot;has&quot; do
+  it &quot;should work when the target implements #send&quot; do
+    o = {:a =&gt; &quot;A&quot;}
+    def o.send(*args); raise &quot;DOH! Library developers shouldn't use #send!&quot; end
+    lambda {
+      o.should have_key(:a)
+    }.should_not raise_error
+  end
 end</diff>
      <filename>vendor/plugins/rspec/spec/spec/matchers/has_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 require File.dirname(__FILE__) + '/../../spec_helper.rb'
 
-module HaveSpecHelper
+share_as :HaveSpecHelper do
   def create_collection_owner_with(n)
     owner = Spec::Expectations::Helper::CollectionOwner.new
     (1..n).each do |n|
@@ -9,8 +9,21 @@ module HaveSpecHelper
     end
     owner
   end
+  before(:each) do
+    unless defined?(ActiveSupport::Inflector)
+      @active_support_was_not_defined
+      module ActiveSupport
+        class Inflector
+          def self.pluralize(string)
+            string.to_s + 's'
+          end
+        end
+      end
+    end
+  end
 end
 
+
 describe &quot;should have(n).items&quot; do
   include HaveSpecHelper
 
@@ -47,6 +60,47 @@ describe &quot;should have(n).items&quot; do
   end
 end
 
+describe 'should have(1).item when ActiveSupport::Inflector is defined' do
+  include HaveSpecHelper
+  
+  it 'should pluralize the collection name' do
+    owner = create_collection_owner_with(1)
+    owner.should have(1).item
+  end
+  
+  after(:each) do
+    if @active_support_was_not_defined
+      Object.__send__ :remove_const, :ActiveSupport
+    end
+  end
+end
+
+describe 'should have(1).item when Inflector is defined' do
+  include HaveSpecHelper
+  
+  before(:each) do
+    unless defined?(Inflector)
+      @inflector_was_not_defined
+      class Inflector
+        def self.pluralize(string)
+          string.to_s + 's'
+        end
+      end
+    end
+  end
+  
+  it 'should pluralize the collection name' do
+    owner = create_collection_owner_with(1)
+    owner.should have(1).item
+  end
+
+  after(:each) do
+    if @inflector_was_not_defined
+      Object.__send__ :remove_const, :Inflector
+    end
+  end
+end
+
 describe &quot;should have(n).items where result responds to items but returns something other than a collection&quot; do
   it &quot;should provide a meaningful error&quot; do
     owner = Class.new do
@@ -270,3 +324,76 @@ describe &quot;have(n).things on an object which is not a collection nor contains one
     lambda { Object.new.should have(2).things }.should raise_error(NoMethodError, /undefined method `things' for #&lt;Object:/)
   end
 end
+
+describe Spec::Matchers::Have, &quot;for a collection owner that implements #send&quot; do
+  include HaveSpecHelper
+  
+  before(:each) do
+    @collection = Object.new
+    def @collection.floozles; [1,2] end
+    def @collection.send(*args); raise &quot;DOH! Library developers shouldn't use #send!&quot; end
+  end
+  
+  it &quot;should work in the straightforward case&quot; do
+    lambda {
+      @collection.should have(2).floozles
+    }.should_not raise_error
+  end
+
+  it &quot;should work when doing automatic pluralization&quot; do
+    lambda {
+      @collection.should have_at_least(1).floozle
+    }.should_not raise_error
+  end
+
+  it &quot;should blow up when the owner doesn't respond to that method&quot; do
+    lambda {
+      @collection.should have(99).problems
+    }.should raise_error(NoMethodError, /problems/)
+  end
+end
+
+module Spec
+  module Matchers
+    describe Have do
+      it &quot;should have method_missing as private&quot; do
+        with_ruby '1.8' do
+          Have.private_instance_methods.should include(&quot;method_missing&quot;)
+        end
+        with_ruby '1.9' do
+          Have.private_instance_methods.should include(:method_missing)
+        end
+      end
+      
+      describe &quot;respond_to?&quot; do
+        before :each do
+          @have = Have.new(:foo)
+          @a_method_which_have_defines = Have.instance_methods.first
+          @a_method_which_object_defines = Object.instance_methods.first
+        end
+        
+        it &quot;should be true for a method which Have defines&quot; do
+          @have.should respond_to(@a_method_which_have_defines)
+        end
+        
+        it &quot;should be true for a method that it's superclass (Object) defines&quot; do
+          @have.should respond_to(@a_method_which_object_defines)
+        end
+        
+        it &quot;should be false for a method which neither Object nor nor Have defines&quot; do
+          @have.should_not respond_to(:foo_bar_baz)
+        end
+        
+        it &quot;should be false if the owner doesn't respond to the method&quot; do
+          have = Have.new(99)
+          have.should_not respond_to(:problems)
+        end
+        
+        it &quot;should be true if the owner responds to the method&quot; do
+          have = Have.new(:a_symbol)
+          have.should respond_to(:to_sym)
+        end
+      end
+    end
+  end
+end</diff>
      <filename>vendor/plugins/rspec/spec/spec/matchers/have_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,6 +5,10 @@ describe &quot;should include(expected)&quot; do
     [1,2,3].should include(3)
     &quot;abc&quot;.should include(&quot;a&quot;)
   end
+  
+  it 'should pass if target is a Hash and has the expected as a key' do
+    {:key =&gt; 'value'}.should include(:key)
+  end
 
   it &quot;should fail if target does not include expected&quot; do
     lambda {
@@ -13,6 +17,9 @@ describe &quot;should include(expected)&quot; do
     lambda {
       &quot;abc&quot;.should include(&quot;d&quot;)
     }.should fail_with(&quot;expected \&quot;abc\&quot; to include \&quot;d\&quot;&quot;)
+    lambda {
+      {:key =&gt; 'value'}.should include(:other)
+    }.should fail_with(%Q|expected {:key=&gt;&quot;value&quot;} to include :other|)
   end
 end
 
@@ -20,12 +27,22 @@ describe &quot;should include(with, multiple, args)&quot; do
   it &quot;should pass if target includes all items&quot; do
     [1,2,3].should include(1,2,3)
   end
+  
+  it 'should pass if target is a Hash including all items as keys' do
+    {:key =&gt; 'value', :other =&gt; 'value'}.should include(:key, :other)
+  end
 
   it &quot;should fail if target does not include any one of the items&quot; do
     lambda {
       [1,2,3].should include(1,2,4)
     }.should fail_with(&quot;expected [1, 2, 3] to include 1, 2 and 4&quot;)
   end
+  
+  it 'should pass if target is a Hash missing any item as a key' do
+    lambda {
+      {:key =&gt; 'value'}.should include(:key, :other)
+    }.should fail_with(%Q|expected {:key=&gt;&quot;value&quot;} to include :key and :other|)
+  end
 end
 
 describe &quot;should_not include(expected)&quot; do
@@ -33,6 +50,10 @@ describe &quot;should_not include(expected)&quot; do
     [1,2,3].should_not include(4)
     &quot;abc&quot;.should_not include(&quot;d&quot;)
   end
+  
+  it 'should pass if target is a Hash and does not have the expected as a key' do
+    {:other =&gt; 'value'}.should_not include(:key)
+  end
 
   it &quot;should fail if target includes expected&quot; do
     lambda {
@@ -41,5 +62,27 @@ describe &quot;should_not include(expected)&quot; do
     lambda {
       &quot;abc&quot;.should_not include(&quot;c&quot;)
     }.should fail_with(&quot;expected \&quot;abc\&quot; not to include \&quot;c\&quot;&quot;)
+    lambda {
+      {:key =&gt; 'value'}.should_not include(:key)
+    }.should fail_with(%Q|expected {:key=&gt;&quot;value&quot;} not to include :key|)
+  end
+end
+
+describe &quot;should include(:key =&gt; value)&quot; do
+  it &quot;should pass if target is a Hash and includes the key/value pair&quot; do
+    {:key =&gt; 'value'}.should include(:key =&gt; 'value')
+  end
+  it &quot;should pass if target is a Hash and includes the key/value pair among others&quot; do
+    {:key =&gt; 'value', :other =&gt; 'different'}.should include(:key =&gt; 'value')
+  end
+  it &quot;should fail if target is a Hash and has a different value for key&quot; do
+    lambda {
+      {:key =&gt; 'different'}.should include(:key =&gt; 'value')
+    }.should fail_with(%Q|expected {:key=&gt;&quot;different&quot;} to include {:key=&gt;&quot;value&quot;}|)
+  end
+  it &quot;should fail if target is a Hash and has a different key&quot; do
+    lambda {
+      {:other =&gt; 'value'}.should include(:key =&gt; 'value')
+    }.should fail_with(%Q|expected {:other=&gt;&quot;value&quot;} to include {:key=&gt;&quot;value&quot;}|)
   end
 end</diff>
      <filename>vendor/plugins/rspec/spec/spec/matchers/include_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,12 +5,12 @@ describe &quot;should match(expected)&quot; do
     &quot;string&quot;.should match(/tri/)
   end
 
-  it &quot;should fail when target (String) matches expected (Regexp)&quot; do
+  it &quot;should fail when target (String) does not match expected (Regexp)&quot; do
     lambda {
       &quot;string&quot;.should match(/rings/)
     }.should fail
   end
-
+  
   it &quot;should provide message, expected and actual on failure&quot; do
     matcher = match(/rings/)
     matcher.matches?(&quot;string&quot;)
@@ -19,7 +19,7 @@ describe &quot;should match(expected)&quot; do
 end
 
 describe &quot;should_not match(expected)&quot; do
-  it &quot;should pass when target (String) matches expected (Regexp)&quot; do
+  it &quot;should pass when target (String) matches does not match (Regexp)&quot; do
     &quot;string&quot;.should_not match(/rings/)
   end
 </diff>
      <filename>vendor/plugins/rspec/spec/spec/matchers/match_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,18 +16,9 @@ This module should provide the following methods, each of which returns a Matche
       it &quot;be_arbitrary_predicate&quot; do
         be_arbitrary_predicate.should be_an_instance_of(Be)
       end
-      it &quot;be_close&quot; do
-        be_close(1,2).should be_an_instance_of(BeClose)
-      end
       it &quot;change&quot; do
         change(&quot;target&quot;, :message).should be_an_instance_of(Change)
       end
-      it &quot;eql&quot; do
-        eql(:expected).should be_an_instance_of(Eql)
-      end
-      it &quot;equal&quot; do
-        equal(:expected).should be_an_instance_of(Equal)
-      end
       it &quot;have&quot; do
         have(0).should be_an_instance_of(Have)
       end
@@ -43,9 +34,6 @@ This module should provide the following methods, each of which returns a Matche
       it &quot;include&quot; do
         include(:value).should be_an_instance_of(Include)
       end
-      it &quot;match&quot; do
-        match(:value).should be_an_instance_of(Match)
-      end
       it &quot;raise_error&quot; do
         raise_error.should be_an_instance_of(RaiseError)
         raise_error(NoMethodError).should be_an_instance_of(RaiseError)
@@ -70,7 +58,7 @@ This module should provide the following methods, each of which returns a Matche
       end
 
       it &quot;should convert have_xyz to Has(:have_xyz)&quot; do
-        Has.should_receive(:new).with(:have_whatever)
+        self.should_receive(:has).with(:have_whatever)
         have_whatever
       end
     end</diff>
      <filename>vendor/plugins/rspec/spec/spec/matchers/matcher_methods_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -19,6 +19,6 @@ describe &quot;The boolean() mock argument constraint matcher&quot; do
 end
 
 describe &quot;The an_instance_of() mock argument constraint matcher&quot; do
-  # NOTE - this is implemented as a predicate_matcher - see behaviour.rb
+  # NOTE - this is implemented as a predicate_matcher - see example_group_methods.rb
   specify { an_instance_of(String).should == &quot;string&quot;  }
 end</diff>
      <filename>vendor/plugins/rspec/spec/spec/matchers/mock_constraint_matchers_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,12 +10,17 @@ describe &quot;should ==&quot; do
     subject.should == &quot;apple&quot;
   end
   
+  it &quot;should return true on success&quot; do
+    subject = &quot;apple&quot;
+    (subject.should == &quot;apple&quot;).should be_true
+  end
+  
   it &quot;should fail when target.==(actual) returns false&quot; do
     subject = &quot;apple&quot;
     Spec::Expectations.should_receive(:fail_with).with(%[expected: &quot;orange&quot;,\n     got: &quot;apple&quot; (using ==)], &quot;orange&quot;, &quot;apple&quot;)
     subject.should == &quot;orange&quot;
   end
-
+  
 end
 
 describe &quot;should_not ==&quot; do
@@ -26,12 +31,17 @@ describe &quot;should_not ==&quot; do
     subject.should_not == &quot;apple&quot;
   end
   
+  it &quot;should return true on success&quot; do
+    subject = &quot;apple&quot;
+    (subject.should_not == &quot;orange&quot;).should be_true
+  end
+
   it &quot;should fail when target.==(actual) returns false&quot; do
     subject = &quot;apple&quot;
     Spec::Expectations.should_receive(:fail_with).with(%[expected not: == &quot;apple&quot;,\n         got:    &quot;apple&quot;], &quot;apple&quot;, &quot;apple&quot;)
     subject.should_not == &quot;apple&quot;
   end
-
+  
 end
 
 describe &quot;should ===&quot; do
@@ -156,3 +166,26 @@ describe &quot;should &lt;=&quot; do
 
 end
 
+describe Spec::Matchers::PositiveOperatorMatcher do
+
+  it &quot;should work when the target has implemented #send&quot; do
+    o = Object.new
+    def o.send(*args); raise &quot;DOH! Library developers shouldn't use #send!&quot; end
+    lambda {
+      o.should == o
+    }.should_not raise_error
+  end
+
+end
+
+describe Spec::Matchers::NegativeOperatorMatcher do
+
+  it &quot;should work when the target has implemented #send&quot; do
+    o = Object.new
+    def o.send(*args); raise &quot;DOH! Library developers shouldn't use #send!&quot; end
+    lambda {
+      o.should_not == :foo
+    }.should_not raise_error
+  end
+
+end</diff>
      <filename>vendor/plugins/rspec/spec/spec/matchers/operator_matcher_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,24 @@ describe &quot;should raise_error&quot; do
   end
 end
 
+describe &quot;should raise_error {|err| ... }&quot; do
+  it &quot;passes if there is an error&quot; do
+    ran = false
+    lambda { non_existent_method }.should raise_error {|e|
+      ran = true
+    }
+    ran.should be_true
+  end
+
+  it &quot;passes the error to the block&quot; do
+    error = nil
+    lambda { non_existent_method }.should raise_error {|e|
+      error = e
+    }
+    error.should be_an_instance_of(NameError)
+  end
+end
+
 describe &quot;should_not raise_error&quot; do
   it &quot;should pass if nothing is raised&quot; do
     lambda {}.should_not raise_error
@@ -28,6 +46,9 @@ describe &quot;should raise_error(message)&quot; do
   it &quot;should pass if RuntimeError is raised with the right message&quot; do
     lambda {raise 'blah'}.should raise_error('blah')
   end
+  it &quot;should pass if RuntimeError is raised with a matching message&quot; do
+    lambda {raise 'blah'}.should raise_error(/blah/)
+  end
   it &quot;should pass if any other error is raised with the right message&quot; do
     lambda {raise NameError.new('blah')}.should raise_error('blah')
   end
@@ -73,11 +94,17 @@ describe &quot;should raise_error(NamedError)&quot; do
     }.should fail_with(&quot;expected NameError but nothing was raised&quot;)
   end
   
-  it &quot;should fail if another error is raised&quot; do
+  it &quot;should fail if another error is raised (NameError)&quot; do
     lambda {
       lambda { raise }.should raise_error(NameError)
     }.should fail_with(&quot;expected NameError, got RuntimeError&quot;)
   end
+  
+  it &quot;should fail if another error is raised (NameError)&quot; do
+    lambda {
+      lambda { load &quot;non/existent/file&quot; }.should raise_error(NameError)
+    }.should fail_with(/expected NameError, got #&lt;LoadError/)
+  end
 end
 
 describe &quot;should_not raise_error(NamedError)&quot; do
@@ -120,6 +147,127 @@ describe &quot;should raise_error(NamedError, error_message) with String&quot; do
   end
 end
 
+describe &quot;should raise_error(NamedError, error_message) { |err| ... }&quot; do
+  it &quot;should yield exception if named error is raised with same message&quot; do
+    ran = false
+
+    lambda {
+      raise &quot;example message&quot;
+    }.should raise_error(RuntimeError, &quot;example message&quot;) { |err|
+      ran = true
+      err.class.should == RuntimeError
+      err.message.should == &quot;example message&quot;
+    }
+
+    ran.should == true
+  end
+
+  it &quot;yielded block should be able to fail on it's own right&quot; do
+    ran, passed = false, false
+
+    lambda {
+      lambda {
+        raise &quot;example message&quot;
+      }.should raise_error(RuntimeError, &quot;example message&quot;) { |err|
+        ran = true
+        5.should == 4
+        passed = true
+      }
+    }.should fail_with(/expected: 4/m)
+
+    ran.should == true
+    passed.should == false
+  end
+
+  it &quot;should NOT yield exception if no error was thrown&quot; do
+    ran = false
+
+    lambda {
+      lambda {}.should raise_error(RuntimeError, &quot;example message&quot;) { |err|
+        ran = true
+      }
+    }.should fail_with(&quot;expected RuntimeError with \&quot;example message\&quot; but nothing was raised&quot;)
+
+    ran.should == false
+  end
+
+  it &quot;should not yield exception if error class is not matched&quot; do
+    ran = false
+
+    lambda {
+      lambda {
+        raise &quot;example message&quot;
+      }.should raise_error(SyntaxError, &quot;example message&quot;) { |err|
+        ran = true
+      }
+    }.should fail_with(&quot;expected SyntaxError with \&quot;example message\&quot;, got #&lt;RuntimeError: example message&gt;&quot;)
+
+    ran.should == false
+  end
+
+  it &quot;should NOT yield exception if error message is not matched&quot; do
+    ran = false
+
+    lambda {
+      lambda {
+        raise &quot;example message&quot;
+      }.should raise_error(RuntimeError, &quot;different message&quot;) { |err|
+        ran = true
+      }
+    }.should fail_with(&quot;expected RuntimeError with \&quot;different message\&quot;, got #&lt;RuntimeError: example message&gt;&quot;)
+
+    ran.should == false
+  end
+end
+
+describe &quot;should_not raise_error(NamedError, error_message) { |err| ... }&quot; do
+  it &quot;should pass if nothing is raised&quot; do
+    ran = false
+
+    lambda {}.should_not raise_error(RuntimeError, &quot;example message&quot;) { |err|
+      ran = true
+    }
+
+    ran.should == false
+  end
+
+  it &quot;should pass if a different error is raised&quot; do
+    ran = false
+
+    lambda { raise }.should_not raise_error(NameError, &quot;example message&quot;) { |err|
+      ran = true
+    }
+
+    ran.should == false
+  end
+
+  it &quot;should pass if same error is raised with different message&quot; do
+    ran = false
+
+    lambda {
+      raise RuntimeError.new(&quot;not the example message&quot;)
+    }.should_not raise_error(RuntimeError, &quot;example message&quot;) { |err|
+      ran = true
+    }
+
+    ran.should == false
+  end
+
+  it &quot;should fail if named error is raised with same message&quot; do
+    ran = false
+
+    lambda {
+      lambda {
+        raise &quot;example message&quot;
+      }.should_not raise_error(RuntimeError, &quot;example message&quot;) { |err|
+        ran = true
+      }
+    }.should fail_with(&quot;expected no RuntimeError with \&quot;example message\&quot;, got #&lt;RuntimeError: example message&gt;&quot;)
+
+    ran.should == false
+  end
+end
+
 describe &quot;should_not raise_error(NamedError, error_message) with String&quot; do
   it &quot;should pass if nothing is raised&quot; do
     lambda {}.should_not raise_error(RuntimeError, &quot;example message&quot;)</diff>
      <filename>vendor/plugins/rspec/spec/spec/matchers/raise_error_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,8 +8,8 @@ describe &quot;should respond_to(:sym)&quot; do
   
   it &quot;should fail target does not respond to :sym&quot; do
     lambda {
-      Object.new.should respond_to(:some_method)
-    }.should fail_with(&quot;expected target to respond to :some_method&quot;)
+      &quot;this string&quot;.should respond_to(:some_method)
+    }.should fail_with(&quot;expected \&quot;this string\&quot; to respond to :some_method&quot;)
   end
   
 end
@@ -23,19 +23,19 @@ describe &quot;should respond_to(message1, message2)&quot; do
   it &quot;should fail target does not respond to first message&quot; do
     lambda {
       Object.new.should respond_to('method_one', 'inspect')
-    }.should fail_with('expected target to respond to &quot;method_one&quot;')
+    }.should fail_with(/expected #&lt;Object:.*&gt; to respond to &quot;method_one&quot;/)
   end
   
   it &quot;should fail target does not respond to second message&quot; do
     lambda {
       Object.new.should respond_to('inspect', 'method_one')
-    }.should fail_with('expected target to respond to &quot;method_one&quot;')
+    }.should fail_with(/expected #&lt;Object:.*&gt; to respond to &quot;method_one&quot;/)
   end
   
   it &quot;should fail target does not respond to either message&quot; do
     lambda {
       Object.new.should respond_to('method_one', 'method_two')
-    }.should fail_with('expected target to respond to &quot;method_one&quot;, &quot;method_two&quot;')
+    }.should fail_with(/expected #&lt;Object:.*&gt; to respond to &quot;method_one&quot;, &quot;method_two&quot;/)
   end
 end
 
@@ -48,7 +48,7 @@ describe &quot;should_not respond_to(:sym)&quot; do
   it &quot;should fail target responds to :sym&quot; do
     lambda {
       Object.new.should_not respond_to(:methods)
-    }.should fail_with(&quot;expected target not to respond to :methods&quot;)
+    }.should fail_with(/expected #&lt;Object:.*&gt; not to respond to :methods/)
   end
   
 end</diff>
      <filename>vendor/plugins/rspec/spec/spec/matchers/respond_to_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ require File.dirname(__FILE__) + '/../../spec_helper'
 module Spec
   module Matchers
     describe SimpleMatcher do
-      it &quot;should match pass match arg to block&quot; do
+      it &quot;should pass match arg to block&quot; do
         actual = nil
         matcher = simple_matcher(&quot;message&quot;) do |given| actual = given end
         matcher.matches?(&quot;foo&quot;)
@@ -22,10 +22,72 @@ module Spec
         matcher.negative_failure_message.should =~ /expected not to get \&quot;thing\&quot;, but got \&quot;other\&quot;/
       end
       
-      it &quot;should provide a description&quot; do
+      it &quot;should provide the given description&quot; do
         matcher = simple_matcher(&quot;thing&quot;) do end
         matcher.description.should ==&quot;thing&quot;
       end
+      
+      it &quot;should fail if a wrapped 'should' fails&quot; do
+        matcher = simple_matcher(&quot;should fail&quot;) do
+          2.should == 3
+        end
+        lambda do
+          matcher.matches?(&quot;anything&quot;).should be_true
+        end.should fail_with(/expected: 3/)
+      end
+    end
+    
+    describe &quot;with arity of 2&quot; do
+      it &quot;should provide the matcher so you can access its messages&quot; do
+        provided_matcher = nil
+        matcher = simple_matcher(&quot;thing&quot;) do |given, matcher|
+          provided_matcher = matcher
+        end
+        matcher.matches?(&quot;anything&quot;)
+        provided_matcher.should equal(matcher)
+      end
+      
+      it &quot;should support a custom failure message&quot; do
+        matcher = simple_matcher(&quot;thing&quot;) do |given, matcher|
+          matcher.failure_message = &quot;custom message&quot;
+        end
+        matcher.matches?(&quot;other&quot;)
+        matcher.failure_message.should == &quot;custom message&quot;
+      end
+
+      it &quot;should complain when asked for a failure message if you don't give it a description or a message&quot; do
+        matcher = simple_matcher do |given, matcher| end
+        matcher.matches?(&quot;other&quot;)
+        matcher.failure_message.should =~ /No description provided/
+      end
+
+      it &quot;should support a custom negative failure message&quot; do
+        matcher = simple_matcher(&quot;thing&quot;) do |given, matcher|
+          matcher.negative_failure_message = &quot;custom message&quot;
+        end
+        matcher.matches?(&quot;other&quot;)
+        matcher.negative_failure_message.should == &quot;custom message&quot;
+      end
+      
+      it &quot;should complain when asked for a negative failure message if you don't give it a description or a message&quot; do
+        matcher = simple_matcher do |given, matcher| end
+        matcher.matches?(&quot;other&quot;)
+        matcher.negative_failure_message.should =~ /No description provided/
+      end
+
+      it &quot;should support a custom description&quot; do
+        matcher = simple_matcher(&quot;thing&quot;) do |given, matcher|
+          matcher.description = &quot;custom message&quot;
+        end
+        matcher.matches?(&quot;description&quot;)
+        matcher.description.should == &quot;custom message&quot;
+      end
+
+      it &quot;should tell you no description was provided when it doesn't receive one&quot; do
+        matcher = simple_matcher do end
+        matcher.description.should =~ /No description provided/
+      end
     end
+    
   end
 end
\ No newline at end of file</diff>
      <filename>vendor/plugins/rspec/spec/spec/matchers/simple_matcher_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,52 +2,94 @@ require File.dirname(__FILE__) + '/../../spec_helper.rb'
 
 module Spec
   module Matchers
-    describe ThrowSymbol, &quot;(constructed with no Symbol)&quot; do
-      before(:each) { @matcher = ThrowSymbol.new }
-
-      it &quot;should match if any Symbol is thrown&quot; do
-        @matcher.matches?(lambda{ throw :sym }).should be_true
-      end
-      it &quot;should not match if no Symbol is thrown&quot; do
-        @matcher.matches?(lambda{ }).should be_false
-      end
-      it &quot;should provide a failure message&quot; do
-        @matcher.matches?(lambda{})
-        @matcher.failure_message.should == &quot;expected a Symbol but nothing was thrown&quot;
-      end
-      it &quot;should provide a negative failure message&quot; do
-        @matcher.matches?(lambda{ throw :sym})
-        @matcher.negative_failure_message.should == &quot;expected no Symbol, got :sym&quot;
-      end
-    end
-    
-    describe ThrowSymbol, &quot;(constructed with a Symbol)&quot; do
-      before(:each) { @matcher = ThrowSymbol.new(:sym) }
+    describe ThrowSymbol do
+      describe &quot;with no args&quot; do
+        before(:each) { @matcher = ThrowSymbol.new }
       
-      it &quot;should match if correct Symbol is thrown&quot; do
-        @matcher.matches?(lambda{ throw :sym }).should be_true
+        it &quot;should match if any Symbol is thrown&quot; do
+          @matcher.matches?(lambda{ throw :sym }).should be_true
+        end
+        it &quot;should match if any Symbol is thrown with an arg&quot; do
+          @matcher.matches?(lambda{ throw :sym, &quot;argument&quot; }).should be_true
+        end
+        it &quot;should not match if no Symbol is thrown&quot; do
+          @matcher.matches?(lambda{ }).should be_false
+        end
+        it &quot;should provide a failure message&quot; do
+          @matcher.matches?(lambda{})
+          @matcher.failure_message.should == &quot;expected a Symbol but nothing was thrown&quot;
+        end
+        it &quot;should provide a negative failure message&quot; do
+          @matcher.matches?(lambda{ throw :sym})
+          @matcher.negative_failure_message.should == &quot;expected no Symbol, got :sym&quot;
+        end
       end
-      it &quot;should not match if no Symbol is thrown&quot; do
-        @matcher.matches?(lambda{ }).should be_false
-      end
-      it &quot;should not match if correct Symbol is thrown&quot; do
-        @matcher.matches?(lambda{ throw :other_sym }).should be_false
-        @matcher.failure_message.should == &quot;expected :sym, got :other_sym&quot;
-      end
-      it &quot;should provide a failure message when no Symbol is thrown&quot; do
-        @matcher.matches?(lambda{})
-        @matcher.failure_message.should == &quot;expected :sym but nothing was thrown&quot;
-      end
-      it &quot;should provide a failure message when wrong Symbol is thrown&quot; do
-        @matcher.matches?(lambda{ throw :other_sym })
-        @matcher.failure_message.should == &quot;expected :sym, got :other_sym&quot;
-      end
-      it &quot;should provide a negative failure message&quot; do
-        @matcher.matches?(lambda{ throw :sym })
-        @matcher.negative_failure_message.should == &quot;expected :sym not to be thrown&quot;
+          
+      describe &quot;with a symbol&quot; do
+        before(:each) { @matcher = ThrowSymbol.new(:sym) }
+      
+        it &quot;should match if correct Symbol is thrown&quot; do
+          @matcher.matches?(lambda{ throw :sym }).should be_true
+        end
+        it &quot;should match if correct Symbol is thrown with an arg&quot; do
+          @matcher.matches?(lambda{ throw :sym, &quot;argument&quot; }).should be_true
+        end
+        it &quot;should not match if no Symbol is thrown&quot; do
+          @matcher.matches?(lambda{ }).should be_false
+        end
+        it &quot;should not match if correct Symbol is thrown&quot; do
+          @matcher.matches?(lambda{ throw :other_sym }).should be_false
+        end
+        it &quot;should provide a failure message when no Symbol is thrown&quot; do
+          @matcher.matches?(lambda{})
+          @matcher.failure_message.should == &quot;expected :sym but nothing was thrown&quot;
+        end
+        it &quot;should provide a failure message when wrong Symbol is thrown&quot; do
+          @matcher.matches?(lambda{ throw :other_sym })
+          @matcher.failure_message.should == &quot;expected :sym, got :other_sym&quot;
+        end
+        it &quot;should provide a negative failure message&quot; do
+          @matcher.matches?(lambda{ throw :sym })
+          @matcher.negative_failure_message.should == &quot;expected :sym not to be thrown&quot;
+        end
+        it &quot;should only match NameErrors raised by uncaught throws&quot; do
+          @matcher.matches?(lambda{ sym }).should be_false
+        end
       end
-      it &quot;should only match NameErrors raised by uncaught throws&quot; do
-        @matcher.matches?(lambda{ sym }).should be_false
+
+      describe &quot;with a symbol and an arg&quot; do
+        before(:each) { @matcher = ThrowSymbol.new(:sym, &quot;a&quot;) }
+    
+        it &quot;should match if correct Symbol and args are thrown&quot; do
+          @matcher.matches?(lambda{ throw :sym, &quot;a&quot; }).should be_true
+        end
+        it &quot;should not match if nothing is thrown&quot; do
+          @matcher.matches?(lambda{ }).should be_false
+        end
+        it &quot;should not match if other Symbol is thrown&quot; do
+          @matcher.matches?(lambda{ throw :other_sym, &quot;a&quot; }).should be_false
+        end
+        it &quot;should not match if no arg is thrown&quot; do
+          @matcher.matches?(lambda{ throw :sym }).should be_false
+        end
+        it &quot;should not match if wrong arg is thrown&quot; do
+          @matcher.matches?(lambda{ throw :sym, &quot;b&quot; }).should be_false
+        end
+        it &quot;should provide a failure message when no Symbol is thrown&quot; do
+          @matcher.matches?(lambda{})
+          @matcher.failure_message.should == %q[expected :sym with &quot;a&quot; but nothing was thrown]
+        end
+        it &quot;should provide a failure message when wrong Symbol is thrown&quot; do
+          @matcher.matches?(lambda{ throw :other_sym })
+          @matcher.failure_message.should == %q[expected :sym with &quot;a&quot;, got :other_sym]
+        end
+        it &quot;should provide a negative failure message&quot; do
+          @matcher.matches?(lambda{ throw :sym })
+          @matcher.negative_failure_message.should == %q[expected :sym with &quot;a&quot; not to be thrown]
+        end
+        it &quot;should only match NameErrors raised by uncaught throws&quot; do
+          @matcher.matches?(lambda{ sym }).should be_false
+        end
       end
     end
   end</diff>
      <filename>vendor/plugins/rspec/spec/spec/matchers/throw_symbol_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -23,6 +23,13 @@ module Spec
       it &quot;should pass if any number of times method is not called&quot; do
         @mock.should_receive(:random_call).any_number_of_times
       end
+
+      it &quot;should return the mocked value when called after a similar stub&quot; do
+        @mock.stub!(:message).and_return :stub_value
+        @mock.should_receive(:message).any_number_of_times.and_return(:mock_value)
+        @mock.message.should == :mock_value
+        @mock.message.should == :mock_value
+      end
     end
 
   end</diff>
      <filename>vendor/plugins/rspec/spec/spec/mocks/any_number_of_times_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,11 @@
 require File.dirname(__FILE__) + '/../../spec_helper.rb'
 
 class LiarLiarPantsOnFire
-  def respond_to?(sym)
+  def respond_to?(sym, incl_private=false)
     true
   end
   
-  def self.respond_to?(sym)
+  def self.respond_to?(sym, incl_private=false)
     true
   end
 end
@@ -26,6 +26,7 @@ describe 'should_receive' do
   end
   
   it 'should cleanup after itself' do
-    LiarLiarPantsOnFire.metaclass.instance_methods.should_not include(&quot;something&quot;)
+    (class &lt;&lt; LiarLiarPantsOnFire; self; end).instance_methods.should_not include(&quot;something&quot;)
   end
 end
+</diff>
      <filename>vendor/plugins/rspec/spec/spec/mocks/bug_report_11545_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -75,41 +75,21 @@ module Spec
           @mock.msg(37)
         end.should raise_error(MockExpectationError, &quot;Mock 'test mock' expected :msg with (no args) but received it with (37)&quot;)
       end
-    end
       
-    describe &quot;failing deprecated MockArgumentConstraints&quot; do
-      before(:each) do
-        @mock = mock(&quot;test mock&quot;)
-        @reporter = Mock.new(&quot;reporter&quot;, :null_object =&gt; true)
-        Kernel.stub!(:warn)
+      it &quot;should fail hash_including with missing key&quot; do
+         lambda do
+           @mock.should_receive(:msg).with(hash_including(:a =&gt; 1))
+           @mock.msg({})
+         end.should raise_error(MockExpectationError, &quot;Mock 'test mock' expected :msg with (hash_including(:a=&gt;1)) but received it with ({})&quot;)
       end
 
-      after(:each) do
-        @mock.rspec_reset
-      end
-
-      it &quot;should reject non boolean&quot; do
-        @mock.should_receive(:random_call).with(:boolean)
+      it &quot;should fail with block constraints&quot; do
         lambda do
-          @mock.random_call(&quot;false&quot;)
-        end.should raise_error(MockExpectationError)
+          @mock.should_receive(:msg).with {|arg| arg.should == :received }
+          @mock.msg :no_msg_for_you
+        end.should raise_error(Spec::Expectations::ExpectationNotMetError, /expected: :received.*\s*.*got: :no_msg_for_you/)
       end
-      
-      it &quot;should reject non numeric&quot; do
-        @mock.should_receive(:random_call).with(:numeric)
-        lambda do
-          @mock.random_call(&quot;1&quot;)
-        end.should raise_error(MockExpectationError)
-      end
-      
-      it &quot;should reject non string&quot; do
-        @mock.should_receive(:random_call).with(:string)
-        lambda do
-          @mock.random_call(123)
-        end.should raise_error(MockExpectationError)
-      end
-      
-
+            
     end
   end
 end</di