incubator-olio-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wso...@apache.org
Subject svn commit: r725524 [6/14] - in /incubator/olio/webapp/rails/trunk: app/controllers/ app/models/ app/views/events/ config/ config/environments/ spec/controllers/ spec/models/ vendor/plugins/attachment_fu/ vendor/plugins/attachment_fu/lib/ vendor/plugin...
Date Thu, 11 Dec 2008 01:34:30 GMT
Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/Manifest.txt
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/Manifest.txt?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/Manifest.txt (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/Manifest.txt Wed Dec 10 17:34:18 2008
@@ -0,0 +1,389 @@
+.autotest
+History.txt
+License.txt
+Manifest.txt
+README.txt
+Rakefile
+TODO.txt
+bin/autospec
+bin/spec
+examples/failing/README.txt
+examples/failing/diffing_spec.rb
+examples/failing/failing_autogenerated_docstrings_example.rb
+examples/failing/failure_in_setup.rb
+examples/failing/failure_in_teardown.rb
+examples/failing/mocking_example.rb
+examples/failing/mocking_with_flexmock.rb
+examples/failing/mocking_with_mocha.rb
+examples/failing/mocking_with_rr.rb
+examples/failing/partial_mock_example.rb
+examples/failing/predicate_example.rb
+examples/failing/raising_example.rb
+examples/failing/spec_helper.rb
+examples/failing/syntax_error_example.rb
+examples/failing/team_spec.rb
+examples/failing/timeout_behaviour.rb
+examples/passing/autogenerated_docstrings_example.rb
+examples/passing/before_and_after_example.rb
+examples/passing/behave_as_example.rb
+examples/passing/custom_expectation_matchers.rb
+examples/passing/custom_formatter.rb
+examples/passing/dynamic_spec.rb
+examples/passing/file_accessor.rb
+examples/passing/file_accessor_spec.rb
+examples/passing/greeter_spec.rb
+examples/passing/helper_method_example.rb
+examples/passing/io_processor.rb
+examples/passing/io_processor_spec.rb
+examples/passing/legacy_spec.rb
+examples/passing/mocking_example.rb
+examples/passing/multi_threaded_behaviour_runner.rb
+examples/passing/nested_classes_example.rb
+examples/passing/partial_mock_example.rb
+examples/passing/pending_example.rb
+examples/passing/predicate_example.rb
+examples/passing/priority.txt
+examples/passing/shared_example_group_example.rb
+examples/passing/shared_stack_examples.rb
+examples/passing/simple_matcher_example.rb
+examples/passing/spec_helper.rb
+examples/passing/stack.rb
+examples/passing/stack_spec.rb
+examples/passing/stack_spec_with_nested_example_groups.rb
+examples/passing/stubbing_example.rb
+examples/passing/yielding_example.rb
+init.rb
+lib/autotest/discover.rb
+lib/autotest/rspec.rb
+lib/spec.rb
+lib/spec/adapters.rb
+lib/spec/adapters/ruby_engine.rb
+lib/spec/adapters/ruby_engine/mri.rb
+lib/spec/adapters/ruby_engine/rubinius.rb
+lib/spec/dsl.rb
+lib/spec/dsl/main.rb
+lib/spec/example.rb
+lib/spec/example/before_and_after_hooks.rb
+lib/spec/example/configuration.rb
+lib/spec/example/errors.rb
+lib/spec/example/example_group.rb
+lib/spec/example/example_group_factory.rb
+lib/spec/example/example_group_methods.rb
+lib/spec/example/example_matcher.rb
+lib/spec/example/example_methods.rb
+lib/spec/example/module_reopening_fix.rb
+lib/spec/example/pending.rb
+lib/spec/example/shared_example_group.rb
+lib/spec/expectations.rb
+lib/spec/expectations/differs/default.rb
+lib/spec/expectations/errors.rb
+lib/spec/expectations/extensions.rb
+lib/spec/expectations/extensions/object.rb
+lib/spec/expectations/extensions/string_and_symbol.rb
+lib/spec/expectations/handler.rb
+lib/spec/expectations/wrap_expectation.rb
+lib/spec/interop/test.rb
+lib/spec/interop/test/unit/autorunner.rb
+lib/spec/interop/test/unit/testcase.rb
+lib/spec/interop/test/unit/testresult.rb
+lib/spec/interop/test/unit/testsuite_adapter.rb
+lib/spec/interop/test/unit/ui/console/testrunner.rb
+lib/spec/matchers.rb
+lib/spec/matchers/be.rb
+lib/spec/matchers/be_close.rb
+lib/spec/matchers/change.rb
+lib/spec/matchers/eql.rb
+lib/spec/matchers/equal.rb
+lib/spec/matchers/errors.rb
+lib/spec/matchers/exist.rb
+lib/spec/matchers/generated_descriptions.rb
+lib/spec/matchers/has.rb
+lib/spec/matchers/have.rb
+lib/spec/matchers/include.rb
+lib/spec/matchers/match.rb
+lib/spec/matchers/match_array.rb
+lib/spec/matchers/method_missing.rb
+lib/spec/matchers/operator_matcher.rb
+lib/spec/matchers/raise_error.rb
+lib/spec/matchers/respond_to.rb
+lib/spec/matchers/satisfy.rb
+lib/spec/matchers/simple_matcher.rb
+lib/spec/matchers/throw_symbol.rb
+lib/spec/mocks.rb
+lib/spec/mocks/argument_constraints.rb
+lib/spec/mocks/argument_expectation.rb
+lib/spec/mocks/error_generator.rb
+lib/spec/mocks/errors.rb
+lib/spec/mocks/extensions.rb
+lib/spec/mocks/extensions/object.rb
+lib/spec/mocks/framework.rb
+lib/spec/mocks/message_expectation.rb
+lib/spec/mocks/methods.rb
+lib/spec/mocks/mock.rb
+lib/spec/mocks/order_group.rb
+lib/spec/mocks/proxy.rb
+lib/spec/mocks/space.rb
+lib/spec/mocks/spec_methods.rb
+lib/spec/rake/spectask.rb
+lib/spec/rake/verify_rcov.rb
+lib/spec/runner.rb
+lib/spec/runner/backtrace_tweaker.rb
+lib/spec/runner/class_and_arguments_parser.rb
+lib/spec/runner/command_line.rb
+lib/spec/runner/drb_command_line.rb
+lib/spec/runner/example_group_runner.rb
+lib/spec/runner/formatter/base_formatter.rb
+lib/spec/runner/formatter/base_text_formatter.rb
+lib/spec/runner/formatter/failing_example_groups_formatter.rb
+lib/spec/runner/formatter/failing_examples_formatter.rb
+lib/spec/runner/formatter/html_formatter.rb
+lib/spec/runner/formatter/nested_text_formatter.rb
+lib/spec/runner/formatter/profile_formatter.rb
+lib/spec/runner/formatter/progress_bar_formatter.rb
+lib/spec/runner/formatter/snippet_extractor.rb
+lib/spec/runner/formatter/specdoc_formatter.rb
+lib/spec/runner/formatter/story/html_formatter.rb
+lib/spec/runner/formatter/story/plain_text_formatter.rb
+lib/spec/runner/formatter/story/progress_bar_formatter.rb
+lib/spec/runner/formatter/text_mate_formatter.rb
+lib/spec/runner/heckle_runner.rb
+lib/spec/runner/heckle_runner_unsupported.rb
+lib/spec/runner/option_parser.rb
+lib/spec/runner/options.rb
+lib/spec/runner/reporter.rb
+lib/spec/runner/spec_parser.rb
+lib/spec/story.rb
+lib/spec/story/extensions.rb
+lib/spec/story/extensions/main.rb
+lib/spec/story/extensions/regexp.rb
+lib/spec/story/extensions/string.rb
+lib/spec/story/given_scenario.rb
+lib/spec/story/runner.rb
+lib/spec/story/runner/plain_text_story_runner.rb
+lib/spec/story/runner/scenario_collector.rb
+lib/spec/story/runner/scenario_runner.rb
+lib/spec/story/runner/story_mediator.rb
+lib/spec/story/runner/story_parser.rb
+lib/spec/story/runner/story_runner.rb
+lib/spec/story/scenario.rb
+lib/spec/story/step.rb
+lib/spec/story/step_group.rb
+lib/spec/story/step_mother.rb
+lib/spec/story/story.rb
+lib/spec/story/world.rb
+lib/spec/version.rb
+plugins/mock_frameworks/flexmock.rb
+plugins/mock_frameworks/mocha.rb
+plugins/mock_frameworks/rr.rb
+plugins/mock_frameworks/rspec.rb
+rake_tasks/examples.rake
+rake_tasks/examples_with_rcov.rake
+rake_tasks/failing_examples_with_html.rake
+rake_tasks/verify_rcov.rake
+rspec.gemspec
+spec/README.jruby
+spec/autotest/autotest_helper.rb
+spec/autotest/autotest_matchers.rb
+spec/autotest/discover_spec.rb
+spec/autotest/failed_results_re_spec.rb
+spec/autotest/rspec_spec.rb
+spec/rspec_suite.rb
+spec/ruby_forker.rb
+spec/spec.opts
+spec/spec/adapters/ruby_engine_spec.rb
+spec/spec/dsl/main_spec.rb
+spec/spec/example/configuration_spec.rb
+spec/spec/example/example_group_class_definition_spec.rb
+spec/spec/example/example_group_factory_spec.rb
+spec/spec/example/example_group_methods_spec.rb
+spec/spec/example/example_group_spec.rb
+spec/spec/example/example_matcher_spec.rb
+spec/spec/example/example_methods_spec.rb
+spec/spec/example/example_runner_spec.rb
+spec/spec/example/helper_method_spec.rb
+spec/spec/example/nested_example_group_spec.rb
+spec/spec/example/pending_module_spec.rb
+spec/spec/example/predicate_matcher_spec.rb
+spec/spec/example/shared_example_group_spec.rb
+spec/spec/example/subclassing_example_group_spec.rb
+spec/spec/expectations/differs/default_spec.rb
+spec/spec/expectations/extensions/object_spec.rb
+spec/spec/expectations/fail_with_spec.rb
+spec/spec/expectations/wrap_expectation_spec.rb
+spec/spec/interop/test/unit/resources/spec_that_fails.rb
+spec/spec/interop/test/unit/resources/spec_that_passes.rb
+spec/spec/interop/test/unit/resources/spec_with_errors.rb
+spec/spec/interop/test/unit/resources/spec_with_options_hash.rb
+spec/spec/interop/test/unit/resources/test_case_that_fails.rb
+spec/spec/interop/test/unit/resources/test_case_that_passes.rb
+spec/spec/interop/test/unit/resources/test_case_with_errors.rb
+spec/spec/interop/test/unit/resources/testsuite_adapter_spec_with_test_unit.rb
+spec/spec/interop/test/unit/spec_spec.rb
+spec/spec/interop/test/unit/test_unit_spec_helper.rb
+spec/spec/interop/test/unit/testcase_spec.rb
+spec/spec/interop/test/unit/testsuite_adapter_spec.rb
+spec/spec/matchers/be_close_spec.rb
+spec/spec/matchers/be_spec.rb
+spec/spec/matchers/change_spec.rb
+spec/spec/matchers/description_generation_spec.rb
+spec/spec/matchers/eql_spec.rb
+spec/spec/matchers/equal_spec.rb
+spec/spec/matchers/exist_spec.rb
+spec/spec/matchers/handler_spec.rb
+spec/spec/matchers/has_spec.rb
+spec/spec/matchers/have_spec.rb
+spec/spec/matchers/include_spec.rb
+spec/spec/matchers/match_array_spec.rb
+spec/spec/matchers/match_spec.rb
+spec/spec/matchers/matcher_methods_spec.rb
+spec/spec/matchers/mock_constraint_matchers_spec.rb
+spec/spec/matchers/operator_matcher_spec.rb
+spec/spec/matchers/raise_error_spec.rb
+spec/spec/matchers/respond_to_spec.rb
+spec/spec/matchers/satisfy_spec.rb
+spec/spec/matchers/simple_matcher_spec.rb
+spec/spec/matchers/throw_symbol_spec.rb
+spec/spec/mocks/any_number_of_times_spec.rb
+spec/spec/mocks/argument_expectation_spec.rb
+spec/spec/mocks/at_least_spec.rb
+spec/spec/mocks/at_most_spec.rb
+spec/spec/mocks/bug_report_10260_spec.rb
+spec/spec/mocks/bug_report_10263_spec.rb
+spec/spec/mocks/bug_report_11545_spec.rb
+spec/spec/mocks/bug_report_15719_spec.rb
+spec/spec/mocks/bug_report_496.rb
+spec/spec/mocks/bug_report_600_spec.rb
+spec/spec/mocks/bug_report_7611_spec.rb
+spec/spec/mocks/bug_report_7805_spec.rb
+spec/spec/mocks/bug_report_8165_spec.rb
+spec/spec/mocks/bug_report_8302_spec.rb
+spec/spec/mocks/failing_mock_argument_constraints_spec.rb
+spec/spec/mocks/hash_including_matcher_spec.rb
+spec/spec/mocks/mock_ordering_spec.rb
+spec/spec/mocks/mock_space_spec.rb
+spec/spec/mocks/mock_spec.rb
+spec/spec/mocks/multiple_return_value_spec.rb
+spec/spec/mocks/nil_expectation_warning_spec.rb
+spec/spec/mocks/null_object_mock_spec.rb
+spec/spec/mocks/once_counts_spec.rb
+spec/spec/mocks/options_hash_spec.rb
+spec/spec/mocks/partial_mock_spec.rb
+spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb
+spec/spec/mocks/passing_mock_argument_constraints_spec.rb
+spec/spec/mocks/precise_counts_spec.rb
+spec/spec/mocks/record_messages_spec.rb
+spec/spec/mocks/stub_spec.rb
+spec/spec/mocks/twice_counts_spec.rb
+spec/spec/package/bin_spec_spec.rb
+spec/spec/runner/class_and_argument_parser_spec.rb
+spec/spec/runner/command_line_spec.rb
+spec/spec/runner/drb_command_line_spec.rb
+spec/spec/runner/empty_file.txt
+spec/spec/runner/examples.txt
+spec/spec/runner/failed.txt
+spec/spec/runner/formatter/base_formatter_spec.rb
+spec/spec/runner/formatter/base_text_formatter_spec.rb
+spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb
+spec/spec/runner/formatter/failing_examples_formatter_spec.rb
+spec/spec/runner/formatter/html_formatted-1.8.4.html
+spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html
+spec/spec/runner/formatter/html_formatted-1.8.5.html
+spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html
+spec/spec/runner/formatter/html_formatted-1.8.6.html
+spec/spec/runner/formatter/html_formatter_spec.rb
+spec/spec/runner/formatter/nested_text_formatter_spec.rb
+spec/spec/runner/formatter/profile_formatter_spec.rb
+spec/spec/runner/formatter/progress_bar_formatter_spec.rb
+spec/spec/runner/formatter/snippet_extractor_spec.rb
+spec/spec/runner/formatter/spec_mate_formatter_spec.rb
+spec/spec/runner/formatter/specdoc_formatter_spec.rb
+spec/spec/runner/formatter/story/html_formatter_spec.rb
+spec/spec/runner/formatter/story/plain_text_formatter_spec.rb
+spec/spec/runner/formatter/story/progress_bar_formatter_spec.rb
+spec/spec/runner/formatter/text_mate_formatted-1.8.4.html
+spec/spec/runner/formatter/text_mate_formatted-1.8.6.html
+spec/spec/runner/heckle_runner_spec.rb
+spec/spec/runner/heckler_spec.rb
+spec/spec/runner/noisy_backtrace_tweaker_spec.rb
+spec/spec/runner/option_parser_spec.rb
+spec/spec/runner/options_spec.rb
+spec/spec/runner/output_one_time_fixture.rb
+spec/spec/runner/output_one_time_fixture_runner.rb
+spec/spec/runner/output_one_time_spec.rb
+spec/spec/runner/quiet_backtrace_tweaker_spec.rb
+spec/spec/runner/reporter_spec.rb
+spec/spec/runner/resources/a_bar.rb
+spec/spec/runner/resources/a_foo.rb
+spec/spec/runner/resources/a_spec.rb
+spec/spec/runner/spec.opts
+spec/spec/runner/spec_drb.opts
+spec/spec/runner/spec_parser/spec_parser_fixture.rb
+spec/spec/runner/spec_parser_spec.rb
+spec/spec/runner/spec_spaced.opts
+spec/spec/runner_spec.rb
+spec/spec/spec_classes.rb
+spec/spec/spec_spec.rb
+spec/spec/story/builders.rb
+spec/spec/story/extensions/main_spec.rb
+spec/spec/story/extensions_spec.rb
+spec/spec/story/given_scenario_spec.rb
+spec/spec/story/runner/plain_text_story_runner_spec.rb
+spec/spec/story/runner/scenario_collector_spec.rb
+spec/spec/story/runner/scenario_runner_spec.rb
+spec/spec/story/runner/story_mediator_spec.rb
+spec/spec/story/runner/story_parser_spec.rb
+spec/spec/story/runner/story_runner_spec.rb
+spec/spec/story/runner_spec.rb
+spec/spec/story/scenario_spec.rb
+spec/spec/story/step_group_spec.rb
+spec/spec/story/step_mother_spec.rb
+spec/spec/story/step_spec.rb
+spec/spec/story/story_helper.rb
+spec/spec/story/story_spec.rb
+spec/spec/story/world_spec.rb
+spec/spec_helper.rb
+stories/all.rb
+stories/configuration/before_blocks.story
+stories/configuration/stories.rb
+stories/example_groups/autogenerated_docstrings
+stories/example_groups/example_group_with_should_methods
+stories/example_groups/nested_groups
+stories/example_groups/output
+stories/example_groups/stories.rb
+stories/helper.rb
+stories/interop/examples_and_tests_together
+stories/interop/stories.rb
+stories/interop/test_but_not_test_unit
+stories/interop/test_case_with_should_methods
+stories/mock_framework_integration/stories.rb
+stories/mock_framework_integration/use_flexmock.story
+stories/pending_stories/README
+stories/resources/helpers/cmdline.rb
+stories/resources/helpers/story_helper.rb
+stories/resources/matchers/smart_match.rb
+stories/resources/spec/before_blocks_example.rb
+stories/resources/spec/example_group_with_should_methods.rb
+stories/resources/spec/simple_spec.rb
+stories/resources/spec/spec_with_flexmock.rb
+stories/resources/steps/running_rspec.rb
+stories/resources/stories/failing_story.rb
+stories/resources/test/spec_and_test_together.rb
+stories/resources/test/spec_including_test_but_not_unit.rb
+stories/resources/test/test_case_with_should_methods.rb
+stories/stories/multiline_steps.story
+stories/stories/steps/multiline_steps.rb
+stories/stories/stories.rb
+story_server/prototype/javascripts/builder.js
+story_server/prototype/javascripts/controls.js
+story_server/prototype/javascripts/dragdrop.js
+story_server/prototype/javascripts/effects.js
+story_server/prototype/javascripts/prototype.js
+story_server/prototype/javascripts/rspec.js
+story_server/prototype/javascripts/scriptaculous.js
+story_server/prototype/javascripts/slider.js
+story_server/prototype/javascripts/sound.js
+story_server/prototype/javascripts/unittest.js
+story_server/prototype/lib/server.rb
+story_server/prototype/stories.html
+story_server/prototype/stylesheets/rspec.css
+story_server/prototype/stylesheets/test.css

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/README.txt
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/README.txt?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/README.txt (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/README.txt Wed Dec 10 17:34:18 2008
@@ -0,0 +1,39 @@
+= RSpec
+
+* http://rspec.info
+* http://rspec.info/rdoc/
+* http://rubyforge.org/projects/rspec
+* http://github.com/dchelimsky/rspec/wikis
+* mailto:rspec-devel@rubyforge.org
+
+== DESCRIPTION:
+
+RSpec is a Behaviour Driven Development framework with tools to express User
+Stories with Executable Scenarios and Executable Examples at the code level.
+
+== FEATURES:
+
+* Spec::Story provides a framework for expressing User Stories and Scenarios
+* Spec::Example provides a framework for expressing Isolated Examples
+* Spec::Matchers provides Expression Matchers for use with Spec::Expectations and Spec::Mocks.
+
+== SYNOPSIS:
+
+Spec::Expectations supports setting expectations on your objects so you
+can do things like:
+
+  result.should equal(expected_result)
+  
+Spec::Mocks supports creating Mock Objects, Stubs, and adding Mock/Stub
+behaviour to your existing objects.
+
+== INSTALL:
+
+  [sudo] gem install rspec
+
+ or
+
+  git clone git://github.com/dchelimsky/rspec.git
+  cd rspec
+  rake gem
+  rake install_gem

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/Rakefile
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/Rakefile?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/Rakefile (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/Rakefile Wed Dec 10 17:34:18 2008
@@ -1,105 +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__)
+require 'spec/rake/spectask'
+
+class Hoe
+  def extra_deps
+    @extra_deps.reject! { |x| Array(x).first == 'hoe' }
+    @extra_deps
+  end
+end
 
-# Some of the tasks are in separate files since they are also part of the website documentation
+Hoe.new('rspec', Spec::VERSION::STRING) do |p|
+  p.summary = Spec::VERSION::SUMMARY
+  p.url = 'http://rspec.info/'
+  p.description = "Behaviour Driven Development for Ruby."
+  p.rubyforge_name = 'rspec'
+  p.developer('RSpec Development Team', 'rspec-devel@rubyforge.org')
+  p.remote_rdoc_dir = "rspec/#{Spec::VERSION::STRING}"
+end
+
+['audit','test','test_deps','default','post_blog'].each do |task|
+  Rake.application.instance_variable_get('@tasks').delete(task)
+end
+
+task :verify_rcov => [:spec, :stories]
+task :default => :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 = "rspec"
-PKG_VERSION   = Spec::VERSION::STRING
-PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
-PKG_FILES = FileList[
-  '[A-Z]*',
-  'lib/**/*.rb', 
-  'spec/**/*',
-  'examples/**/*',
-  'failing_examples/**/*',
-  'plugins/**/*',
-  'stories/**/*',
-  'rake_tasks/**/*'
-]
-
-task :default => [:verify_rcov]
-task :verify_rcov => [:spec, :stories]
-
 desc "Run all specs"
 Spec::Rake::SpecTask.new do |t|
   t.spec_files = FileList['spec/**/*_spec.rb']
   t.spec_opts = ['--options', 'spec/spec.opts']
   unless ENV['NO_RCOV']
     t.rcov = true
-    t.rcov_dir = '../doc/output/coverage'
-    t.rcov_opts = ['--exclude', 'lib/spec.rb,lib/spec/runner.rb,spec\/spec,bin\/spec,examples,\/var\/lib\/gems,\/Library\/Ruby,\.autotest']
+    t.rcov_dir = 'coverage'
+    t.rcov_opts = ['--text-report', '--exclude', "lib/spec.rb,lib/spec/runner.rb,spec\/spec,bin\/spec,examples,\/var\/lib\/gems,\/Library\/Ruby,\.autotest,#{ENV['GEM_HOME']}"]
   end
 end
 
 desc "Run all stories"
 task :stories do
-  html = 'story_server/prototype/rspec_stories.html'
-  ruby "stories/all.rb --colour --format plain --format html:#{html}"
-  unless IO.read(html) =~ /<span class="param">/m
-    raise 'highlighted parameters are broken in story HTML'
-  end
-end
-
-desc "Run all specs and store html output in doc/output/report.html"
-Spec::Rake::SpecTask.new('spec_html') do |t|
-  t.spec_files = FileList['spec/**/*_spec.rb']
-  t.spec_opts = ['--format html:../../../../doc/output/report.html', '--format progress','--backtrace']
+  ruby "stories/all.rb --colour --format plain"
 end
 
-desc "Run all failing examples"
+desc "Run failing examples (see failure output)"
 Spec::Rake::SpecTask.new('failing_examples') do |t|
   t.spec_files = FileList['failing_examples/**/*_spec.rb']
-end
-
-desc 'Generate RDoc'
-rd = Rake::RDocTask.new do |rdoc|
-  rdoc.rdoc_dir = '../doc/output/rdoc'
-  rdoc.options << '--title' << 'RSpec' << '--line-numbers' << '--inline-source' << '--main' << '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 = <<-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.bindir = 'bin'
-  s.executables = ['spec', 'spec_translator']
-  s.default_executable = 'spec'
-  s.author = "RSpec Development Team"
-  s.email = "rspec-devel@rubyforge.org"
-  s.homepage = "http://rspec.rubyforge.org"
-  s.platform = Gem::Platform::RUBY
-  s.rubyforge_project = "rspec"
-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)
@@ -121,7 +76,8 @@
   egrep /(FIXME|TODO|TBD)/
 end
 
-task :release => [:verify_committed, :verify_user, :spec, :publish_packages, :tag, :publish_news]
+desc "verify_committed, verify_rcov, post_news, release"
+task :complete_release => [:verify_committed, :verify_rcov, :post_news, :release]
 
 desc "Verifies that there is no uncommitted code"
 task :verify_committed do
@@ -130,133 +86,4 @@
       raise "\n!!! Do a git commit first !!!\n\n" if line =~ /^#\s*modified:/
     end
   end
-end
-
-desc "Creates a tag in svn"
-task :tag do
-  # from = `svn info #{File.dirname(__FILE__)}`.match(/URL: (.*)\/rspec/n)[1]
-  # to = from.gsub(/trunk/, "tags/#{Spec::VERSION::TAG}")
-  # current = from.gsub(/trunk/, "tags/CURRENT")
-  # 
-  # puts "Creating tag in SVN"
-  # tag_cmd = "svn cp #{from} #{to} -m \"Tag release #{Spec::VERSION::FULL_VERSION}\""
-  # `#{tag_cmd}` ; raise "ERROR: #{tag_cmd}" unless $? == 0
-  # 
-  # puts "Removing CURRENT"
-  # remove_current_cmd = "svn rm #{current} -m \"Remove tags/CURRENT\""
-  # `#{remove_current_cmd}` ; raise "ERROR: #{remove_current_cmd}" unless $? == 0
-  # 
-  # puts "Re-Creating CURRENT"
-  # create_current_cmd = "svn cp #{to} #{current} -m \"Copy #{Spec::VERSION::TAG} to tags/CURRENT\""
-  # `#{create_current_cmd}` ; "ERROR: #{create_current_cmd}" unless $? == 0
-end
-
-task :verify_user do
-  raise "RUBYFORGE_USER environment variable not set!" unless ENV['RUBYFORGE_USER']
-end
-
-desc "Upload Website to RubyForge"
-task :publish_website => [:verify_user, :website] do
-  unless Spec::VERSION::RELEASE_CANDIDATE
-    publisher = Rake::SshDirPublisher.new(
-      "rspec-website@rubyforge.org",
-      "/var/www/gforge-projects/#{PKG_NAME}",
-      "../doc/output"
-    )
-    publisher.upload
-  else
-    puts "** Not publishing packages to RubyForge - this is a prerelease"
-  end
-end
-
-desc "Upload Website archive to RubyForge"
-task :archive_website => [:verify_user, :website] do
-  publisher = Rake::SshDirPublisher.new(
-    "rspec-website@rubyforge.org",
-    "/var/www/gforge-projects/#{PKG_NAME}/#{Spec::VERSION::TAG}",
-    "../doc/output"
-  )
-  publisher.upload
-end
-
-desc "Package the Rails plugin"
-task :package_rspec_on_rails do
-  mkdir 'pkg' rescue nil
-  rm_rf "pkg/rspec-rails-#{PKG_VERSION}" rescue nil
-  `git clone ../rspec-rails pkg/rspec-rails-#{PKG_VERSION}`
-  rm_rf "pkg/rspec-rails-#{PKG_VERSION}/.git"
-  Dir.chdir 'pkg' do
-    `tar cvzf rspec-rails-#{PKG_VERSION}.tgz rspec-rails-#{PKG_VERSION}`
-  end
-end
-task :pkg => :package_rspec_on_rails
-
-desc "Package the RSpec.tmbundle"
-task :package_tmbundle do
-  mkdir 'pkg' rescue nil
-  rm_rf "pkg/RSpec-#{PKG_VERSION}.tmbundle" rescue nil
-  `git clone ../../../../RSpec.tmbundle pkg/RSpec-#{PKG_VERSION}.tmbundle`
-  rm_rf "pkg/RSpec-#{PKG_VERSION}.tmbundle/.git"
-  Dir.chdir 'pkg' do
-    `tar cvzf RSpec-#{PKG_VERSION}.tmbundle.tgz RSpec-#{PKG_VERSION}.tmbundle`
-  end
-end
-task :pkg => :package_tmbundle
-
-desc "Publish gem+tgz+zip on RubyForge. You must make sure lib/version.rb is aligned with the CHANGELOG file"
-task :publish_packages => [:verify_user, :package, :pkg] do
-  release_files = FileList[
-    "pkg/#{PKG_FILE_NAME}.gem",
-    "pkg/#{PKG_FILE_NAME}.tgz",
-    "pkg/rspec-rails-#{PKG_VERSION}.tgz",
-    "pkg/#{PKG_FILE_NAME}.zip",
-    "pkg/RSpec-#{PKG_VERSION}.tmbundle.tgz"
-  ]
-  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 = "RSpec #{PKG_VERSION}"
-    end
-  else
-    puts "SINCE THIS IS A PRERELEASE, FILES ARE UPLOADED WITH SSH, NOT TO THE RUBYFORGE FILE SECTION"
-    puts "YOU MUST TYPE THE PASSWORD #{release_files.length} TIMES..."
-
-    host = "rspec-website@rubyforge.org"
-    remote_dir = "/var/www/gforge-projects/#{PKG_NAME}"
-
-    publisher = Rake::SshFilePublisher.new(
-      host,
-      remote_dir,
-      File.dirname(__FILE__),
-      *release_files
-    )
-    publisher.upload
-
-    puts "UPLADED THE FOLLOWING FILES:"
-    release_files.each do |file|
-      name = file.match(/pkg\/(.*)/)[1]
-      puts "* http://rspec.rubyforge.org/#{name}"
-    end
-
-    puts "They are not linked to anywhere, so don't forget to tell people!"
-  end
-end
-
-desc "Publish news on RubyForge"
-task :publish_news => [: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 "** Not publishing news to RubyForge - this is a prerelease"
-  end
 end
\ No newline at end of file

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/TODO.txt
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/TODO.txt?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/TODO.txt (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/TODO.txt Wed Dec 10 17:34:18 2008
@@ -0,0 +1,10 @@
+== Future
+
+* do SOMETHING with the website
+* extract spec/story to rspec-stories (new gem)
+* remove the ruby engine adapter unless Rubinius team plans to use it
+* rename top level namespace to Rspec and commands to 'rspec' and 'autorspec'
+  * continue to support Spec 'spec' and 'autospec' as aliases for a reasonable time
+* separate the underlying framework from the DSL
+  * be able to do everything with classes and methods
+* tweak raise_error rdoc to show only one arg
\ No newline at end of file

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/bin/autospec
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/bin/autospec?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/bin/autospec (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/bin/autospec Wed Dec 10 17:34:18 2008
@@ -0,0 +1,4 @@
+#!/usr/bin/env ruby
+ENV['RSPEC'] = 'true'     # allows autotest to discover rspec
+ENV['AUTOTEST'] = 'true'  # allows autotest to run w/ color on linux
+system (RUBY_PLATFORM =~ /mswin|mingw/ ? 'autotest.bat' : 'autotest'), *ARGV
\ No newline at end of file

Propchange: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/bin/autospec
------------------------------------------------------------------------------
    svn:executable = *

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/bin/spec
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/bin/spec?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/bin/spec (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/bin/spec Wed Dec 10 17:34:18 2008
@@ -1,4 +1,4 @@
 #!/usr/bin/env ruby
 $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../lib"))
 require 'spec'
-exit ::Spec::Runner::CommandLine.run(rspec_options)
+exit ::Spec::Runner::CommandLine.run

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/README.txt
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/README.txt?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/README.txt (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/README.txt Wed Dec 10 17:34:18 2008
@@ -0,0 +1,7 @@
+"Why have failing examples?", you might ask.
+
+They allow us to see failure messages. RSpec wants to provide meaningful and helpful failure messages. The failures in this directory not only provide you a way of seeing the failure messages, but they provide RSpec's own specs a way of describing what they should look like and ensuring they stay correct.
+
+To see the types of messages you can expect, stand in this directory and run:
+
+../bin/spec ./*.rb
\ No newline at end of file

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/diffing_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/diffing_spec.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/diffing_spec.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/diffing_spec.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,36 @@
+describe "Running specs with --diff" do
+  it "should print diff of different strings" do
+    uk = <<-EOF
+RSpec is a
+behaviour driven development
+framework for Ruby
+EOF
+    usa = <<-EOF
+RSpec is a
+behavior driven development
+framework for Ruby
+EOF
+    usa.should == uk
+  end
+
+  class Animal
+    def initialize(name,species)
+      @name,@species = name,species
+    end
+
+    def inspect
+      <<-EOA
+<Animal
+name=#{@name},
+species=#{@species}
+>
+      EOA
+    end
+  end
+
+  it "should print diff of different objects' pretty representation" do
+    expected = Animal.new "bob", "giraffe"
+    actual   = Animal.new "bob", "tortoise"
+    expected.should eql(actual)
+  end
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/failing_autogenerated_docstrings_example.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/failing_autogenerated_docstrings_example.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/failing_autogenerated_docstrings_example.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/failing_autogenerated_docstrings_example.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,19 @@
+require File.dirname(__FILE__) + '/spec_helper'
+
+# Run spec w/ -fs to see the output of this file
+
+describe "Failing examples with no descriptions" do
+  
+  # description is auto-generated as "should equal(5)" based on the last #should
+  it do
+    3.should equal(2)
+    5.should equal(5)
+  end
+  
+  it { 3.should be > 5 }
+  
+  it { ["a"].should include("b") }
+  
+  it { [1,2,3].should_not respond_to(:size) }
+  
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/failure_in_setup.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/failure_in_setup.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/failure_in_setup.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/failure_in_setup.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,10 @@
+describe "This example" do
+  
+  before(:each) do
+    NonExistentClass.new
+  end
+  
+  it "should be listed as failing in setup" do
+  end
+  
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/failure_in_teardown.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/failure_in_teardown.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/failure_in_teardown.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/failure_in_teardown.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,10 @@
+describe "This example" do
+  
+  it "should be listed as failing in teardown" do
+  end
+  
+  after(:each) do
+    NonExistentClass.new
+  end
+  
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/mocking_example.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/mocking_example.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/mocking_example.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/mocking_example.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,40 @@
+require File.dirname(__FILE__) + '/spec_helper'
+
+describe "Mocker" do
+
+  it "should be able to call mock()" do
+    mock = mock("poke me")
+    mock.should_receive(:poke)
+    mock.poke
+  end
+
+  it "should fail when expected message not received" do
+    mock = mock("poke me")
+    mock.should_receive(:poke)
+  end
+  
+  it "should fail when messages are received out of order" do
+    mock = mock("one two three")
+    mock.should_receive(:one).ordered
+    mock.should_receive(:two).ordered
+    mock.should_receive(:three).ordered
+    mock.one
+    mock.three
+    mock.two
+  end
+
+  it "should get yelled at when sending unexpected messages" do
+    mock = mock("don't talk to me")
+    mock.should_not_receive(:any_message_at_all)
+    mock.any_message_at_all
+  end
+
+  it "has a bug we need to fix" do
+    pending "here is the bug" do
+      # Actually, no. It's fixed. This will fail because it passes :-)
+      mock = mock("Bug")
+      mock.should_receive(:hello)
+      mock.hello
+    end
+  end
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/mocking_with_flexmock.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/mocking_with_flexmock.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/mocking_with_flexmock.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/mocking_with_flexmock.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,26 @@
+# stub frameworks like to gum up Object, so this is deliberately
+# set NOT to run so that you don't accidentally run it when you
+# run this dir.
+
+# To run it, stand in this directory and say:
+#
+#   RUN_FLEXMOCK_EXAMPLE=true ruby ../bin/spec mocking_with_flexmock.rb
+
+if ENV['RUN_FLEXMOCK_EXAMPLE']
+  Spec::Runner.configure do |config|
+    config.mock_with :flexmock
+  end
+
+  describe "Flexmocks" do
+    it "should fail when the expected message is received with wrong arguments" do
+      m = flexmock("now flex!")
+      m.should_receive(:msg).with("arg").once
+      m.msg("other arg")
+    end
+
+    it "should fail when the expected message is not received at all" do
+      m = flexmock("now flex!")
+      m.should_receive(:msg).with("arg").once
+    end
+  end
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/mocking_with_mocha.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/mocking_with_mocha.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/mocking_with_mocha.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/mocking_with_mocha.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,25 @@
+# stub frameworks like to gum up Object, so this is deliberately
+# set NOT to run so that you don't accidentally run it when you
+# run this dir.
+
+# To run it, stand in this directory and say:
+#
+#   RUN_MOCHA_EXAMPLE=true ruby ../bin/spec mocking_with_mocha.rb
+
+if ENV['RUN_MOCHA_EXAMPLE']
+  Spec::Runner.configure do |config|
+    config.mock_with :mocha
+  end
+  describe "Mocha framework" do
+    it "should should be made available by saying config.mock_with :mocha" do
+      m = mock()
+      m.expects(:msg).with("arg")
+      m.msg
+    end
+    it "should should be made available by saying config.mock_with :mocha" do
+      o = Object.new
+      o.expects(:msg).with("arg")
+      o.msg
+    end
+  end
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/mocking_with_rr.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/mocking_with_rr.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/mocking_with_rr.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/mocking_with_rr.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,27 @@
+# stub frameworks like to gum up Object, so this is deliberately
+# set NOT to run so that you don't accidentally run it when you
+# run this dir.
+
+# To run it, stand in this directory and say:
+#
+#   RUN_RR_EXAMPLE=true ruby ../bin/spec mocking_with_rr.rb
+
+if ENV['RUN_RR_EXAMPLE']
+  Spec::Runner.configure do |config|
+    config.mock_with :rr
+  end
+  describe "RR framework" do
+    it "should should be made available by saying config.mock_with :rr" do
+      o = Object.new
+      mock(o).msg("arg")
+      o.msg
+    end
+    it "should should be made available by saying config.mock_with :rr" do
+      o = Object.new
+      mock(o) do |m|
+        m.msg("arg")
+      end
+      o.msg
+    end
+  end
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/partial_mock_example.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/partial_mock_example.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/partial_mock_example.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/partial_mock_example.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,20 @@
+require File.dirname(__FILE__) + '/spec_helper'
+
+class MockableClass
+  def self.find id
+    return :original_return
+  end
+end
+
+describe "A partial mock" do
+
+  it "should work at the class level (but fail here due to the type mismatch)" do
+    MockableClass.should_receive(:find).with(1).and_return {:stub_return}
+    MockableClass.find("1").should equal(:stub_return)
+  end
+
+  it "should revert to the original after each spec" do
+    MockableClass.find(1).should equal(:original_return)
+  end
+
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/predicate_example.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/predicate_example.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/predicate_example.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/predicate_example.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,34 @@
+require File.dirname(__FILE__) + '/spec_helper'
+
+class BddFramework
+  def intuitive?
+    true
+  end
+
+  def adopted_quickly?
+    #this will cause failures because it reallly SHOULD be adopted quickly
+    false
+  end
+end
+
+describe "BDD framework" do
+
+  before(:each) do
+    @bdd_framework = BddFramework.new
+  end
+
+  it "should be adopted quickly" do
+    #this will fail because it reallly SHOULD be adopted quickly
+    @bdd_framework.should be_adopted_quickly
+  end
+
+  it "should be intuitive" do
+    @bdd_framework.should be_intuitive
+  end
+
+  it "should not respond to test" do
+    #this will fail
+    @bdd_framework.test
+  end
+
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/raising_example.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/raising_example.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/raising_example.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/raising_example.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,47 @@
+describe "This example" do
+  
+  it "should show that a NoMethodError is raised but an Exception was expected" do
+    proc { ''.nonexistent_method }.should raise_error
+  end
+  
+  it "should pass" do
+    proc { ''.nonexistent_method }.should raise_error(NoMethodError)
+  end
+  
+  it "should show that a NoMethodError is raised but a SyntaxError was expected" do
+    proc { ''.nonexistent_method }.should raise_error(SyntaxError)
+  end
+  
+  it "should show that nothing is raised when SyntaxError was expected" do
+    proc { }.should raise_error(SyntaxError)
+  end
+
+  it "should show that a NoMethodError is raised but a Exception was expected" do
+    proc { ''.nonexistent_method }.should_not raise_error
+  end
+  
+  it "should show that a NoMethodError is raised" do
+    proc { ''.nonexistent_method }.should_not raise_error(NoMethodError)
+  end
+  
+  it "should also pass" do
+    proc { ''.nonexistent_method }.should_not raise_error(SyntaxError)
+  end
+  
+  it "should show that a NoMethodError is raised when nothing expected" do
+    proc { ''.nonexistent_method }.should_not raise_error(Exception)
+  end
+  
+  it "should show that the wrong message was received" do
+    proc { raise StandardError.new("what is an enterprise?") }.should raise_error(StandardError, "not this")
+  end
+  
+  it "should show that the unexpected error/message was thrown" do
+    proc { raise StandardError.new("abc") }.should_not raise_error(StandardError, "abc")
+  end
+  
+  it "should pass too" do
+    proc { raise StandardError.new("abc") }.should_not raise_error(StandardError, "xyz")
+  end
+  
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/spec_helper.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/spec_helper.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/spec_helper.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/spec_helper.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,3 @@
+lib_path = File.expand_path(File.dirname(__FILE__) + "/../../lib")
+$LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path)
+require "spec"

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/syntax_error_example.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/syntax_error_example.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/syntax_error_example.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/syntax_error_example.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,7 @@
+describe "when passing a block to a matcher" do
+  it "you should use {} instead of do/end" do
+    Object.new.should satisfy do
+      "this block is being passed to #should instead of #satisfy - use {} instead"
+    end
+  end
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/team_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/team_spec.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/team_spec.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/team_spec.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,44 @@
+require File.dirname(__FILE__) + '/spec_helper'
+
+
+class Team
+  attr_reader :players
+  def initialize
+    @players = Players.new
+  end
+end
+
+class Players
+  def initialize
+    @players = []
+  end
+  def size
+    @players.size
+  end
+  def include? player
+    raise "player must be a string" unless player.is_a?(String)
+    @players.include? player
+  end
+end
+
+describe "A new team" do
+  
+  before(:each) do
+    @team = Team.new
+  end
+  
+  it "should have 3 players (failing example)" do
+    @team.should have(3).players
+  end
+  
+  it "should include some player (failing example)" do
+    @team.players.should include("Some Player")
+  end
+
+  it "should include 5 (failing example)" do
+    @team.players.should include(5)
+  end
+  
+  it "should have no players"
+  
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/timeout_behaviour.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/timeout_behaviour.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/timeout_behaviour.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/failing/timeout_behaviour.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,7 @@
+require File.dirname(__FILE__) + '/spec_helper'
+
+describe "Something really slow" do
+  it "should be failed by RSpec when it takes longer than --timeout" do
+    sleep(2)
+  end
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/autogenerated_docstrings_example.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/autogenerated_docstrings_example.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/autogenerated_docstrings_example.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/autogenerated_docstrings_example.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,25 @@
+require File.dirname(__FILE__) + '/spec_helper'
+
+# Run spec w/ -fs to see the output of this file
+
+describe "Examples with no descriptions" do
+  
+  # description is auto-generated as "should equal(5)" based on the last #should
+  specify do
+    3.should equal(3)
+    5.should equal(5)
+  end
+  
+  specify { 3.should be < 5 }
+  
+  specify { ["a"].should include("a") }
+  
+  specify { [1,2,3].should respond_to(:size) }
+  
+end
+
+describe "the number 1" do
+  subject { 1 }
+  it { should == 1 }
+  it { should be < 2}
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/before_and_after_example.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/before_and_after_example.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/before_and_after_example.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/before_and_after_example.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,40 @@
+require File.dirname(__FILE__) + '/spec_helper'
+$global = 0
+
+describe "State created in before(:all)" do
+  before :all do
+    @sideeffect = 1
+    $global +=1
+  end
+
+  before :each do
+    @isolated = 1
+  end
+  
+  it "should be accessible from example" do
+    @sideeffect.should == 1
+    $global.should == 1
+    @isolated.should == 1
+
+    @sideeffect += 1
+    @isolated += 1
+  end
+
+  it "should not have sideffects" do
+    @sideeffect.should == 1
+    $global.should == 2
+    @isolated.should == 1
+
+    @sideeffect += 1
+    @isolated += 1
+  end
+
+  after :each do
+    $global += 1
+  end
+  
+  after :all do
+    $global.should == 3
+    $global = 0
+  end
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/behave_as_example.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/behave_as_example.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/behave_as_example.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/behave_as_example.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,45 @@
+require File.dirname(__FILE__) + '/spec_helper'
+
+def behave_as_electric_musician
+  respond_to(:read_notes, :turn_down_amp)
+end
+
+def behave_as_musician
+  respond_to(:read_notes)
+end
+
+module BehaveAsExample
+  
+  class BluesGuitarist
+    def read_notes; end
+    def turn_down_amp; end
+  end
+  
+  class RockGuitarist
+    def read_notes; end
+    def turn_down_amp; end
+  end
+  
+  class ClassicGuitarist
+    def read_notes; end
+  end
+  
+  describe BluesGuitarist do
+    it "should behave as guitarist" do
+      BluesGuitarist.new.should behave_as_electric_musician
+    end
+  end
+
+  describe RockGuitarist do
+    it "should behave as guitarist" do
+      RockGuitarist.new.should behave_as_electric_musician
+    end
+  end
+
+  describe ClassicGuitarist do
+    it "should not behave as guitarist" do
+      ClassicGuitarist.new.should behave_as_musician
+    end
+  end
+  
+end

Propchange: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/behave_as_example.rb
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/custom_expectation_matchers.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/custom_expectation_matchers.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/custom_expectation_matchers.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/custom_expectation_matchers.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,54 @@
+module AnimalSpecHelper
+  class Eat
+    def initialize(food)
+      @food = food
+    end
+    
+    def matches?(animal)
+      @animal = animal
+      @animal.eats?(@food)
+    end
+    
+    def failure_message
+      "expected #{@animal} to eat #{@food}, but it does not"
+    end
+    
+    def negative_failure_message
+      "expected #{@animal} not to eat #{@food}, but it does"
+    end
+  end
+    
+  def eat(food)
+    Eat.new(food)
+  end
+end
+
+module Animals
+  class Animal
+    def eats?(food)
+      return foods_i_eat.include?(food)
+    end
+  end
+  
+  class Mouse < Animal
+    def foods_i_eat
+      [:cheese]
+    end
+  end
+
+  describe Mouse do
+    include AnimalSpecHelper
+    before(:each) do
+      @mouse = Animals::Mouse.new
+    end
+  
+    it "should eat cheese" do
+      @mouse.should eat(:cheese)
+    end
+  
+    it "should not eat cat" do
+      @mouse.should_not eat(:cat)
+    end
+  end
+
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/custom_formatter.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/custom_formatter.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/custom_formatter.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/custom_formatter.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,12 @@
+require File.dirname(__FILE__) + '/spec_helper'
+require 'spec/runner/formatter/progress_bar_formatter'
+
+# Example of a formatter with custom bactrace printing. Run me with:
+# ruby bin/spec examples/failing -r examples/passing/custom_formatter.rb -f CustomFormatter
+class CustomFormatter < Spec::Runner::Formatter::ProgressBarFormatter
+  def backtrace_line(line)
+    line.gsub(/([^:]*\.rb):(\d*)/) do
+      "<a href=\"file://#{File.expand_path($1)}\">#{$1}:#{$2}</a> "
+    end
+  end
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/dynamic_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/dynamic_spec.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/dynamic_spec.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/dynamic_spec.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,9 @@
+require File.dirname(__FILE__) + '/spec_helper'
+
+describe "The square root" do
+  (1..10).each do |n|
+    it "of #{n*n} should be #{n}" do
+      Math.sqrt(n*n).should == n
+    end
+  end
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/file_accessor.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/file_accessor.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/file_accessor.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/file_accessor.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,19 @@
+require File.dirname(__FILE__) + '/spec_helper'
+class FileAccessor
+  def open_and_handle_with(pathname, processor)
+    pathname.open do |io|
+      processor.process(io)
+    end
+  end
+end
+
+if __FILE__ == $0
+  require File.dirname(__FILE__) + '/io_processor'
+  require 'pathname'
+  
+  accessor = FileAccessor.new
+  io_processor = IoProcessor.new
+  file = Pathname.new ARGV[0]
+
+  accessor.open_and_handle_with(file, io_processor)
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/file_accessor_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/file_accessor_spec.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/file_accessor_spec.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/file_accessor_spec.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,38 @@
+require File.dirname(__FILE__) + '/spec_helper'
+require File.dirname(__FILE__) + '/file_accessor'
+require 'stringio'
+
+describe "A FileAccessor" do
+  # This sequence diagram illustrates what this spec specifies.
+  #
+  #                  +--------------+     +----------+     +-------------+
+  #                  | FileAccessor |     | Pathname |     | IoProcessor |
+  #                  +--------------+     +----------+     +-------------+
+  #                         |                  |                  |
+  #   open_and_handle_with  |                  |                  |
+  #   -------------------->| |           open  |                  |
+  #                        | |--------------->| |                 |
+  #                        | | io             | |                 |
+  #                        | |<...............| |                 |
+  #                        | |                 |     process(io)  |
+  #                        | |---------------------------------->| |
+  #                        | |                 |                 | |
+  #                        | |<..................................| |
+  #                         |                  |                  |
+  #
+  it "should open a file and pass it to the processor's process method" do
+    # This is the primary actor
+    accessor = FileAccessor.new
+
+    # These are the primary actor's neighbours, which we mock.
+    file = mock "Pathname"
+    io_processor = mock "IoProcessor"
+    
+    io = StringIO.new "whatever"
+    file.should_receive(:open).and_yield io
+    io_processor.should_receive(:process).with(io)
+    
+    accessor.open_and_handle_with(file, io_processor)
+  end
+
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/greeter_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/greeter_spec.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/greeter_spec.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/greeter_spec.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,31 @@
+require File.dirname(__FILE__) + '/spec_helper'
+# greeter.rb
+#
+# Based on http://glu.ttono.us/articles/2006/12/19/tormenting-your-tests-with-heckle
+#
+# Run with:
+#
+#   spec greeter_spec.rb --heckle Greeter
+#
+class Greeter
+  def initialize(person = nil)
+    @person = person
+  end
+
+  def greet
+    @person.nil? ? "Hi there!" : "Hi #{@person}!"
+  end
+end
+
+describe "Greeter" do
+  it "should say Hi to person" do
+    greeter = Greeter.new("Kevin")
+    greeter.greet.should == "Hi Kevin!"
+  end
+
+  it "should say Hi to nobody" do
+    greeter = Greeter.new
+    # Uncomment the next line to make Heckle happy
+    #greeter.greet.should == "Hi there!"
+  end
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/helper_method_example.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/helper_method_example.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/helper_method_example.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/helper_method_example.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,14 @@
+require File.dirname(__FILE__) + '/spec_helper'
+
+module HelperMethodExample
+  describe "an example group with helper a method" do
+    def helper_method
+      "received call"
+    end
+  
+    it "should make that method available to specs" do
+      helper_method.should == "received call"
+    end
+  end
+end
+

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/io_processor.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/io_processor.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/io_processor.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/io_processor.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,8 @@
+class DataTooShort < StandardError; end
+
+class IoProcessor
+  # Does some fancy stuff unless the length of +io+ is shorter than 32
+  def process(io)
+    raise DataTooShort if io.read.length < 32
+  end
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/io_processor_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/io_processor_spec.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/io_processor_spec.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/io_processor_spec.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,21 @@
+require File.dirname(__FILE__) + '/spec_helper'
+require File.dirname(__FILE__) + '/io_processor'
+require 'stringio'
+
+describe "An IoProcessor" do
+  before(:each) do
+    @processor = IoProcessor.new
+  end
+
+  it "should raise nothing when the file is exactly 32 bytes" do
+    lambda {
+      @processor.process(StringIO.new("z"*32))
+    }.should_not raise_error
+  end
+
+  it "should raise an exception when the file length is less than 32 bytes" do
+    lambda {
+      @processor.process(StringIO.new("z"*31))
+    }.should raise_error(DataTooShort)
+  end
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/legacy_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/legacy_spec.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/legacy_spec.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/legacy_spec.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,11 @@
+require File.dirname(__FILE__) + '/spec_helper'
+context "A legacy spec" do
+  setup do
+  end
+  
+  specify "should work fine" do
+  end
+  
+  teardown do
+  end
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/mocking_example.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/mocking_example.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/mocking_example.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/mocking_example.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,27 @@
+require File.dirname(__FILE__) + '/spec_helper'
+
+describe "A consumer of a mock" do
+  it "should be able to send messages to the mock" do
+    mock = mock("poke me")
+    mock.should_receive(:poke)
+    mock.poke
+  end
+end
+
+describe "a mock" do
+  it "should be able to mock the same message twice w/ different args" do
+    mock = mock("mock")
+    mock.should_receive(:msg).with(:arg1).and_return(:val1)
+    mock.should_receive(:msg).with(:arg2).and_return(:val2)
+    mock.msg(:arg1).should eql(:val1)
+    mock.msg(:arg2).should eql(:val2)
+  end
+
+  it "should be able to mock the same message twice w/ different args in reverse order" do
+    mock = mock("mock")
+    mock.should_receive(:msg).with(:arg1).and_return(:val1)
+    mock.should_receive(:msg).with(:arg2).and_return(:val2)
+    mock.msg(:arg2).should eql(:val2)
+    mock.msg(:arg1).should eql(:val1)
+  end
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/multi_threaded_behaviour_runner.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/multi_threaded_behaviour_runner.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/multi_threaded_behaviour_runner.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/multi_threaded_behaviour_runner.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,28 @@
+class MultiThreadedExampleGroupRunner < Spec::Runner::ExampleGroupRunner
+  def initialize(options, arg)
+    super(options)
+    # configure these
+    @thread_count = 4
+    @thread_wait = 0
+  end
+
+  def run
+    @threads = []
+    q = Queue.new
+    example_groups.each { |b| q << b}
+    success = true
+    @thread_count.times do
+      @threads << Thread.new(q) do |queue|
+        while not queue.empty?
+          example_group = queue.pop
+          success &= example_group.suite.run(nil)
+        end
+      end
+      sleep @thread_wait
+    end
+    @threads.each {|t| t.join}
+    success
+  end
+end
+
+MultiThreadedBehaviourRunner = MultiThreadedExampleGroupRunner
\ No newline at end of file

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/nested_classes_example.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/nested_classes_example.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/nested_classes_example.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/nested_classes_example.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,36 @@
+require File.dirname(__FILE__) + '/spec_helper'
+require File.dirname(__FILE__) + '/stack'
+
+class StackExamples < Spec::ExampleGroup
+  describe(Stack)
+  before(:each) do
+    @stack = Stack.new
+  end
+end
+
+class EmptyStackExamples < StackExamples
+  describe("when empty")
+  it "should be empty" do
+    @stack.should be_empty
+  end
+end
+
+class AlmostFullStackExamples < StackExamples
+  describe("when almost full")
+  before(:each) do
+    (1..9).each {|n| @stack.push n}
+  end
+  it "should be full" do
+    @stack.should_not be_full
+  end
+end
+
+class FullStackExamples < StackExamples
+  describe("when full")
+  before(:each) do
+    (1..10).each {|n| @stack.push n}
+  end
+  it "should be full" do
+    @stack.should be_full
+  end
+end
\ No newline at end of file

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/partial_mock_example.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/partial_mock_example.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/partial_mock_example.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/partial_mock_example.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,29 @@
+require File.dirname(__FILE__) + '/spec_helper'
+
+class MockableClass
+  def self.find id
+    return :original_return
+  end
+end
+
+describe "A partial mock" do
+
+  it "should work at the class level" do
+    MockableClass.should_receive(:find).with(1).and_return {:stub_return}
+    MockableClass.find(1).should equal(:stub_return)
+  end
+
+  it "should revert to the original after each spec" do
+    MockableClass.find(1).should equal(:original_return)
+  end
+
+  it "can be mocked w/ ordering" do
+    MockableClass.should_receive(:msg_1).ordered
+    MockableClass.should_receive(:msg_2).ordered
+    MockableClass.should_receive(:msg_3).ordered
+    MockableClass.msg_1
+    MockableClass.msg_2
+    MockableClass.msg_3
+  end
+
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/pending_example.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/pending_example.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/pending_example.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/pending_example.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,20 @@
+require File.dirname(__FILE__) + '/spec_helper'
+
+describe "pending example (using pending method)" do
+  it %Q|should be reported as "PENDING: for some reason"| do
+    pending("for some reason")
+  end
+end
+
+describe "pending example (with no block)" do
+  it %Q|should be reported as "PENDING: Not Yet Implemented"|
+end
+
+describe "pending example (with block for pending)" do
+  it %Q|should have a failing block, passed to pending, reported as "PENDING: for some reason"| do
+    pending("for some reason") do
+      raise "some reason"
+    end
+  end
+end
+

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/predicate_example.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/predicate_example.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/predicate_example.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/predicate_example.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,27 @@
+require File.dirname(__FILE__) + '/spec_helper'
+
+class BddFramework
+  def intuitive?
+    true
+  end
+  
+  def adopted_quickly?
+    true
+  end
+end
+
+describe "BDD framework" do
+
+  before(:each) do
+    @bdd_framework = BddFramework.new
+  end
+
+  it "should be adopted quickly" do
+    @bdd_framework.should be_adopted_quickly
+  end
+  
+  it "should be intuitive" do
+    @bdd_framework.should be_intuitive
+  end
+
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/priority.txt
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/priority.txt?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/priority.txt (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/priority.txt Wed Dec 10 17:34:18 2008
@@ -0,0 +1 @@
+examples/custom_expectation_matchers.rb
\ No newline at end of file

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/shared_example_group_example.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/shared_example_group_example.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/shared_example_group_example.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/shared_example_group_example.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,81 @@
+require File.dirname(__FILE__) + '/spec_helper'
+
+module SharedExampleGroupExample
+  class OneThing
+    def what_things_do
+      "stuff"
+    end
+  end
+  
+  class AnotherThing
+    def what_things_do
+      "stuff"
+    end
+  end
+  
+  class YetAnotherThing
+    def what_things_do
+      "stuff"
+    end
+  end
+  
+  # A SharedExampleGroup is an example group that doesn't get run.
+  # You can create one like this:
+  share_examples_for "most things" do
+    def helper_method
+      "helper method"
+    end
+    
+    it "should do what things do" do
+      @thing.what_things_do.should == "stuff"
+    end
+  end
+
+  # A SharedExampleGroup is also a module. If you create one like this it gets
+  # assigned to the constant MostThings
+  share_as :MostThings do
+    def helper_method
+      "helper method"
+    end
+    
+    it "should do what things do" do
+      @thing.what_things_do.should == "stuff"
+    end
+  end
+  
+  describe OneThing do
+    # Now you can include the shared example group like this, which 
+    # feels more like what you might say ...
+    it_should_behave_like "most things"
+    
+    before(:each) { @thing = OneThing.new }
+    
+    it "should have access to helper methods defined in the shared example group" do
+      helper_method.should == "helper method"
+    end
+  end
+
+  describe AnotherThing do
+    # ... or you can include the example group like this, which
+    # feels more like the programming language we love.
+    it_should_behave_like MostThings
+    
+    before(:each) { @thing = AnotherThing.new }
+
+    it "should have access to helper methods defined in the shared example group" do
+      helper_method.should == "helper method"
+    end
+  end
+
+  describe YetAnotherThing do
+    # ... or you can include the example group like this, which
+    # feels more like the programming language we love.
+    include MostThings
+    
+    before(:each) { @thing = AnotherThing.new }
+
+    it "should have access to helper methods defined in the shared example group" do
+      helper_method.should == "helper method"
+    end
+  end
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/shared_stack_examples.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/shared_stack_examples.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/shared_stack_examples.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/shared_stack_examples.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,36 @@
+shared_examples_for "non-empty Stack" do
+
+  it { @stack.should_not be_empty }
+  
+  it "should return the top item when sent #peek" do
+    @stack.peek.should == @last_item_added
+  end
+  
+  it "should NOT remove the top item when sent #peek" do
+    @stack.peek.should == @last_item_added
+    @stack.peek.should == @last_item_added
+  end
+  
+  it "should return the top item when sent #pop" do
+    @stack.pop.should == @last_item_added
+  end
+  
+  it "should remove the top item when sent #pop" do
+    @stack.pop.should == @last_item_added
+    unless @stack.empty?
+      @stack.pop.should_not == @last_item_added
+    end
+  end
+  
+end
+
+shared_examples_for "non-full Stack" do
+
+  it { @stack.should_not be_full }
+
+  it "should add to the top when sent #push" do
+    @stack.push "newly added top item"
+    @stack.peek.should == "newly added top item"
+  end
+
+end
\ No newline at end of file

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/simple_matcher_example.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/simple_matcher_example.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/simple_matcher_example.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/simple_matcher_example.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,31 @@
+require File.dirname(__FILE__) + '/spec_helper'
+
+describe "arrays" do
+  def contain_same_elements_as(expected)
+    simple_matcher "array with same elements in any order as #{expected.inspect}" do |actual|
+      if actual.size == expected.size
+        a, e = actual.dup, expected.dup
+        until e.empty? do
+          if i = a.index(e.pop) then a.delete_at(i) end
+        end
+        a.empty?
+      else
+        false
+      end
+    end
+  end
+  
+  describe "can be matched by their contents disregarding order" do
+    subject { [1,2,2,3] }
+    it { should contain_same_elements_as([1,2,2,3]) }
+    it { should contain_same_elements_as([2,3,2,1]) }
+    it { should_not contain_same_elements_as([3,3,2,1]) }
+  end
+  
+  describe "fail the match with different contents" do
+    subject { [1,2,3] }
+    it { should_not contain_same_elements_as([2,3,4])}
+    it { should_not contain_same_elements_as([1,2,2,3])}
+    it { should_not contain_same_elements_as([1,2])}
+  end
+end
\ No newline at end of file

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/spec_helper.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/spec_helper.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/spec_helper.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/spec_helper.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,3 @@
+lib_path = File.expand_path("#{File.dirname(__FILE__)}/../../lib")
+$LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path)
+require 'spec'

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/stack.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/stack.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/stack.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/stack.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,36 @@
+class StackUnderflowError < RuntimeError
+end
+
+class StackOverflowError < RuntimeError
+end
+
+class Stack
+  
+  def initialize
+    @items = []
+  end
+  
+  def push object
+    raise StackOverflowError if @items.length == 10
+    @items.push object
+  end
+  
+  def pop
+    raise StackUnderflowError if @items.empty?
+    @items.delete @items.last
+  end
+  
+  def peek
+    raise StackUnderflowError if @items.empty?
+    @items.last
+  end
+  
+  def empty?
+    @items.empty?
+  end
+
+  def full?
+    @items.length == 10
+  end
+  
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/stack_spec.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/stack_spec.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/stack_spec.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/stack_spec.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,64 @@
+require File.dirname(__FILE__) + '/spec_helper'
+require File.dirname(__FILE__) + "/stack"
+require File.dirname(__FILE__) + '/shared_stack_examples'
+
+describe Stack, " (empty)" do
+  before(:each) do
+    @stack = Stack.new
+  end
+  
+  # This uses @stack (because the described class is Stack) auto-generates the
+  # description "should be empty"
+  it { should be_empty }
+  
+  it_should_behave_like "non-full Stack"
+  
+  it "should complain when sent #peek" do
+    lambda { @stack.peek }.should raise_error(StackUnderflowError)
+  end
+  
+  it "should complain when sent #pop" do
+    lambda { @stack.pop }.should raise_error(StackUnderflowError)
+  end
+end
+
+describe Stack, " (with one item)" do
+  before(:each) do
+    @stack = Stack.new
+    @stack.push 3
+    @last_item_added = 3
+  end
+
+  it_should_behave_like "non-empty Stack"
+  it_should_behave_like "non-full Stack"
+
+end
+
+describe Stack, " (with one item less than capacity)" do
+  before(:each) do
+    @stack = Stack.new
+    (1..9).each { |i| @stack.push i }
+    @last_item_added = 9
+  end
+  
+  it_should_behave_like "non-empty Stack"
+  it_should_behave_like "non-full Stack"
+end
+
+describe Stack, " (full)" do
+  before(:each) do
+    @stack = Stack.new
+    (1..10).each { |i| @stack.push i }
+    @last_item_added = 10
+  end
+
+  # NOTE that this one auto-generates the description "should be full"
+  it { @stack.should be_full }  
+
+  it_should_behave_like "non-empty Stack"
+
+  it "should complain on #push" do
+    lambda { @stack.push Object.new }.should raise_error(StackOverflowError)
+  end
+  
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/stack_spec_with_nested_example_groups.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/stack_spec_with_nested_example_groups.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/stack_spec_with_nested_example_groups.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/stack_spec_with_nested_example_groups.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,67 @@
+require File.dirname(__FILE__) + '/spec_helper'
+require File.dirname(__FILE__) + '/stack'
+require File.dirname(__FILE__) + '/shared_stack_examples'
+
+describe Stack do
+  
+  before(:each) do
+    @stack = Stack.new
+  end
+
+  describe "(empty)" do
+
+    it { @stack.should be_empty }
+  
+    it_should_behave_like "non-full Stack"
+  
+    it "should complain when sent #peek" do
+      lambda { @stack.peek }.should raise_error(StackUnderflowError)
+    end
+  
+    it "should complain when sent #pop" do
+      lambda { @stack.pop }.should raise_error(StackUnderflowError)
+    end
+
+  end
+
+  describe "(with one item)" do
+    
+    before(:each) do
+      @stack.push 3
+      @last_item_added = 3
+    end
+
+    it_should_behave_like "non-empty Stack"
+    it_should_behave_like "non-full Stack"
+
+  end
+
+  describe "(with one item less than capacity)" do
+    
+    before(:each) do
+      (1..9).each { |i| @stack.push i }
+      @last_item_added = 9
+    end
+  
+    it_should_behave_like "non-empty Stack"
+    it_should_behave_like "non-full Stack"
+  end
+
+  describe "(full)" do
+    
+    before(:each) do
+      (1..10).each { |i| @stack.push i }
+      @last_item_added = 10
+    end
+
+    it { @stack.should be_full }  
+
+    it_should_behave_like "non-empty Stack"
+
+    it "should complain on #push" do
+      lambda { @stack.push Object.new }.should raise_error(StackOverflowError)
+    end
+  
+  end
+
+end

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/stubbing_example.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/stubbing_example.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/stubbing_example.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/stubbing_example.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,69 @@
+require File.dirname(__FILE__) + '/spec_helper'
+
+describe "A consumer of a stub" do
+  it "should be able to stub methods on any Object" do
+    obj = Object.new
+    obj.stub!(:foobar).and_return {:return_value}
+    obj.foobar.should equal(:return_value)
+  end
+end
+
+class StubbableClass
+  def self.find id
+    return :original_return
+  end
+end
+
+describe "A stubbed method on a class" do
+  it "should return the stubbed value" do
+    StubbableClass.stub!(:find).and_return(:stub_return)
+    StubbableClass.find(1).should equal(:stub_return)
+  end
+  
+  it "should revert to the original method after each spec" do
+    StubbableClass.find(1).should equal(:original_return)
+  end
+
+  it "can stub! and mock the same message" do
+    StubbableClass.stub!(:msg).and_return(:stub_value)
+    StubbableClass.should_receive(:msg).with(:arg).and_return(:mock_value)
+
+    StubbableClass.msg.should equal(:stub_value)
+    StubbableClass.msg(:other_arg).should equal(:stub_value)
+    StubbableClass.msg(:arg).should equal(:mock_value)
+    StubbableClass.msg(:another_arg).should equal(:stub_value)
+    StubbableClass.msg(:yet_another_arg).should equal(:stub_value)
+    StubbableClass.msg.should equal(:stub_value)
+  end
+end
+
+describe "A mock" do
+  it "can stub!" do
+    mock = mock("stubbing mock")
+    mock.stub!(:msg).and_return(:value)
+    (1..10).each {mock.msg.should equal(:value)}
+  end
+  
+  it "can stub! and mock" do
+    mock = mock("stubbing mock")
+    mock.stub!(:stub_message).and_return(:stub_value)
+    mock.should_receive(:mock_message).once.and_return(:mock_value)
+    (1..10).each {mock.stub_message.should equal(:stub_value)}
+    mock.mock_message.should equal(:mock_value)
+    (1..10).each {mock.stub_message.should equal(:stub_value)}
+  end
+  
+  it "can stub! and mock the same message" do
+    mock = mock("stubbing mock")
+    mock.stub!(:msg).and_return(:stub_value)
+    mock.should_receive(:msg).with(:arg).and_return(:mock_value)
+    mock.msg.should equal(:stub_value)
+    mock.msg(:other_arg).should equal(:stub_value)
+    mock.msg(:arg).should equal(:mock_value)
+    mock.msg(:another_arg).should equal(:stub_value)
+    mock.msg(:yet_another_arg).should equal(:stub_value)
+    mock.msg.should equal(:stub_value)
+  end
+end
+
+    

Added: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/yielding_example.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/yielding_example.rb?rev=725524&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/yielding_example.rb (added)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/examples/passing/yielding_example.rb Wed Dec 10 17:34:18 2008
@@ -0,0 +1,33 @@
+require File.dirname(__FILE__) + '/spec_helper'
+
+class MessageAppender
+  
+  def initialize(appendage)
+    @appendage = appendage
+  end
+  
+  def append_to(message)
+    if_told_to_yield do
+      message << @appendage
+    end
+  end
+    
+end
+
+describe "a message expectation yielding to a block" do
+  it "should yield if told to" do
+    appender = MessageAppender.new("appended to")
+    appender.should_receive(:if_told_to_yield).and_yield
+    message = ""
+    appender.append_to(message)
+    message.should == "appended to"
+  end
+
+  it "should not yield if not told to" do
+    appender = MessageAppender.new("appended to")
+    appender.should_receive(:if_told_to_yield)
+    message = ""
+    appender.append_to(message)
+    message.should == ""
+  end
+end
\ No newline at end of file

Modified: incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/lib/autotest/discover.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/lib/autotest/discover.rb?rev=725524&r1=725523&r2=725524&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/lib/autotest/discover.rb (original)
+++ incubator/olio/webapp/rails/trunk/vendor/plugins/rspec/lib/autotest/discover.rb Wed Dec 10 17:34:18 2008
@@ -1,3 +1,3 @@
 Autotest.add_discovery do
-  "rspec" if File.exist?('spec')
+  "rspec" if File.directory?('spec') && ENV['RSPEC']
 end



Mime
View raw message