diff --git a/vendor/plugins/rspec-rails/.gitignore b/vendor/plugins/rspec-rails/.gitignore deleted file mode 100644 index f4fda458a..000000000 --- a/vendor/plugins/rspec-rails/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -tmtags -.DS_Store -.emacs-project -*~ -pkg -doc -email.txt diff --git a/vendor/plugins/rspec-rails/History.txt b/vendor/plugins/rspec-rails/History.txt deleted file mode 100644 index ec086ff29..000000000 --- a/vendor/plugins/rspec-rails/History.txt +++ /dev/null @@ -1,93 +0,0 @@ -=== Version 1.1.11 / 2008-10-24 - -* No changes to rspec-rails - release to align with bug-fix release in rspec ... again :( - -=== Version 1.1.10 / 2008-10-24 - -* No changes to rspec-rails - release to align with bug-fix release in rspec - -=== Version 1.1.9 / 2008-10-20 - -* 4 bug fixes - - * require 'rubygems' in script/spec - * fix failure message for error_on and errors_on (Patch from Mike Vincent). Fixes #566. - * fix issues that arise in view spec if passing actual template name to render (Patch from Mike Vincent). Fixes #551. - * fixed bug accessing assigns from helper examples - -=== Version 1.1.8 / 2008-10-03 - -* 2 bug fixes - - * correctly handle assigns that are false. Fixes #552. - * ensure that NotYetImplemented examples report as pending (fixed in rspec, not rspec-rails). Fixes #553. - -=== Version 1.1.7 / 2008-10-02 - -* 1 bug fix - - * depend on the correct version of rspec - -=== Version 1.1.6 / 2008-10-02 - -* 1 bug fix - - * fixed regression where values assigned to the assigns hash were not accessible from the example (#549) - -=== Version 1.1.5 / 2008-09-28 - -IMPORTANT: use 'script/autospec' (or just 'autospec' if you have the rspec gem -installed) instead of 'autotest'. We changed the way autotest discovers rspec -so the autotest executable won't automatically load rspec anymore. This allows -rspec to live side by side other spec frameworks without always co-opting -autotest through autotest's discovery mechanism. - -ALSO IMPORTANT: Rails v2.1.1 changed assert_select_rjs such that it doesn't -always fail when it should. Please see -http://rails.lighthouseapp.com/projects/8994/tickets/982. - -* Generated route specs have shorter names, making it less painful to modify their implementation -* Add conditional so Rails 2.1.0 doesn't warn about cache_template_extensions (patch from James Herdman) -* Fixed stub_model examples to work with Rails 2.1.0 (the code was fine, just the examples needed patching) -* use hoe for build/release -* reworked generated examples for rspec_scaffold - thanks to Mikel Lindsaar and Dan Manges for their feedback -* bye, bye translator -* Added proxy to cookies so you can set them in examples the same way you set them in controllers -* Added script/autospec so you can run autospec without installing the gem -* Support --skip-fixture in the rspec_model generator (patches from Alex Tomlins and Niels Ganser) -* Add mock_model#as_new_record (patch from Zach Dennis) -* mock(:null_object=>true) plays nice with HTML (patch from Gerrit Kaiser) -* Suppress a deprecation notice in Rails 2.1 (James Herdman) -* quiet deprecation warning on inflector (RSL) -* rspec-rails gem (Ben Mabey) -* updated generated code examples -* Make rspec_model generator honour --skip-fixtures tag (Niels Ganser, Alex Tomlins) -* Fix to create new models with attributes in command line (Nicolas) -* fix to_param in mock_model with stubbed id incorrectly returning autogenerated id (Adam Meehan) -* Call Rail's TestCase setup/teardown callbacks (Jonathan del Strother) -* Only run TestUnitTesting once (Jonathan del Strother) -* use require_dependency instead of require (Brandon Keepers) -* Fixed a problem caused by controller action names getting out of sync between rspec-dev and rspec-rails for speccing (Matt Patterson) -* don't mutate hash passed to mock_model (Reg Vos) - -=== Version 1.1.4 - -Maintenance release. - -* Moved mock_model and stub_model to their own module: Spec::Rails::Mocks -* Setting mock_model object id with stubs hash - patch from Adam Meehan -* Added as_new_record to stub_model e.g. stub_model(Foo).as_new_record -* Improved stub_model such that new_record? does "the right thing" -* Patch from Pat Maddox to get integrate_views to work in nested example groups. -* Patch from Pat Maddox to get controller_name to work in nested example groups. -* Patch from Corey Haines to add include_text matcher -* Added stub_model method which creates a real model instance with :id stubbed and data access prohibited. -* Applied patch from Pat Maddox to handle redirect_to w/ SSL. Closes #320. -* Added #helper and #assigns to helper specs. -* Applied patch from Bryan Helmkamp to tweak format of generated spec.opts to be more obvious. Closes #162. -* Tweaked list of exceptions (ignores) for autotest -* Applied patch from Rick Olson to get rspec_on_rails working with rails edge (>= 8862) -* Applied patch from Wincent Colaiuta to invert sense of "spec --diff". Closes #281. -* Allow any type of render in view specs. Closes #57. -* Applied patch from Ian White to get rspec working with edge rails (8804). Closes #271. -* Applied patch from Jon Strother to have spec_server reload fixtures. Closes #344. \ No newline at end of file diff --git a/vendor/plugins/rspec-rails/License.txt b/vendor/plugins/rspec-rails/License.txt deleted file mode 100644 index 161a1420e..000000000 --- a/vendor/plugins/rspec-rails/License.txt +++ /dev/null @@ -1,33 +0,0 @@ -(The MIT License) - -==================================================================== -==== RSpec, RSpec-Rails -Copyright (c) 2005-2008 The RSpec Development Team -==================================================================== -==== ARTS -Copyright (c) 2006 Kevin Clark, Jake Howerton -==================================================================== -==== ZenTest -Copyright (c) 2001-2006 Ryan Davis, Eric Hodel, Zen Spider Software -==================================================================== -==== AssertSelect -Copyright (c) 2006 Assaf Arkin -==================================================================== - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/plugins/rspec-rails/Manifest.txt b/vendor/plugins/rspec-rails/Manifest.txt deleted file mode 100644 index 4649bb1ae..000000000 --- a/vendor/plugins/rspec-rails/Manifest.txt +++ /dev/null @@ -1,161 +0,0 @@ -History.txt -License.txt -Manifest.txt -README.txt -Rakefile -UPGRADE -generators/rspec/CHANGES -generators/rspec/rspec_generator.rb -generators/rspec/templates/all_stories.rb -generators/rspec/templates/previous_failures.txt -generators/rspec/templates/rcov.opts -generators/rspec/templates/rspec.rake -generators/rspec/templates/script/autospec -generators/rspec/templates/script/spec -generators/rspec/templates/script/spec_server -generators/rspec/templates/spec.opts -generators/rspec/templates/spec_helper.rb -generators/rspec/templates/stories_helper.rb -generators/rspec_controller/USAGE -generators/rspec_controller/rspec_controller_generator.rb -generators/rspec_controller/templates/controller_spec.rb -generators/rspec_controller/templates/helper_spec.rb -generators/rspec_controller/templates/view_spec.rb -generators/rspec_default_values.rb -generators/rspec_model/USAGE -generators/rspec_model/rspec_model_generator.rb -generators/rspec_model/templates/model_spec.rb -generators/rspec_scaffold/rspec_scaffold_generator.rb -generators/rspec_scaffold/templates/controller_spec.rb -generators/rspec_scaffold/templates/edit_erb_spec.rb -generators/rspec_scaffold/templates/helper_spec.rb -generators/rspec_scaffold/templates/index_erb_spec.rb -generators/rspec_scaffold/templates/new_erb_spec.rb -generators/rspec_scaffold/templates/routing_spec.rb -generators/rspec_scaffold/templates/show_erb_spec.rb -init.rb -lib/autotest/discover.rb -lib/autotest/rails_rspec.rb -lib/spec/rails.rb -lib/spec/rails/example.rb -lib/spec/rails/example/assigns_hash_proxy.rb -lib/spec/rails/example/controller_example_group.rb -lib/spec/rails/example/cookies_proxy.rb -lib/spec/rails/example/functional_example_group.rb -lib/spec/rails/example/helper_example_group.rb -lib/spec/rails/example/model_example_group.rb -lib/spec/rails/example/rails_example_group.rb -lib/spec/rails/example/render_observer.rb -lib/spec/rails/example/view_example_group.rb -lib/spec/rails/extensions.rb -lib/spec/rails/extensions/action_controller/base.rb -lib/spec/rails/extensions/action_controller/rescue.rb -lib/spec/rails/extensions/action_controller/test_response.rb -lib/spec/rails/extensions/action_view/base.rb -lib/spec/rails/extensions/active_record/base.rb -lib/spec/rails/extensions/object.rb -lib/spec/rails/extensions/spec/example/configuration.rb -lib/spec/rails/extensions/spec/matchers/have.rb -lib/spec/rails/interop/testcase.rb -lib/spec/rails/matchers.rb -lib/spec/rails/matchers/assert_select.rb -lib/spec/rails/matchers/change.rb -lib/spec/rails/matchers/have_text.rb -lib/spec/rails/matchers/include_text.rb -lib/spec/rails/matchers/redirect_to.rb -lib/spec/rails/matchers/render_template.rb -lib/spec/rails/mocks.rb -lib/spec/rails/story_adapter.rb -lib/spec/rails/version.rb -rspec-rails.gemspec -spec/rails/autotest/mappings_spec.rb -spec/rails/example/assigns_hash_proxy_spec.rb -spec/rails/example/configuration_spec.rb -spec/rails/example/controller_isolation_spec.rb -spec/rails/example/controller_spec_spec.rb -spec/rails/example/cookies_proxy_spec.rb -spec/rails/example/example_group_factory_spec.rb -spec/rails/example/helper_spec_spec.rb -spec/rails/example/model_spec_spec.rb -spec/rails/example/shared_behaviour_spec.rb -spec/rails/example/test_unit_assertion_accessibility_spec.rb -spec/rails/example/view_spec_spec.rb -spec/rails/extensions/action_controller_rescue_action_spec.rb -spec/rails/extensions/action_view_base_spec.rb -spec/rails/extensions/active_record_spec.rb -spec/rails/interop/testcase_spec.rb -spec/rails/matchers/assert_select_spec.rb -spec/rails/matchers/description_generation_spec.rb -spec/rails/matchers/errors_on_spec.rb -spec/rails/matchers/have_text_spec.rb -spec/rails/matchers/include_text_spec.rb -spec/rails/matchers/redirect_to_spec.rb -spec/rails/matchers/render_template_spec.rb -spec/rails/matchers/should_change_spec.rb -spec/rails/mocks/ar_classes.rb -spec/rails/mocks/mock_model_spec.rb -spec/rails/mocks/stub_model_spec.rb -spec/rails/sample_modified_fixture.rb -spec/rails/sample_spec.rb -spec/rails/spec_server_spec.rb -spec/rails/spec_spec.rb -spec/rails_suite.rb -spec/spec_helper.rb -spec_resources/controllers/action_view_base_spec_controller.rb -spec_resources/controllers/controller_spec_controller.rb -spec_resources/controllers/redirect_spec_controller.rb -spec_resources/controllers/render_spec_controller.rb -spec_resources/controllers/rjs_spec_controller.rb -spec_resources/helpers/addition_helper.rb -spec_resources/helpers/explicit_helper.rb -spec_resources/helpers/more_explicit_helper.rb -spec_resources/helpers/plugin_application_helper.rb -spec_resources/helpers/view_spec_helper.rb -spec_resources/views/controller_spec/_partial.rhtml -spec_resources/views/controller_spec/action_setting_flash_after_session_reset.rhtml -spec_resources/views/controller_spec/action_setting_flash_before_session_reset.rhtml -spec_resources/views/controller_spec/action_setting_the_assigns_hash.rhtml -spec_resources/views/controller_spec/action_with_errors_in_template.rhtml -spec_resources/views/controller_spec/action_with_template.rhtml -spec_resources/views/layouts/application.rhtml -spec_resources/views/layouts/simple.rhtml -spec_resources/views/objects/_object.html.erb -spec_resources/views/render_spec/_a_partial.rhtml -spec_resources/views/render_spec/action_with_alternate_layout.rhtml -spec_resources/views/render_spec/some_action.js.rjs -spec_resources/views/render_spec/some_action.rhtml -spec_resources/views/render_spec/some_action.rjs -spec_resources/views/rjs_spec/_replacement_partial.rhtml -spec_resources/views/rjs_spec/hide_div.rjs -spec_resources/views/rjs_spec/hide_page_element.rjs -spec_resources/views/rjs_spec/insert_html.rjs -spec_resources/views/rjs_spec/replace.rjs -spec_resources/views/rjs_spec/replace_html.rjs -spec_resources/views/rjs_spec/replace_html_with_partial.rjs -spec_resources/views/rjs_spec/visual_effect.rjs -spec_resources/views/rjs_spec/visual_toggle_effect.rjs -spec_resources/views/tag_spec/no_tags.rhtml -spec_resources/views/tag_spec/single_div_with_no_attributes.rhtml -spec_resources/views/tag_spec/single_div_with_one_attribute.rhtml -spec_resources/views/view_spec/_partial.rhtml -spec_resources/views/view_spec/_partial_used_twice.rhtml -spec_resources/views/view_spec/_partial_with_local_variable.rhtml -spec_resources/views/view_spec/_partial_with_sub_partial.rhtml -spec_resources/views/view_spec/_spacer.rhtml -spec_resources/views/view_spec/accessor.rhtml -spec_resources/views/view_spec/block_helper.rhtml -spec_resources/views/view_spec/entry_form.rhtml -spec_resources/views/view_spec/explicit_helper.rhtml -spec_resources/views/view_spec/foo/show.rhtml -spec_resources/views/view_spec/implicit_helper.rhtml -spec_resources/views/view_spec/multiple_helpers.rhtml -spec_resources/views/view_spec/should_not_receive.rhtml -spec_resources/views/view_spec/template_with_partial.rhtml -spec_resources/views/view_spec/template_with_partial_using_collection.rhtml -spec_resources/views/view_spec/template_with_partial_with_array.rhtml -stories/all.rb -stories/configuration/stories.rb -stories/helper.rb -stories/steps/people.rb -stories/transactions_should_rollback -stories/transactions_should_rollback.rb diff --git a/vendor/plugins/rspec-rails/README.txt b/vendor/plugins/rspec-rails/README.txt deleted file mode 100644 index d8794f3fb..000000000 --- a/vendor/plugins/rspec-rails/README.txt +++ /dev/null @@ -1,46 +0,0 @@ -= Spec::Rails - -* http://rspec.info -* http://rspec.info/rdoc-rails/ -* http://rubyforge.org/projects/rspec -* http://github.com/dchelimsky/rspec-rails/wikis -* mailto:rspec-devel@rubyforge.org - -== DESCRIPTION: - -Behaviour Driven Development for Ruby on Rails. - -Spec::Rails (a.k.a. RSpec on Rails) is a Ruby on Rails plugin that allows you -to drive the development of your RoR application using RSpec, a framework that -aims to enable Example Driven Development in Ruby. - -== FEATURES: - -* Use RSpec to independently specify Rails Models, Views, Controllers and Helpers -* Integrated fixture loading -* Special generators for Resources, Models, Views and Controllers that generate Specs instead of Tests. - -== VISION: - -For people for whom TDD is a brand new concept, the testing support built into -Ruby on Rails is a huge leap forward. The fact that it is built right in is -fantastic, and Ruby on Rails apps are generally much easier to maintain than -they might have been without such support. - -For those of us coming from a history with TDD, and now BDD, the existing -support presents some problems related to dependencies across examples. To -that end, RSpec on Rails supports 4 types of examples. We’ve also built in -first class mocking and stubbing support in order to break dependencies across -these different concerns. - -== MORE INFORMATION: - -See Spec::Rails::Runner for information about the different kinds of example -groups you can use to spec the different Rails components - -See Spec::Rails::Expectations for information about Rails-specific -expectations you can set on responses and models, etc. - -== INSTALL - -* Visit http://github.com/dchelimsky/rspec-rails/wikis for installation instructions. diff --git a/vendor/plugins/rspec-rails/Rakefile b/vendor/plugins/rspec-rails/Rakefile deleted file mode 100644 index 52241fe15..000000000 --- a/vendor/plugins/rspec-rails/Rakefile +++ /dev/null @@ -1,39 +0,0 @@ -require 'rubygems' -require 'hoe' -require './lib/spec/rails/version' - -class Hoe - def extra_deps - @extra_deps.reject! { |x| Array(x).first == 'hoe' } - @extra_deps - end -end - -Hoe.new('rspec-rails', Spec::Rails::VERSION::STRING) do |p| - p.summary = Spec::Rails::VERSION::SUMMARY - p.url = 'http://rspec.info/' - p.description = "Behaviour Driven Development for Ruby on Rails." - p.rubyforge_name = 'rspec' - p.developer('RSpec Development Team', 'rspec-devel@rubyforge.org') - p.extra_deps = [["rspec","1.1.11"]] - p.remote_rdoc_dir = "rspec-rails/#{Spec::Rails::VERSION::STRING}" -end - -['audit','test','test_deps','default','post_blog', 'release'].each do |task| - Rake.application.instance_variable_get('@tasks').delete(task) -end - -task :release => [:clean, :package] do |t| - version = ENV["VERSION"] or abort "Must supply VERSION=x.y.z" - abort "Versions don't match #{version} vs #{Spec::Rails::VERSION::STRING}" unless version == Spec::Rails::VERSION::STRING - pkg = "pkg/rspec-rails-#{version}" - - rubyforge = RubyForge.new.configure - puts "Logging in to rubyforge ..." - rubyforge.login - - puts "Releasing rspec-rails version #{version} ..." - ["#{pkg}.gem", "#{pkg}.tgz"].each do |file| - rubyforge.add_file('rspec', 'rspec', Spec::Rails::VERSION::STRING, file) - end -end \ No newline at end of file diff --git a/vendor/plugins/rspec-rails/UPGRADE b/vendor/plugins/rspec-rails/UPGRADE deleted file mode 100644 index dd2c4ac15..000000000 --- a/vendor/plugins/rspec-rails/UPGRADE +++ /dev/null @@ -1,7 +0,0 @@ -== Upgrade - - script/generate rspec - -Or modify spec_helper.rb based on the template, which can be found at: - - vendor/plugins/rspec-rails/generators/rspec/templates/spec_helper.rb \ No newline at end of file diff --git a/vendor/plugins/rspec-rails/generators/rspec/CHANGES b/vendor/plugins/rspec-rails/generators/rspec/CHANGES deleted file mode 100644 index 69f37090e..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec/CHANGES +++ /dev/null @@ -1 +0,0 @@ -Please refer to the CHANGES file for RSpec's core \ No newline at end of file diff --git a/vendor/plugins/rspec-rails/generators/rspec/rspec_generator.rb b/vendor/plugins/rspec-rails/generators/rspec/rspec_generator.rb deleted file mode 100644 index a0aedfadb..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec/rspec_generator.rb +++ /dev/null @@ -1,40 +0,0 @@ -require 'rbconfig' - -# This generator bootstraps a Rails project for use with RSpec -class RspecGenerator < Rails::Generator::Base - DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'], - Config::CONFIG['ruby_install_name']) - - def initialize(runtime_args, runtime_options = {}) - Dir.mkdir('lib/tasks') unless File.directory?('lib/tasks') - super - end - - def manifest - record do |m| - script_options = { :chmod => 0755, :shebang => options[:shebang] == DEFAULT_SHEBANG ? nil : options[:shebang] } - - m.file 'rspec.rake', 'lib/tasks/rspec.rake' - - m.file 'script/autospec', 'script/autospec', script_options - m.file 'script/spec', 'script/spec', script_options - m.file 'script/spec_server', 'script/spec_server', script_options - - m.directory 'spec' - m.file 'rcov.opts', 'spec/rcov.opts' - m.file 'spec.opts', 'spec/spec.opts' - m.template 'spec_helper.rb', 'spec/spec_helper.rb' - - m.directory 'stories' - m.file 'all_stories.rb', 'stories/all.rb' - m.file 'stories_helper.rb', 'stories/helper.rb' - end - end - -protected - - def banner - "Usage: #{$0} rspec" - end - -end diff --git a/vendor/plugins/rspec-rails/generators/rspec/templates/all_stories.rb b/vendor/plugins/rspec-rails/generators/rspec/templates/all_stories.rb deleted file mode 100644 index 2e8f46a40..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec/templates/all_stories.rb +++ /dev/null @@ -1,4 +0,0 @@ -dir = File.dirname(__FILE__) -Dir[File.expand_path("#{dir}/**/*.rb")].uniq.each do |file| - require file -end \ No newline at end of file diff --git a/vendor/plugins/rspec-rails/generators/rspec/templates/previous_failures.txt b/vendor/plugins/rspec-rails/generators/rspec/templates/previous_failures.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/vendor/plugins/rspec-rails/generators/rspec/templates/rcov.opts b/vendor/plugins/rspec-rails/generators/rspec/templates/rcov.opts deleted file mode 100644 index baf694c9c..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec/templates/rcov.opts +++ /dev/null @@ -1,2 +0,0 @@ ---exclude "spec/*,gems/*" ---rails \ No newline at end of file diff --git a/vendor/plugins/rspec-rails/generators/rspec/templates/rspec.rake b/vendor/plugins/rspec-rails/generators/rspec/templates/rspec.rake deleted file mode 100644 index 2a478a8b6..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec/templates/rspec.rake +++ /dev/null @@ -1,132 +0,0 @@ -raise "To avoid rake task loading problems: run 'rake clobber' in vendor/plugins/rspec" if File.directory?(File.join(File.dirname(__FILE__), *%w[.. .. vendor plugins rspec pkg])) -raise "To avoid rake task loading problems: run 'rake clobber' in vendor/plugins/rspec-rails" if File.directory?(File.join(File.dirname(__FILE__), *%w[.. .. vendor plugins rspec-rails pkg])) - -# In rails 1.2, plugins aren't available in the path until they're loaded. -# Check to see if the rspec plugin is installed first and require -# it if it is. If not, use the gem version. -rspec_base = File.expand_path(File.dirname(__FILE__) + '/../../vendor/plugins/rspec/lib') -$LOAD_PATH.unshift(rspec_base) if File.exist?(rspec_base) -require 'spec/rake/spectask' - -spec_prereq = File.exist?(File.join(RAILS_ROOT, 'config', 'database.yml')) ? "db:test:prepare" : :noop -task :noop do -end - -task :default => :spec -task :stats => "spec:statsetup" - -desc "Run all specs in spec directory (excluding plugin specs)" -Spec::Rake::SpecTask.new(:spec => spec_prereq) do |t| - t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""] - t.spec_files = FileList['spec/**/*_spec.rb'] -end - -namespace :spec do - desc "Run all specs in spec directory with RCov (excluding plugin specs)" - Spec::Rake::SpecTask.new(:rcov) do |t| - t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""] - t.spec_files = FileList['spec/**/*_spec.rb'] - t.rcov = true - t.rcov_opts = lambda do - IO.readlines("#{RAILS_ROOT}/spec/rcov.opts").map {|l| l.chomp.split " "}.flatten - end - end - - desc "Print Specdoc for all specs (excluding plugin specs)" - Spec::Rake::SpecTask.new(:doc) do |t| - t.spec_opts = ["--format", "specdoc", "--dry-run"] - t.spec_files = FileList['spec/**/*_spec.rb'] - end - - desc "Print Specdoc for all plugin specs" - Spec::Rake::SpecTask.new(:plugin_doc) do |t| - t.spec_opts = ["--format", "specdoc", "--dry-run"] - t.spec_files = FileList['vendor/plugins/**/spec/**/*_spec.rb'].exclude('vendor/plugins/rspec/*') - end - - [:models, :controllers, :views, :helpers, :lib].each do |sub| - desc "Run the specs under spec/#{sub}" - Spec::Rake::SpecTask.new(sub => spec_prereq) do |t| - t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""] - t.spec_files = FileList["spec/#{sub}/**/*_spec.rb"] - end - end - - desc "Run the specs under vendor/plugins (except RSpec's own)" - Spec::Rake::SpecTask.new(:plugins => spec_prereq) do |t| - t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""] - t.spec_files = FileList['vendor/plugins/**/spec/**/*_spec.rb'].exclude('vendor/plugins/rspec/*').exclude("vendor/plugins/rspec-rails/*") - end - - namespace :plugins do - desc "Runs the examples for rspec_on_rails" - Spec::Rake::SpecTask.new(:rspec_on_rails) do |t| - t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""] - t.spec_files = FileList['vendor/plugins/rspec-rails/spec/**/*_spec.rb'] - end - end - - # Setup specs for stats - task :statsetup do - require 'code_statistics' - ::STATS_DIRECTORIES << %w(Model\ specs spec/models) if File.exist?('spec/models') - ::STATS_DIRECTORIES << %w(View\ specs spec/views) if File.exist?('spec/views') - ::STATS_DIRECTORIES << %w(Controller\ specs spec/controllers) if File.exist?('spec/controllers') - ::STATS_DIRECTORIES << %w(Helper\ specs spec/helpers) if File.exist?('spec/helpers') - ::STATS_DIRECTORIES << %w(Library\ specs spec/lib) if File.exist?('spec/lib') - ::CodeStatistics::TEST_TYPES << "Model specs" if File.exist?('spec/models') - ::CodeStatistics::TEST_TYPES << "View specs" if File.exist?('spec/views') - ::CodeStatistics::TEST_TYPES << "Controller specs" if File.exist?('spec/controllers') - ::CodeStatistics::TEST_TYPES << "Helper specs" if File.exist?('spec/helpers') - ::CodeStatistics::TEST_TYPES << "Library specs" if File.exist?('spec/lib') - ::STATS_DIRECTORIES.delete_if {|a| a[0] =~ /test/} - end - - namespace :db do - namespace :fixtures do - desc "Load fixtures (from spec/fixtures) into the current environment's database. Load specific fixtures using FIXTURES=x,y" - task :load => :environment do - require 'active_record/fixtures' - ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym) - (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir.glob(File.join(RAILS_ROOT, 'spec', 'fixtures', '*.{yml,csv}'))).each do |fixture_file| - Fixtures.create_fixtures('spec/fixtures', File.basename(fixture_file, '.*')) - end - end - end - end - - namespace :server do - daemonized_server_pid = File.expand_path("spec_server.pid", RAILS_ROOT + "/tmp") - - desc "start spec_server." - task :start do - if File.exist?(daemonized_server_pid) - $stderr.puts "spec_server is already running." - else - $stderr.puts "Starting up spec server." - system("ruby", "script/spec_server", "--daemon", "--pid", daemonized_server_pid) - end - end - - desc "stop spec_server." - task :stop do - unless File.exist?(daemonized_server_pid) - $stderr.puts "No server running." - else - $stderr.puts "Shutting down spec_server." - system("kill", "-s", "TERM", File.read(daemonized_server_pid).strip) && - File.delete(daemonized_server_pid) - end - end - - desc "reload spec_server." - task :restart do - unless File.exist?(daemonized_server_pid) - $stderr.puts "No server running." - else - $stderr.puts "Reloading down spec_server." - system("kill", "-s", "USR2", File.read(daemonized_server_pid).strip) - end - end - end -end diff --git a/vendor/plugins/rspec-rails/generators/rspec/templates/script/autospec b/vendor/plugins/rspec-rails/generators/rspec/templates/script/autospec deleted file mode 100644 index 7dfdff4fe..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec/templates/script/autospec +++ /dev/null @@ -1,5 +0,0 @@ -#!/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) || - $stderr.puts("Unable to find autotest. Please install ZenTest or fix your PATH") diff --git a/vendor/plugins/rspec-rails/generators/rspec/templates/script/spec b/vendor/plugins/rspec-rails/generators/rspec/templates/script/spec deleted file mode 100644 index c54cba1b3..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec/templates/script/spec +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ruby -$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../vendor/plugins/rspec/lib")) -require 'rubygems' -require 'spec' -exit ::Spec::Runner::CommandLine.run(::Spec::Runner::OptionParser.parse(ARGV, STDERR, STDOUT)) diff --git a/vendor/plugins/rspec-rails/generators/rspec/templates/script/spec_server b/vendor/plugins/rspec-rails/generators/rspec/templates/script/spec_server deleted file mode 100644 index 17b56f878..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec/templates/script/spec_server +++ /dev/null @@ -1,116 +0,0 @@ -#!/usr/bin/env ruby -$LOAD_PATH.unshift File.dirname(__FILE__) + '/../vendor/plugins/rspec/lib' # For rspec installed as plugin -require 'rubygems' -require 'drb/drb' -require 'rbconfig' -require 'spec' -require 'optparse' - -# This is based on Florian Weber's TDDMate -module Spec - module Runner - class RailsSpecServer - def run(argv, stderr, stdout) - $stdout = stdout - $stderr = stderr - - base = ActiveRecord::Base - def base.clear_reloadable_connections! - active_connections.each do |name, conn| - if conn.requires_reloading? - conn.disconnect! - active_connections.delete(name) - end - end - end - - if ActionController.const_defined?(:Dispatcher) - dispatcher = ::ActionController::Dispatcher.new($stdout) - dispatcher.cleanup_application - elsif ::Dispatcher.respond_to?(:reset_application!) - ::Dispatcher.reset_application! - else - raise "Application reloading failed" - end - if Object.const_defined?(:Fixtures) && 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 "#{RAILS_ROOT}/db/schema.rb" # use db agnostic schema by default - ActiveRecord::Migrator.up('db/migrate') # use migrations - end - - ::Spec::Runner::CommandLine.run( - ::Spec::Runner::OptionParser.parse( - argv, - $stderr, - $stdout - ) - ) - end - - def in_memory_database? - ENV["RAILS_ENV"] == "test" and - ::ActiveRecord::Base.connection.class.to_s == "ActiveRecord::ConnectionAdapters::SQLite3Adapter" and - ::Rails::Configuration.new.database_configuration['test']['database'] == ':memory:' - end - end - end -end -puts "Loading Rails environment" - -ENV["RAILS_ENV"] = "test" -require File.expand_path(File.dirname(__FILE__) + "/../config/environment") -require 'dispatcher' - -def restart_test_server - puts "restarting" - config = ::Config::CONFIG - ruby = File::join(config['bindir'], config['ruby_install_name']) + config['EXEEXT'] - command_line = [ruby, $0, ARGV].flatten.join(' ') - exec(command_line) -end - -def daemonize(pid_file = nil) - return yield if $DEBUG - pid = Process.fork{ - Process.setsid - Dir.chdir(RAILS_ROOT) - trap("SIGINT"){ exit! 0 } - trap("SIGTERM"){ exit! 0 } - trap("SIGHUP"){ restart_test_server } - File.open("/dev/null"){|f| - STDERR.reopen f - STDIN.reopen f - STDOUT.reopen f - } - yield - } - puts "spec_server launched. (PID: %d)" % pid - File.open(pid_file,"w"){|f| f.puts pid } if pid_file - exit! 0 -end - -options = Hash.new -opts = OptionParser.new -opts.on("-d", "--daemon"){|v| options[:daemon] = true } -opts.on("-p", "--pid PIDFILE"){|v| options[:pid] = v } -opts.parse!(ARGV) - -puts "Ready" -exec_server = lambda { - trap("USR2") { restart_test_server } if Signal.list.has_key?("USR2") - DRb.start_service("druby://127.0.0.1:8989", Spec::Runner::RailsSpecServer.new) - DRb.thread.join -} - -if options[:daemon] - daemonize(options[:pid], &exec_server) -else - exec_server.call -end diff --git a/vendor/plugins/rspec-rails/generators/rspec/templates/spec.opts b/vendor/plugins/rspec-rails/generators/rspec/templates/spec.opts deleted file mode 100644 index 391705bf8..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec/templates/spec.opts +++ /dev/null @@ -1,4 +0,0 @@ ---colour ---format progress ---loadby mtime ---reverse diff --git a/vendor/plugins/rspec-rails/generators/rspec/templates/spec_helper.rb b/vendor/plugins/rspec-rails/generators/rspec/templates/spec_helper.rb deleted file mode 100644 index 938dd7b49..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec/templates/spec_helper.rb +++ /dev/null @@ -1,47 +0,0 @@ -# This file is copied to ~/spec when you run 'ruby script/generate rspec' -# from the project root directory. -ENV["RAILS_ENV"] = "test" -require File.expand_path(File.dirname(__FILE__) + "/../config/environment") -require 'spec' -require 'spec/rails' - -Spec::Runner.configure do |config| - # If you're not using ActiveRecord you should remove these - # lines, delete config/database.yml and disable :active_record - # in your config/boot.rb - config.use_transactional_fixtures = true - config.use_instantiated_fixtures = false - config.fixture_path = RAILS_ROOT + '/spec/fixtures/' - - # == Fixtures - # - # You can declare fixtures for each example_group like this: - # describe "...." do - # fixtures :table_a, :table_b - # - # Alternatively, if you prefer to declare them only once, you can - # do so right here. Just uncomment the next line and replace the fixture - # names with your fixtures. - # - # config.global_fixtures = :table_a, :table_b - # - # If you declare global fixtures, be aware that they will be declared - # for all of your examples, even those that don't use them. - # - # You can also declare which fixtures to use (for example fixtures for test/fixtures): - # - # config.fixture_path = RAILS_ROOT + '/spec/fixtures/' - # - # == Mock Framework - # - # RSpec uses it's own mocking framework by default. If you prefer to - # use mocha, flexmock or RR, uncomment the appropriate line: - # - # config.mock_with :mocha - # config.mock_with :flexmock - # config.mock_with :rr - # - # == Notes - # - # For more information take a look at Spec::Example::Configuration and Spec::Runner -end diff --git a/vendor/plugins/rspec-rails/generators/rspec/templates/stories_helper.rb b/vendor/plugins/rspec-rails/generators/rspec/templates/stories_helper.rb deleted file mode 100644 index da7a13a69..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec/templates/stories_helper.rb +++ /dev/null @@ -1,3 +0,0 @@ -ENV["RAILS_ENV"] = "test" -require File.expand_path(File.dirname(__FILE__) + "/../config/environment") -require 'spec/rails/story_adapter' \ No newline at end of file diff --git a/vendor/plugins/rspec-rails/generators/rspec_controller/USAGE b/vendor/plugins/rspec-rails/generators/rspec_controller/USAGE deleted file mode 100755 index 1546c325d..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec_controller/USAGE +++ /dev/null @@ -1,33 +0,0 @@ -Description: - The rspec_controller generator creates stub specs and files for a new - controller and its views. - - The generator takes a controller name and a list of views as arguments. - The controller name may be given in CamelCase or under_score and should - not be suffixed with 'Controller'. To create a controller within a - module, specify the controller name as 'module/controller'. - - The generator creates stubs for a controller (and spec), a view (and spec) - for each view in the argument list, plus a helper. - -Example: - ./script/generate rspec_controller dog bark fetch - ... - create spec/controllers/dog_controller_spec.rb - create app/controllers/dog_controller.rb - create app/helpers/dog_helper.rb - create spec/views/dog/bark_view_spec.rb - create app/views/dog/bark.rhtml - create spec/views/dog/fetch_view_spec.rb - create app/views/dog/fetch.rhtml - -Modules Example: - ./script/generate rspec_controller 'pets/dog' bark fetch - ... - create spec/controllers/pets/dog_controller_spec.rb - create app/controllers/pets/dog_controller.rb - create app/helpers/pets/dog_helper.rb - create spec/views/pets/dog/bark_view_spec.rb - create app/views/pets/dog/bark.rhtml - create spec/views/pets/dog/fetch_view_spec.rb - create app/views/pets/dog/fetch.rhtml diff --git a/vendor/plugins/rspec-rails/generators/rspec_controller/rspec_controller_generator.rb b/vendor/plugins/rspec-rails/generators/rspec_controller/rspec_controller_generator.rb deleted file mode 100755 index 933483054..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec_controller/rspec_controller_generator.rb +++ /dev/null @@ -1,49 +0,0 @@ -require 'rails_generator/generators/components/controller/controller_generator' - -class RspecControllerGenerator < ControllerGenerator - - def manifest - record do |m| - # Check for class naming collisions. - m.class_collisions class_path, "#{class_name}Controller", "#{class_name}Helper" - - # Controller, helper, views, and spec directories. - m.directory File.join('app/controllers', class_path) - m.directory File.join('app/helpers', class_path) - m.directory File.join('app/views', class_path, file_name) - m.directory File.join('spec/controllers', class_path) - m.directory File.join('spec/helpers', class_path) - m.directory File.join('spec/views', class_path, file_name) - - if Rails::VERSION::STRING < "2.0.0" - @default_file_extension = "rhtml" - else - @default_file_extension = "html.erb" - end - - # Controller spec, class, and helper. - m.template 'controller_spec.rb', - File.join('spec/controllers', class_path, "#{file_name}_controller_spec.rb") - - m.template 'helper_spec.rb', - File.join('spec/helpers', class_path, "#{file_name}_helper_spec.rb") - - m.template 'controller:controller.rb', - File.join('app/controllers', class_path, "#{file_name}_controller.rb") - - m.template 'controller:helper.rb', - File.join('app/helpers', class_path, "#{file_name}_helper.rb") - - # Spec and view template for each action. - actions.each do |action| - m.template 'view_spec.rb', - File.join('spec/views', class_path, file_name, "#{action}.#{@default_file_extension}_spec.rb"), - :assigns => { :action => action, :model => file_name } - path = File.join('app/views', class_path, file_name, "#{action}.#{@default_file_extension}") - m.template "controller:view.#{@default_file_extension}", - path, - :assigns => { :action => action, :path => path } - end - end - end -end diff --git a/vendor/plugins/rspec-rails/generators/rspec_controller/templates/controller_spec.rb b/vendor/plugins/rspec-rails/generators/rspec_controller/templates/controller_spec.rb deleted file mode 100755 index cb25fe777..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec_controller/templates/controller_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../spec_helper') - -describe <%= class_name %>Controller do - -<% if actions.empty? -%> - #Delete this example and add some real ones -<% else -%> - #Delete these examples and add some real ones -<% end -%> - it "should use <%= class_name %>Controller" do - controller.should be_an_instance_of(<%= class_name %>Controller) - end - -<% unless actions.empty? -%> -<% for action in actions -%> - - describe "GET '<%= action %>'" do - it "should be successful" do - get '<%= action %>' - response.should be_success - end - end -<% end -%> -<% end -%> -end diff --git a/vendor/plugins/rspec-rails/generators/rspec_controller/templates/helper_spec.rb b/vendor/plugins/rspec-rails/generators/rspec_controller/templates/helper_spec.rb deleted file mode 100644 index 11c650480..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec_controller/templates/helper_spec.rb +++ /dev/null @@ -1,11 +0,0 @@ -require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../spec_helper') - -describe <%= class_name %>Helper do - - #Delete this example and add some real ones or delete this file - it "should be included in the object returned by #helper" do - included_modules = (class << helper; self; end).send :included_modules - included_modules.should include(<%= class_name %>Helper) - end - -end diff --git a/vendor/plugins/rspec-rails/generators/rspec_controller/templates/view_spec.rb b/vendor/plugins/rspec-rails/generators/rspec_controller/templates/view_spec.rb deleted file mode 100644 index d550d6a1b..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec_controller/templates/view_spec.rb +++ /dev/null @@ -1,12 +0,0 @@ -require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../../spec_helper') - -describe "/<%= class_name.underscore %>/<%= action %>" do - before(:each) do - render '<%= class_name.underscore %>/<%= action %>' - end - - #Delete this example and add some real ones or delete this file - it "should tell you where to find the file" do - response.should have_tag('p', %r[Find me in app/views/<%= class_name.underscore %>/<%= action %>]) - end -end diff --git a/vendor/plugins/rspec-rails/generators/rspec_default_values.rb b/vendor/plugins/rspec-rails/generators/rspec_default_values.rb deleted file mode 100644 index 9e18542f9..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec_default_values.rb +++ /dev/null @@ -1,19 +0,0 @@ -module Rails - module Generator - class GeneratedAttribute - def default_value - @default_value ||= case type - when :int, :integer then "\"1\"" - when :float then "\"1.5\"" - when :decimal then "\"9.99\"" - when :datetime, :timestamp, :time then "Time.now" - when :date then "Date.today" - when :string, :text then "\"value for #{@name}\"" - when :boolean then "false" - else - "" - end - end - end - end -end \ No newline at end of file diff --git a/vendor/plugins/rspec-rails/generators/rspec_model/USAGE b/vendor/plugins/rspec-rails/generators/rspec_model/USAGE deleted file mode 100755 index a7b781414..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec_model/USAGE +++ /dev/null @@ -1,18 +0,0 @@ -Description: - The rspec_model generator creates stubs for a new model. - - The generator takes a model name as its argument. The model name may be - given in CamelCase or under_score and should not be suffixed with 'Model'. - - The generator creates a model class in app/models, an RSpec spec in - spec/models, database fixtures in spec/fixtures/plural_name.yml, and a migration - in db/migrate. - -Example: - ./script/generate rspec_model Account - - This will create an Account model: - Model: app/models/account.rb - Spec: spec/models/account_spec.rb - Fixtures: spec/fixtures/accounts.yml - Migration: db/migrate/XXX_add_accounts.rb diff --git a/vendor/plugins/rspec-rails/generators/rspec_model/rspec_model_generator.rb b/vendor/plugins/rspec-rails/generators/rspec_model/rspec_model_generator.rb deleted file mode 100755 index 66e873e31..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec_model/rspec_model_generator.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'rails_generator/generators/components/model/model_generator' -require File.dirname(__FILE__) + '/../rspec_default_values' - -class RspecModelGenerator < ModelGenerator - - def manifest - - record do |m| - # Check for class naming collisions. - m.class_collisions class_path, class_name - - # Model, spec, and fixture directories. - m.directory File.join('app/models', class_path) - m.directory File.join('spec/models', class_path) - unless options[:skip_fixture] - m.directory File.join('spec/fixtures', class_path) - end - - # Model class, spec and fixtures. - m.template 'model:model.rb', File.join('app/models', class_path, "#{file_name}.rb") - m.template 'model_spec.rb', File.join('spec/models', class_path, "#{file_name}_spec.rb") - unless options[:skip_fixture] - m.template 'model:fixtures.yml', File.join('spec/fixtures', "#{table_name}.yml") - end - - unless options[:skip_migration] - m.migration_template 'model:migration.rb', 'db/migrate', :assigns => { - :migration_name => "Create#{class_name.pluralize.gsub(/::/, '')}" - }, :migration_file_name => "create_#{file_path.gsub(/\//, '_').pluralize}" - end - - end - end - -end diff --git a/vendor/plugins/rspec-rails/generators/rspec_model/templates/model_spec.rb b/vendor/plugins/rspec-rails/generators/rspec_model/templates/model_spec.rb deleted file mode 100755 index 5c0fe6372..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec_model/templates/model_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../spec_helper') - -describe <%= class_name %> do - before(:each) do - @valid_attributes = { -<% attributes.each_with_index do |attribute, attribute_index| -%> - :<%= attribute.name %> => <%= attribute.default_value %><%= attribute_index == attributes.length - 1 ? '' : ','%> -<% end -%> - } - end - - it "should create a new instance given valid attributes" do - <%= class_name %>.create!(@valid_attributes) - end -end diff --git a/vendor/plugins/rspec-rails/generators/rspec_scaffold/rspec_scaffold_generator.rb b/vendor/plugins/rspec-rails/generators/rspec_scaffold/rspec_scaffold_generator.rb deleted file mode 100644 index 628db3fbb..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec_scaffold/rspec_scaffold_generator.rb +++ /dev/null @@ -1,154 +0,0 @@ -require File.dirname(__FILE__) + '/../rspec_default_values' - -class RspecScaffoldGenerator < Rails::Generator::NamedBase - default_options :skip_migration => false - - attr_reader :controller_name, - :controller_class_path, - :controller_file_path, - :controller_class_nesting, - :controller_class_nesting_depth, - :controller_class_name, - :controller_singular_name, - :controller_plural_name, - :resource_edit_path, - :default_file_extension - alias_method :controller_file_name, :controller_singular_name - alias_method :controller_table_name, :controller_plural_name - - def initialize(runtime_args, runtime_options = {}) - super - - @controller_name = @name.pluralize - - base_name, @controller_class_path, @controller_file_path, @controller_class_nesting, @controller_class_nesting_depth = extract_modules(@controller_name) - @controller_class_name_without_nesting, @controller_singular_name, @controller_plural_name = inflect_names(base_name) - - if @controller_class_nesting.empty? - @controller_class_name = @controller_class_name_without_nesting - else - @controller_class_name = "#{@controller_class_nesting}::#{@controller_class_name_without_nesting}" - end - - if Rails::VERSION::STRING < "2.0.0" - @resource_generator = "scaffold_resource" - @default_file_extension = "rhtml" - else - @resource_generator = "scaffold" - @default_file_extension = "html.erb" - end - - if ActionController::Base.respond_to?(:resource_action_separator) - @resource_edit_path = "/edit" - else - @resource_edit_path = ";edit" - end - end - - def manifest - record do |m| - - # Check for class naming collisions. - m.class_collisions(controller_class_path, "#{controller_class_name}Controller", "#{controller_class_name}Helper") - m.class_collisions(class_path, "#{class_name}") - - # Controller, helper, views, and spec directories. - m.directory(File.join('app/models', class_path)) - m.directory(File.join('app/controllers', controller_class_path)) - m.directory(File.join('app/helpers', controller_class_path)) - m.directory(File.join('app/views', controller_class_path, controller_file_name)) - m.directory(File.join('spec/controllers', controller_class_path)) - m.directory(File.join('spec/models', class_path)) - m.directory(File.join('spec/helpers', class_path)) - m.directory File.join('spec/fixtures', class_path) - m.directory File.join('spec/views', controller_class_path, controller_file_name) - - # Controller spec, class, and helper. - m.template 'rspec_scaffold:routing_spec.rb', - File.join('spec/controllers', controller_class_path, "#{controller_file_name}_routing_spec.rb") - - m.template 'rspec_scaffold:controller_spec.rb', - File.join('spec/controllers', controller_class_path, "#{controller_file_name}_controller_spec.rb") - - m.template "#{@resource_generator}:controller.rb", - File.join('app/controllers', controller_class_path, "#{controller_file_name}_controller.rb") - - m.template 'rspec_scaffold:helper_spec.rb', - File.join('spec/helpers', class_path, "#{controller_file_name}_helper_spec.rb") - - m.template "#{@resource_generator}:helper.rb", - File.join('app/helpers', controller_class_path, "#{controller_file_name}_helper.rb") - - for action in scaffold_views - m.template( - "#{@resource_generator}:view_#{action}.#{@default_file_extension}", - File.join('app/views', controller_class_path, controller_file_name, "#{action}.#{default_file_extension}") - ) - end - - # Model class, unit test, and fixtures. - m.template 'model:model.rb', File.join('app/models', class_path, "#{file_name}.rb") - m.template 'model:fixtures.yml', File.join('spec/fixtures', class_path, "#{table_name}.yml") - m.template 'rspec_model:model_spec.rb', File.join('spec/models', class_path, "#{file_name}_spec.rb") - - # View specs - m.template "rspec_scaffold:edit_erb_spec.rb", - File.join('spec/views', controller_class_path, controller_file_name, "edit.#{default_file_extension}_spec.rb") - m.template "rspec_scaffold:index_erb_spec.rb", - File.join('spec/views', controller_class_path, controller_file_name, "index.#{default_file_extension}_spec.rb") - m.template "rspec_scaffold:new_erb_spec.rb", - File.join('spec/views', controller_class_path, controller_file_name, "new.#{default_file_extension}_spec.rb") - m.template "rspec_scaffold:show_erb_spec.rb", - File.join('spec/views', controller_class_path, controller_file_name, "show.#{default_file_extension}_spec.rb") - - unless options[:skip_migration] - m.migration_template( - 'model:migration.rb', 'db/migrate', - :assigns => { - :migration_name => "Create#{class_name.pluralize.gsub(/::/, '')}", - :attributes => attributes - }, - :migration_file_name => "create_#{file_path.gsub(/\//, '_').pluralize}" - ) - end - - m.route_resources controller_file_name - - end - end - - protected - # Override with your own usage banner. - def banner - "Usage: #{$0} rspec_scaffold ModelName [field:type field:type]" - end - - def add_options!(opt) - opt.separator '' - opt.separator 'Options:' - opt.on("--skip-migration", - "Don't generate a migration file for this model") { |v| options[:skip_migration] = v } - end - - def scaffold_views - %w[ index show new edit ] - end - - def model_name - class_name.demodulize - end -end - -module Rails - module Generator - class GeneratedAttribute - def input_type - @input_type ||= case type - when :text then "textarea" - else - "input" - end - end - end - end -end diff --git a/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/controller_spec.rb b/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/controller_spec.rb deleted file mode 100755 index 3ebef1ec4..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/controller_spec.rb +++ /dev/null @@ -1,173 +0,0 @@ -require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../spec_helper') - -describe <%= controller_class_name %>Controller do - - def mock_<%= file_name %>(stubs={}) - @mock_<%= file_name %> ||= mock_model(<%= class_name %>, stubs) - end - - describe "responding to GET index" do - - it "should expose all <%= table_name.pluralize %> as @<%= table_name.pluralize %>" do - <%= class_name %>.should_receive(:find).with(:all).and_return([mock_<%= file_name %>]) - get :index - assigns[:<%= table_name %>].should == [mock_<%= file_name %>] - end - - describe "with mime type of xml" do - - it "should render all <%= table_name.pluralize %> as xml" do - request.env["HTTP_ACCEPT"] = "application/xml" - <%= class_name %>.should_receive(:find).with(:all).and_return(<%= file_name.pluralize %> = mock("Array of <%= class_name.pluralize %>")) - <%= file_name.pluralize %>.should_receive(:to_xml).and_return("generated XML") - get :index - response.body.should == "generated XML" - end - - end - - end - - describe "responding to GET show" do - - it "should expose the requested <%= file_name %> as @<%= file_name %>" do - <%= class_name %>.should_receive(:find).with("37").and_return(mock_<%= file_name %>) - get :show, :id => "37" - assigns[:<%= file_name %>].should equal(mock_<%= file_name %>) - end - - describe "with mime type of xml" do - - it "should render the requested <%= file_name %> as xml" do - request.env["HTTP_ACCEPT"] = "application/xml" - <%= class_name %>.should_receive(:find).with("37").and_return(mock_<%= file_name %>) - mock_<%= file_name %>.should_receive(:to_xml).and_return("generated XML") - get :show, :id => "37" - response.body.should == "generated XML" - end - - end - - end - - describe "responding to GET new" do - - it "should expose a new <%= file_name %> as @<%= file_name %>" do - <%= class_name %>.should_receive(:new).and_return(mock_<%= file_name %>) - get :new - assigns[:<%= file_name %>].should equal(mock_<%= file_name %>) - end - - end - - describe "responding to GET edit" do - - it "should expose the requested <%= file_name %> as @<%= file_name %>" do - <%= class_name %>.should_receive(:find).with("37").and_return(mock_<%= file_name %>) - get :edit, :id => "37" - assigns[:<%= file_name %>].should equal(mock_<%= file_name %>) - end - - end - - describe "responding to POST create" do - - describe "with valid params" do - - it "should expose a newly created <%= file_name %> as @<%= file_name %>" do - <%= class_name %>.should_receive(:new).with({'these' => 'params'}).and_return(mock_<%= file_name %>(:save => true)) - post :create, :<%= file_name %> => {:these => 'params'} - assigns(:<%= file_name %>).should equal(mock_<%= file_name %>) - end - - it "should redirect to the created <%= file_name %>" do - <%= class_name %>.stub!(:new).and_return(mock_<%= file_name %>(:save => true)) - post :create, :<%= file_name %> => {} - response.should redirect_to(<%= table_name.singularize %>_url(mock_<%= file_name %>)) - end - - end - - describe "with invalid params" do - - it "should expose a newly created but unsaved <%= file_name %> as @<%= file_name %>" do - <%= class_name %>.stub!(:new).with({'these' => 'params'}).and_return(mock_<%= file_name %>(:save => false)) - post :create, :<%= file_name %> => {:these => 'params'} - assigns(:<%= file_name %>).should equal(mock_<%= file_name %>) - end - - it "should re-render the 'new' template" do - <%= class_name %>.stub!(:new).and_return(mock_<%= file_name %>(:save => false)) - post :create, :<%= file_name %> => {} - response.should render_template('new') - end - - end - - end - - describe "responding to PUT udpate" do - - describe "with valid params" do - - it "should update the requested <%= file_name %>" do - <%= class_name %>.should_receive(:find).with("37").and_return(mock_<%= file_name %>) - mock_<%= file_name %>.should_receive(:update_attributes).with({'these' => 'params'}) - put :update, :id => "37", :<%= file_name %> => {:these => 'params'} - end - - it "should expose the requested <%= file_name %> as @<%= file_name %>" do - <%= class_name %>.stub!(:find).and_return(mock_<%= file_name %>(:update_attributes => true)) - put :update, :id => "1" - assigns(:<%= file_name %>).should equal(mock_<%= file_name %>) - end - - it "should redirect to the <%= file_name %>" do - <%= class_name %>.stub!(:find).and_return(mock_<%= file_name %>(:update_attributes => true)) - put :update, :id => "1" - response.should redirect_to(<%= table_name.singularize %>_url(mock_<%= file_name %>)) - end - - end - - describe "with invalid params" do - - it "should update the requested <%= file_name %>" do - <%= class_name %>.should_receive(:find).with("37").and_return(mock_<%= file_name %>) - mock_<%= file_name %>.should_receive(:update_attributes).with({'these' => 'params'}) - put :update, :id => "37", :<%= file_name %> => {:these => 'params'} - end - - it "should expose the <%= file_name %> as @<%= file_name %>" do - <%= class_name %>.stub!(:find).and_return(mock_<%= file_name %>(:update_attributes => false)) - put :update, :id => "1" - assigns(:<%= file_name %>).should equal(mock_<%= file_name %>) - end - - it "should re-render the 'edit' template" do - <%= class_name %>.stub!(:find).and_return(mock_<%= file_name %>(:update_attributes => false)) - put :update, :id => "1" - response.should render_template('edit') - end - - end - - end - - describe "responding to DELETE destroy" do - - it "should destroy the requested <%= file_name %>" do - <%= class_name %>.should_receive(:find).with("37").and_return(mock_<%= file_name %>) - mock_<%= file_name %>.should_receive(:destroy) - delete :destroy, :id => "37" - end - - it "should redirect to the <%= table_name %> list" do - <%= class_name %>.stub!(:find).and_return(mock_<%= file_name %>(:destroy => true)) - delete :destroy, :id => "1" - response.should redirect_to(<%= table_name %>_url) - end - - end - -end diff --git a/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/edit_erb_spec.rb b/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/edit_erb_spec.rb deleted file mode 100644 index 267325a7a..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/edit_erb_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../../spec_helper') - -describe "/<%= table_name %>/edit.<%= default_file_extension %>" do - include <%= controller_class_name %>Helper - - before(:each) do - assigns[:<%= file_name %>] = @<%= file_name %> = stub_model(<%= class_name %>, - :new_record? => false<%= attributes.empty? ? '' : ',' %> -<% attributes.each_with_index do |attribute, attribute_index| -%><% unless attribute.name =~ /_id/ || [:datetime, :timestamp, :time, :date].index(attribute.type) -%> - :<%= attribute.name %> => <%= attribute.default_value %><%= attribute_index == attributes.length - 1 ? '' : ','%> -<% end -%><% end -%> - ) - end - - it "should render edit form" do - render "/<%= table_name %>/edit.<%= default_file_extension %>" - - response.should have_tag("form[action=#{<%= file_name %>_path(@<%= file_name %>)}][method=post]") do -<% for attribute in attributes -%><% unless attribute.name =~ /_id/ || [:datetime, :timestamp, :time, :date].index(attribute.type) -%> - with_tag('<%= attribute.input_type -%>#<%= file_name %>_<%= attribute.name %>[name=?]', "<%= file_name %>[<%= attribute.name %>]") -<% end -%><% end -%> - end - end -end - - diff --git a/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/helper_spec.rb b/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/helper_spec.rb deleted file mode 100644 index 900b027aa..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/helper_spec.rb +++ /dev/null @@ -1,11 +0,0 @@ -require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../spec_helper') - -describe <%= controller_class_name %>Helper do - - #Delete this example and add some real ones or delete this file - it "should be included in the object returned by #helper" do - included_modules = (class << helper; self; end).send :included_modules - included_modules.should include(<%= controller_class_name %>Helper) - end - -end diff --git a/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/index_erb_spec.rb b/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/index_erb_spec.rb deleted file mode 100644 index 2435342be..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/index_erb_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../../spec_helper') - -describe "/<%= table_name %>/index.<%= default_file_extension %>" do - include <%= controller_class_name %>Helper - - before(:each) do - assigns[:<%= table_name %>] = [ -<% [1,2].each_with_index do |id, model_index| -%> - stub_model(<%= class_name %><%= attributes.empty? ? (model_index == 1 ? ')' : '),') : ',' %> -<% attributes.each_with_index do |attribute, attribute_index| -%><% unless attribute.name =~ /_id/ || [:datetime, :timestamp, :time, :date].index(attribute.type) -%> - :<%= attribute.name %> => <%= attribute.default_value %><%= attribute_index == attributes.length - 1 ? '' : ','%> -<% end -%><% end -%> -<% if !attributes.empty? -%> - <%= model_index == 1 ? ')' : '),' %> -<% end -%> -<% end -%> - ] - end - - it "should render list of <%= table_name %>" do - render "/<%= table_name %>/index.<%= default_file_extension %>" -<% for attribute in attributes -%><% unless attribute.name =~ /_id/ || [:datetime, :timestamp, :time, :date].index(attribute.type) -%> - response.should have_tag("tr>td", <%= attribute.default_value %>, 2) -<% end -%><% end -%> - end -end - diff --git a/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/new_erb_spec.rb b/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/new_erb_spec.rb deleted file mode 100644 index 92690444d..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/new_erb_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../../spec_helper') - -describe "/<%= table_name %>/new.<%= default_file_extension %>" do - include <%= controller_class_name %>Helper - - before(:each) do - assigns[:<%= file_name %>] = stub_model(<%= class_name %>, - :new_record? => true<%= attributes.empty? ? '' : ',' %> -<% attributes.each_with_index do |attribute, attribute_index| -%><% unless attribute.name =~ /_id/ || [:datetime, :timestamp, :time, :date].index(attribute.type) -%> - :<%= attribute.name %> => <%= attribute.default_value %><%= attribute_index == attributes.length - 1 ? '' : ','%> -<% end -%><% end -%> - ) - end - - it "should render new form" do - render "/<%= table_name %>/new.<%= default_file_extension %>" - - response.should have_tag("form[action=?][method=post]", <%= table_name %>_path) do -<% for attribute in attributes -%><% unless attribute.name =~ /_id/ || [:datetime, :timestamp, :time, :date].index(attribute.type) -%> - with_tag("<%= attribute.input_type -%>#<%= file_name %>_<%= attribute.name %>[name=?]", "<%= file_name %>[<%= attribute.name %>]") -<% end -%><% end -%> - end - end -end - - diff --git a/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/routing_spec.rb b/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/routing_spec.rb deleted file mode 100644 index 78d7149e1..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/routing_spec.rb +++ /dev/null @@ -1,59 +0,0 @@ -require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../spec_helper') - -describe <%= controller_class_name %>Controller do - describe "route generation" do - it "should map #index" do - route_for(:controller => "<%= table_name %>", :action => "index").should == "/<%= table_name %>" - end - - it "should map #new" do - route_for(:controller => "<%= table_name %>", :action => "new").should == "/<%= table_name %>/new" - end - - it "should map #show" do - route_for(:controller => "<%= table_name %>", :action => "show", :id => 1).should == "/<%= table_name %>/1" - end - - it "should map #edit" do - route_for(:controller => "<%= table_name %>", :action => "edit", :id => 1).should == "/<%= table_name %>/1<%= resource_edit_path %>" - end - - it "should map #update" do - route_for(:controller => "<%= table_name %>", :action => "update", :id => 1).should == "/<%= table_name %>/1" - end - - it "should map #destroy" do - route_for(:controller => "<%= table_name %>", :action => "destroy", :id => 1).should == "/<%= table_name %>/1" - end - end - - describe "route recognition" do - it "should generate params for #index" do - params_from(:get, "/<%= table_name %>").should == {:controller => "<%= table_name %>", :action => "index"} - end - - it "should generate params for #new" do - params_from(:get, "/<%= table_name %>/new").should == {:controller => "<%= table_name %>", :action => "new"} - end - - it "should generate params for #create" do - params_from(:post, "/<%= table_name %>").should == {:controller => "<%= table_name %>", :action => "create"} - end - - it "should generate params for #show" do - params_from(:get, "/<%= table_name %>/1").should == {:controller => "<%= table_name %>", :action => "show", :id => "1"} - end - - it "should generate params for #edit" do - params_from(:get, "/<%= table_name %>/1<%= resource_edit_path %>").should == {:controller => "<%= table_name %>", :action => "edit", :id => "1"} - end - - it "should generate params for #update" do - params_from(:put, "/<%= table_name %>/1").should == {:controller => "<%= table_name %>", :action => "update", :id => "1"} - end - - it "should generate params for #destroy" do - params_from(:delete, "/<%= table_name %>/1").should == {:controller => "<%= table_name %>", :action => "destroy", :id => "1"} - end - end -end diff --git a/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/show_erb_spec.rb b/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/show_erb_spec.rb deleted file mode 100644 index 309d30da1..000000000 --- a/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/show_erb_spec.rb +++ /dev/null @@ -1,23 +0,0 @@ -require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../../spec_helper') - -describe "/<%= table_name %>/show.<%= default_file_extension %>" do - include <%= controller_class_name %>Helper - - before(:each) do - assigns[:<%= file_name %>] = @<%= file_name %> = stub_model(<%= class_name %><%= attributes.empty? ? ')' : ',' %> -<% attributes.each_with_index do |attribute, attribute_index| -%><% unless attribute.name =~ /_id/ || [:datetime, :timestamp, :time, :date].index(attribute.type) -%> - :<%= attribute.name %> => <%= attribute.default_value %><%= attribute_index == attributes.length - 1 ? '' : ','%> -<% end -%><% end -%> -<% if !attributes.empty? -%> - ) -<% end -%> - end - - it "should render attributes in
" do
- render "/<%= table_name %>/show.<%= default_file_extension %>"
-<% for attribute in attributes -%><% unless attribute.name =~ /_id/ || [:datetime, :timestamp, :time, :date].index(attribute.type) -%>
- response.should have_text(/<%= Regexp.escape(attribute.default_value)[1..-2]%>/)
-<% end -%><% end -%>
- end
-end
-
diff --git a/vendor/plugins/rspec-rails/init.rb b/vendor/plugins/rspec-rails/init.rb
deleted file mode 100644
index 6262f0368..000000000
--- a/vendor/plugins/rspec-rails/init.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# Placeholder to satisfy Rails.
-#
-# Do NOT add any require statements to this file. Doing
-# so will cause Rails to load this plugin all of the time.
-#
-# Running 'ruby script/generate rspec' will
-# generate spec/spec_helper.rb, which includes the necessary
-# require statements and configuration. This file should
-# be required by all of your spec files.
\ No newline at end of file
diff --git a/vendor/plugins/rspec-rails/lib/autotest/discover.rb b/vendor/plugins/rspec-rails/lib/autotest/discover.rb
deleted file mode 100644
index 8e6968e20..000000000
--- a/vendor/plugins/rspec-rails/lib/autotest/discover.rb
+++ /dev/null
@@ -1 +0,0 @@
-# This needs to be here for >= ZenTest-3.9.0 to add this directory to the load path.
\ No newline at end of file
diff --git a/vendor/plugins/rspec-rails/lib/autotest/rails_rspec.rb b/vendor/plugins/rspec-rails/lib/autotest/rails_rspec.rb
deleted file mode 100644
index 3a37a477e..000000000
--- a/vendor/plugins/rspec-rails/lib/autotest/rails_rspec.rb
+++ /dev/null
@@ -1,76 +0,0 @@
-# (c) Copyright 2006 Nick Sieger \n"This is not a big problem," he said.\n Guitar Guitar Bass Drums foo bar a paragraph a paragraph a paragraph a paragraph a paragraphpath
can include the controller path or not. It
- # can also include an optional extension (no extension assumes .rhtml).
- #
- # Note that partials must be spelled with the preceding underscore.
- #
- # == Examples
- #
- # response.should render_template('list')
- # response.should render_template('same_controller/list')
- # response.should render_template('other_controller/list')
- #
- # #rjs
- # response.should render_template('list.rjs')
- # response.should render_template('same_controller/list.rjs')
- # response.should render_template('other_controller/list.rjs')
- #
- # #partials
- # response.should render_template('_a_partial')
- # response.should render_template('same_controller/_a_partial')
- # response.should render_template('other_controller/_a_partial')
- def render_template(path)
- RenderTemplate.new(path.to_s, @controller)
- end
-
- end
- end
-end
diff --git a/vendor/plugins/rspec-rails/lib/spec/rails/mocks.rb b/vendor/plugins/rspec-rails/lib/spec/rails/mocks.rb
deleted file mode 100644
index e8a7fca33..000000000
--- a/vendor/plugins/rspec-rails/lib/spec/rails/mocks.rb
+++ /dev/null
@@ -1,132 +0,0 @@
-module Spec
- module Rails
-
- class IllegalDataAccessException < StandardError; end
-
- module Mocks
-
- # Creates a mock object instance for a +model_class+ with common
- # methods stubbed out. Additional methods may be easily stubbed (via
- # add_stubs) if +stubs+ is passed.
- def mock_model(model_class, options_and_stubs = {})
- id = options_and_stubs[:id] || next_id
- options_and_stubs = options_and_stubs.reverse_merge({
- :id => id,
- :to_param => id.to_s,
- :new_record? => false,
- :errors => stub("errors", :count => 0)
- })
- m = mock("#{model_class.name}_#{id}", options_and_stubs)
- m.send(:__mock_proxy).instance_eval <<-CODE
- def @target.as_new_record
- self.stub!(:id).and_return nil
- self.stub!(:to_param).and_return nil
- self.stub!(:new_record?).and_return true
- self
- end
- def @target.is_a?(other)
- #{model_class}.ancestors.include?(other)
- end
- def @target.kind_of?(other)
- #{model_class}.ancestors.include?(other)
- end
- def @target.instance_of?(other)
- other == #{model_class}
- end
- def @target.class
- #{model_class}
- end
- CODE
- yield m if block_given?
- m
- end
-
- module ModelStubber
- def connection
- raise Spec::Rails::IllegalDataAccessException.new("stubbed models are not allowed to access the database")
- end
- def new_record?
- id.nil?
- end
- def as_new_record
- self.id = nil
- self
- end
- end
-
- # :call-seq:
- # stub_model(Model)
- # stub_model(Model).as_new_record
- # stub_model(Model, hash_of_stubs)
- # stub_model(Model, instance_variable_name, hash_of_stubs)
- #
- # Creates an instance of +Model+ that is prohibited from accessing the
- # database*. For each key in +hash_of_stubs+, if the model has a
- # matching attribute (determined by asking it) are simply assigned the
- # submitted values. If the model does not have a matching attribute, the
- # key/value pair is assigned as a stub return value using RSpec's
- # mocking/stubbing framework.
- #
- # new_record? is overridden to return the result of id.nil?
- # This means that by default new_record? will return false. If you want
- # the object to behave as a new record, sending it +as_new_record+ will
- # set the id to nil. You can also explicitly set :id => nil, in which
- # case new_record? will return true, but using +as_new_record+ makes the
- # example a bit more descriptive.
- #
- # While you can use stub_model in any example (model, view, controller,
- # helper), it is especially useful in view examples, which are
- # inherently more state-based than interaction-based.
- #
- # == Database Independence
- #
- # +stub_model+ does not make your examples entirely
- # database-independent. It does not stop the model class itself from
- # loading up its columns from the database. It just prevents data access
- # from the object itself. To completely decouple from the database, take
- # a look at libraries like unit_record or NullDB.
- #
- # == Examples
- #
- # stub_model(Person)
- # stub_model(Person).as_new_record
- # stub_model(Person, :id => 37)
- # stub_model(Person) do |person|
- # person.first_name = "David"
- # end
- def stub_model(model_class, stubs={})
- stubs = {:id => next_id}.merge(stubs)
- returning model_class.new do |model|
- model.id = stubs.delete(:id)
- model.extend ModelStubber
- stubs.each do |k,v|
- if model.has_attribute?(k)
- model[k] = stubs.delete(k)
- end
- end
- add_stubs(model, stubs)
- yield model if block_given?
- end
- end
-
- #--
- # TODO - Shouldn't this just be an extension of stub! ??
- # - object.stub!(:method => return_value, :method2 => return_value2, :etc => etc)
- #++
- # Stubs methods on +object+ (if +object+ is a symbol or string a new mock
- # with that name will be created). +stubs+ is a Hash of +method=>value+
- def add_stubs(object, stubs = {}) #:nodoc:
- m = [String, Symbol].index(object.class) ? mock(object.to_s) : object
- stubs.each {|k,v| m.stub!(k).and_return(v)}
- m
- end
-
- private
- @@model_id = 1000
- def next_id
- @@model_id += 1
- end
-
- end
- end
-end
diff --git a/vendor/plugins/rspec-rails/lib/spec/rails/story_adapter.rb b/vendor/plugins/rspec-rails/lib/spec/rails/story_adapter.rb
deleted file mode 100644
index ae5fca903..000000000
--- a/vendor/plugins/rspec-rails/lib/spec/rails/story_adapter.rb
+++ /dev/null
@@ -1,79 +0,0 @@
-# WARNING - THIS IS PURELY EXPERIMENTAL AT THIS POINT
-# Courtesy of Brian Takita and Yurii Rashkovskii
-
-$:.unshift File.join(File.dirname(__FILE__), *%w[.. .. .. .. rspec lib])
-if defined?(ActiveRecord::Base)
- require 'test_help'
-else
- require 'action_controller/test_process'
- require 'action_controller/integration'
-end
-require 'test/unit/testresult'
-require 'spec'
-require 'spec/rails'
-
-Test::Unit.run = true
-
-ActionController::Integration::Session.send(:include, Spec::Matchers)
-ActionController::Integration::Session.send(:include, Spec::Rails::Matchers)
-
-class RailsStory < ActionController::IntegrationTest
- if defined?(ActiveRecord::Base)
- self.use_transactional_fixtures = true
- else
- def self.fixture_table_names; []; end # Workaround for projects that don't use ActiveRecord
- end
-
- def initialize #:nodoc:
- # TODO - eliminate this hack, which is here to stop
- # Rails Stories from dumping the example summary.
- Spec::Runner::Options.class_eval do
- def examples_should_be_run?
- false
- end
- end
- @_result = Test::Unit::TestResult.new
- end
-end
-
-class ActiveRecordSafetyListener
- include Singleton
- def scenario_started(*args)
- if defined?(ActiveRecord::Base)
- if ActiveRecord::Base.connection.respond_to?(:increment_open_transactions)
- ActiveRecord::Base.connection.increment_open_transactions
- else
- ActiveRecord::Base.send :increment_open_transactions
- end
- end
- ActiveRecord::Base.connection.begin_db_transaction
- end
-
- def scenario_succeeded(*args)
- if defined?(ActiveRecord::Base)
- ActiveRecord::Base.connection.rollback_db_transaction
- if ActiveRecord::Base.connection.respond_to?(:decrement_open_transactions)
- ActiveRecord::Base.connection.decrement_open_transactions
- else
- ActiveRecord::Base.send :decrement_open_transactions
- end
- end
- end
- alias :scenario_pending :scenario_succeeded
- alias :scenario_failed :scenario_succeeded
-end
-
-class Spec::Story::Runner::ScenarioRunner
- def initialize
- @listeners = [ActiveRecordSafetyListener.instance]
- end
-end
-
-class Spec::Story::GivenScenario
- def perform(instance, name = nil)
- scenario = Spec::Story::Runner::StoryRunner.scenario_from_current_story @name
- runner = Spec::Story::Runner::ScenarioRunner.new
- runner.instance_variable_set(:@listeners,[])
- runner.run(scenario, instance)
- end
-end
diff --git a/vendor/plugins/rspec-rails/lib/spec/rails/version.rb b/vendor/plugins/rspec-rails/lib/spec/rails/version.rb
deleted file mode 100644
index 41f0a8ec5..000000000
--- a/vendor/plugins/rspec-rails/lib/spec/rails/version.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-module Spec
- module Rails
- module VERSION #:nodoc:
- unless defined? MAJOR
- MAJOR = 1
- MINOR = 1
- TINY = 11
-
- STRING = [MAJOR, MINOR, TINY].join('.')
-
- SUMMARY = "rspec-rails #{STRING}"
- end
- end
- end
-end
\ No newline at end of file
diff --git a/vendor/plugins/rspec-rails/rspec-rails.gemspec b/vendor/plugins/rspec-rails/rspec-rails.gemspec
deleted file mode 100644
index 02b07d488..000000000
--- a/vendor/plugins/rspec-rails/rspec-rails.gemspec
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- encoding: utf-8 -*-
-
-Gem::Specification.new do |s|
- s.name = %q{rspec-rails}
- s.version = "1.1.11"
-
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["RSpec Development Team"]
- s.date = %q{2008-10-24}
- s.description = %q{Behaviour Driven Development for Ruby on Rails.}
- s.email = ["rspec-devel@rubyforge.org"]
- s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "README.txt", "generators/rspec/templates/previous_failures.txt"]
- s.files = ["History.txt", "License.txt", "Manifest.txt", "README.txt", "Rakefile", "UPGRADE", "generators/rspec/CHANGES", "generators/rspec/rspec_generator.rb", "generators/rspec/templates/all_stories.rb", "generators/rspec/templates/previous_failures.txt", "generators/rspec/templates/rcov.opts", "generators/rspec/templates/rspec.rake", "generators/rspec/templates/script/autospec", "generators/rspec/templates/script/spec", "generators/rspec/templates/script/spec_server", "generators/rspec/templates/spec.opts", "generators/rspec/templates/spec_helper.rb", "generators/rspec/templates/stories_helper.rb", "generators/rspec_controller/USAGE", "generators/rspec_controller/rspec_controller_generator.rb", "generators/rspec_controller/templates/controller_spec.rb", "generators/rspec_controller/templates/helper_spec.rb", "generators/rspec_controller/templates/view_spec.rb", "generators/rspec_default_values.rb", "generators/rspec_model/USAGE", "generators/rspec_model/rspec_model_generator.rb", "generators/rspec_model/templates/model_spec.rb", "generators/rspec_scaffold/rspec_scaffold_generator.rb", "generators/rspec_scaffold/templates/controller_spec.rb", "generators/rspec_scaffold/templates/edit_erb_spec.rb", "generators/rspec_scaffold/templates/helper_spec.rb", "generators/rspec_scaffold/templates/index_erb_spec.rb", "generators/rspec_scaffold/templates/new_erb_spec.rb", "generators/rspec_scaffold/templates/routing_spec.rb", "generators/rspec_scaffold/templates/show_erb_spec.rb", "init.rb", "lib/autotest/discover.rb", "lib/autotest/rails_rspec.rb", "lib/spec/rails.rb", "lib/spec/rails/example.rb", "lib/spec/rails/example/assigns_hash_proxy.rb", "lib/spec/rails/example/controller_example_group.rb", "lib/spec/rails/example/cookies_proxy.rb", "lib/spec/rails/example/functional_example_group.rb", "lib/spec/rails/example/helper_example_group.rb", "lib/spec/rails/example/model_example_group.rb", "lib/spec/rails/example/rails_example_group.rb", "lib/spec/rails/example/render_observer.rb", "lib/spec/rails/example/view_example_group.rb", "lib/spec/rails/extensions.rb", "lib/spec/rails/extensions/action_controller/base.rb", "lib/spec/rails/extensions/action_controller/rescue.rb", "lib/spec/rails/extensions/action_controller/test_response.rb", "lib/spec/rails/extensions/action_view/base.rb", "lib/spec/rails/extensions/active_record/base.rb", "lib/spec/rails/extensions/object.rb", "lib/spec/rails/extensions/spec/example/configuration.rb", "lib/spec/rails/extensions/spec/matchers/have.rb", "lib/spec/rails/interop/testcase.rb", "lib/spec/rails/matchers.rb", "lib/spec/rails/matchers/assert_select.rb", "lib/spec/rails/matchers/change.rb", "lib/spec/rails/matchers/have_text.rb", "lib/spec/rails/matchers/include_text.rb", "lib/spec/rails/matchers/redirect_to.rb", "lib/spec/rails/matchers/render_template.rb", "lib/spec/rails/mocks.rb", "lib/spec/rails/story_adapter.rb", "lib/spec/rails/version.rb", "rspec-rails.gemspec", "spec/rails/autotest/mappings_spec.rb", "spec/rails/example/assigns_hash_proxy_spec.rb", "spec/rails/example/configuration_spec.rb", "spec/rails/example/controller_isolation_spec.rb", "spec/rails/example/controller_spec_spec.rb", "spec/rails/example/cookies_proxy_spec.rb", "spec/rails/example/example_group_factory_spec.rb", "spec/rails/example/helper_spec_spec.rb", "spec/rails/example/model_spec_spec.rb", "spec/rails/example/shared_behaviour_spec.rb", "spec/rails/example/test_unit_assertion_accessibility_spec.rb", "spec/rails/example/view_spec_spec.rb", "spec/rails/extensions/action_controller_rescue_action_spec.rb", "spec/rails/extensions/action_view_base_spec.rb", "spec/rails/extensions/active_record_spec.rb", "spec/rails/interop/testcase_spec.rb", "spec/rails/matchers/assert_select_spec.rb", "spec/rails/matchers/description_generation_spec.rb", "spec/rails/matchers/errors_on_spec.rb", "spec/rails/matchers/have_text_spec.rb", "spec/rails/matchers/include_text_spec.rb", "spec/rails/matchers/redirect_to_spec.rb", "spec/rails/matchers/render_template_spec.rb", "spec/rails/matchers/should_change_spec.rb", "spec/rails/mocks/ar_classes.rb", "spec/rails/mocks/mock_model_spec.rb", "spec/rails/mocks/stub_model_spec.rb", "spec/rails/sample_modified_fixture.rb", "spec/rails/sample_spec.rb", "spec/rails/spec_server_spec.rb", "spec/rails/spec_spec.rb", "spec/rails_suite.rb", "spec/spec_helper.rb", "spec_resources/controllers/action_view_base_spec_controller.rb", "spec_resources/controllers/controller_spec_controller.rb", "spec_resources/controllers/redirect_spec_controller.rb", "spec_resources/controllers/render_spec_controller.rb", "spec_resources/controllers/rjs_spec_controller.rb", "spec_resources/helpers/addition_helper.rb", "spec_resources/helpers/explicit_helper.rb", "spec_resources/helpers/more_explicit_helper.rb", "spec_resources/helpers/plugin_application_helper.rb", "spec_resources/helpers/view_spec_helper.rb", "spec_resources/views/controller_spec/_partial.rhtml", "spec_resources/views/controller_spec/action_setting_flash_after_session_reset.rhtml", "spec_resources/views/controller_spec/action_setting_flash_before_session_reset.rhtml", "spec_resources/views/controller_spec/action_setting_the_assigns_hash.rhtml", "spec_resources/views/controller_spec/action_with_errors_in_template.rhtml", "spec_resources/views/controller_spec/action_with_template.rhtml", "spec_resources/views/layouts/application.rhtml", "spec_resources/views/layouts/simple.rhtml", "spec_resources/views/objects/_object.html.erb", "spec_resources/views/render_spec/_a_partial.rhtml", "spec_resources/views/render_spec/action_with_alternate_layout.rhtml", "spec_resources/views/render_spec/some_action.js.rjs", "spec_resources/views/render_spec/some_action.rhtml", "spec_resources/views/render_spec/some_action.rjs", "spec_resources/views/rjs_spec/_replacement_partial.rhtml", "spec_resources/views/rjs_spec/hide_div.rjs", "spec_resources/views/rjs_spec/hide_page_element.rjs", "spec_resources/views/rjs_spec/insert_html.rjs", "spec_resources/views/rjs_spec/replace.rjs", "spec_resources/views/rjs_spec/replace_html.rjs", "spec_resources/views/rjs_spec/replace_html_with_partial.rjs", "spec_resources/views/rjs_spec/visual_effect.rjs", "spec_resources/views/rjs_spec/visual_toggle_effect.rjs", "spec_resources/views/tag_spec/no_tags.rhtml", "spec_resources/views/tag_spec/single_div_with_no_attributes.rhtml", "spec_resources/views/tag_spec/single_div_with_one_attribute.rhtml", "spec_resources/views/view_spec/_partial.rhtml", "spec_resources/views/view_spec/_partial_used_twice.rhtml", "spec_resources/views/view_spec/_partial_with_local_variable.rhtml", "spec_resources/views/view_spec/_partial_with_sub_partial.rhtml", "spec_resources/views/view_spec/_spacer.rhtml", "spec_resources/views/view_spec/accessor.rhtml", "spec_resources/views/view_spec/block_helper.rhtml", "spec_resources/views/view_spec/entry_form.rhtml", "spec_resources/views/view_spec/explicit_helper.rhtml", "spec_resources/views/view_spec/foo/show.rhtml", "spec_resources/views/view_spec/implicit_helper.rhtml", "spec_resources/views/view_spec/multiple_helpers.rhtml", "spec_resources/views/view_spec/should_not_receive.rhtml", "spec_resources/views/view_spec/template_with_partial.rhtml", "spec_resources/views/view_spec/template_with_partial_using_collection.rhtml", "spec_resources/views/view_spec/template_with_partial_with_array.rhtml", "stories/all.rb", "stories/configuration/stories.rb", "stories/helper.rb", "stories/steps/people.rb", "stories/transactions_should_rollback", "stories/transactions_should_rollback.rb"]
- s.has_rdoc = true
- s.homepage = %q{http://rspec.info/}
- s.rdoc_options = ["--main", "README.txt"]
- s.require_paths = ["lib"]
- s.rubyforge_project = %q{rspec}
- s.rubygems_version = %q{1.3.0}
- s.summary = %q{rspec-rails 1.1.11}
-
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 2
- end
-
- s.add_dependency(%q\n"This is not a big problem," he said.\n
}
- text = "\n\"This is not a big problem,\" he said.\n"
- html = "\n\"This is not a big problem,\" he said.\n"
- response.should have_tag("pre", text)
- lambda { response.should have_tag("pre", html) }.should raise_error(SpecFailed)
- response.should have_tag("pre", :html=>html)
- lambda { response.should have_tag("pre", :html=>text) }.should raise_error(SpecFailed)
- end
-
- it "should match number of instances" do
- render_html %Q{John
George
Paul
Ringo
Text
- Another
-
diff --git a/vendor/plugins/rspec-rails/spec_resources/views/view_spec/accessor.rhtml b/vendor/plugins/rspec-rails/spec_resources/views/view_spec/accessor.rhtml
deleted file mode 100644
index 1d6f96b01..000000000
--- a/vendor/plugins/rspec-rails/spec_resources/views/view_spec/accessor.rhtml
+++ /dev/null
@@ -1,5 +0,0 @@
-==
instead of .equal?
).
-
-Lastly, should_be used to handle true and false differently from any other values. We've removed
-this special handling, so now actual.should_be true will fail for any value other than true (it
-used to pass for any non-nil, non-false value), and actual.should_be false will fail for any
-value other than false (it used to pass for nil or false).
-
-Here's what you'll need to do to update your specs:
-# search for "should_equal" and replace with "should_eql"
-# run specs
-
-If any specs still fail, they are probably related to should be_true or should_be_false using
-non-boolean values. Those you'll just have to inspect manually and adjust appropriately (sorry!).
-
---------------------------------------------------
-Specifying multiple return values in mocks now works like this:
-
-mock.should_receive(:message).and_return(1,2,3)
-
-It used to work like this:
-
-mock.should_receive(:message).and_return([1,2,3])
-
-but we decided that was counter intuitive and otherwise lame.
-
-Here's what you'll need to do to update your specs:
-# search for "and_return(["
-# get rid of the "[" and "]"
-
---------------------------------------------------
-RSpec on Rails now supports the following (thanks to ZenTest upon which it is built):
-
-# Separate specs for models, views, controllers and helpers
-# Controller specs are completely decoupled from the views by default (though you can tell them to couple themselves if you prefer)
-# View specs are completely decoupled from app-specific controllers
-
-See http://rspec.rubyforge.org/documentation/rails/index.html for more information
---------------------------------------------------
-As usual, there are also other new features and bug fixes:
-
-* Added lots of documentation on mocks/stubs and the rails plugin.
-* Added support for assigns[key] syntax for controller specs (to align w/ pre-existing syntax for view specs)
-* Added support for controller.should_redirect_to
-* RSpec on Rails automatically checks whether it's compatible with the installed RSpec
-* Applied [#6393] rspec_on_rails uses deprecated '@response' instead of the accessor
-* RSpec now has 100% spec coverage(!)
-* Added support for stubbing and partial mocking
-* Progress (....F..F.) is now coloured. Tweaked patch from KAKUTANI Shintaro.
-* Backtrace now excludes the rcov runner (/usr/local/bin/rcov)
-* Fixed [#5539] predicates do not work w/ rails
-* Added [#6091] support for Regexp matching messages sent to should_raise
-* Added [#6333] support for Regexp matching in mock arguments
-* Applied [#6283] refactoring of diff support to allow selectable formats and custom differs
-* Fixed [#5564] "ruby spec_file.rb" doesn't work the same way as "spec spec_file.rb"
-* Fixed [#6056] Multiple output of failing-spec notice
-* Fixed [#6233] Colours in specdoc
-* Applied [#6207] Allows --diff option to diff target and expected's #inspect output (Patch by Lachie Cox)
-* Fixed [#6203] Failure messages are misleading - consider using inspect.
-* Added [#6334] subject.should_have_xyz will try to call subject.has_xyz? - use this for hash.should_have_key(key)
-* Fixed [#6017] Rake task should ignore empty or non-existent spec-dirs
-
-=== Version 0.6.4
-
-In addition to a number of bug fixes and patches, this release begins to formalize the support for
-RSpec on Rails.
-
-* Added Christopher Petrilli's TextMate bundle to vendor/textmate/RSpec.tmbundle
-* Fixed [#5909], once again supporting multi_word_predicates
-* Applied [#5873] - response.should_have_rjs (initial patch from Jake Howerton, based on ARTS by Kevin Clark)
-* Added generation of view specs for rspec_on_rails
-* Applied [#5815] active_record_subclass.should_have(3).records
-* Added support in "rake stats" for view specs (in spec/views)
-* Applied [#5801] QuickRef.pdf should say RSpec, not rSpec
-* Applied [#5728] rails_spec_runner fails on Windows (Patch from Lindsay Evans).
-* Applied [#5708] RSpec Rails plugin rspec_controller generator makes specs that do not parse.
-* Cleaned up RSpec on Rails so it doesn't pollute as much during bootstrapping.
-* Added support for response.should_have_tag and response.should_not_have_tag (works just like assert_tag in rails)
-* Added new -c, --colour, --color option for colourful (red/green) output. Inspired from Pat Eyler's Redgreen gem.
-* Added examples for Watir and Selenium under the gem's vendor directory.
-* Renamed rails_spec_runner to rails_spec_server (as referred to in the docs)
-* Added support for trying a plural for arbitrary predicates. E.g. Album.should_exist(:name => "Hey Jude") will call Album.exists?(:name => "Hey Jude")
-* Added support for should_have to work with methods taking args returning a collection. E.g. @dave.should_have(3).albums_i_have_that_this_guy_doesnt(@aslak)
-* Added [#5570] should_not_receive(:msg).with(:specific, "args")
-* Applied [#5065] to support using define_method rather than method_missing to capture expected messages on mocks. Thanks to Eero Saynatkari for the tip that made it work.
-* Restructured directories and Modules in order to separate rspec into three distinct Modules: Spec::Expectations, Spec::Runner and Spec::Mocks. This will allow us to more easily integrate other mock frameworks and/or allow test/unit users to take advantage of the expectation API.
-* Applied [#5620] support any boolean method and arbitrary comparisons (5.should_be < 6) (Patch from Mike Williams)
-
-=== Version 0.6.3
-
-This release fixes some minor bugs related to RSpec on Rails
-Note that if you upgrade a rails app with this version of the rspec_on_rails plugin
-you should remove your lib/tasks/rspec.rake if it exists.
-
-* Backtraces from drb (and other standard ruby libraries) are now stripped from backtraces.
-* Applied [#5557] Put rspec.rake into the task directory of the RSpec on Rails plugin (Patch from Daniel Siemssen)
-* Applied [#5556] rails_spec_server loads environment.rb twice (Patch from Daniel Siemssen)
-
-=== Version 0.6.2
-This release fixes a couple of regressions with the rake task that were introduced in the previous version (0.6.1)
-
-* Fixed [#5518] ruby -w: warnings in 0.6.1
-* Applied [#5525] fix rake task path to spec tool for gem-installed rspec (patch from Riley Lynch)
-* Fixed a teensey regression with the rake task - introduced in 0.6.1. The spec command is now quoted so it works on windows.
-
-=== Version 0.6.1
-This is the "fix the most annoying bugs release" of RSpec. There are 9 bugfixes this time.
-Things that may break backwards compatibility:
-1) Spec::Rake::SpecTask no longer has the options attribute. Use ruby_opts, spec_opts and rcov_opts instead.
-
-* Fixed [#4891] RCOV task failing on windows
-* Fixed [#4896] Shouldn't modify user's $LOAD_PATH (Tip from Gavin Sinclair)
-* Fixed [#5369] ruby -w: warnings in RSpec 0.5.16 (Tip from Suraj Kurapati)
-* Applied [#5141] ExampleMatcher doesn't escape strings before matching (Patch from Nikolai Weibull).
-* Fixed [#5224] Move 'require diff-lcs' from test_helper.rb to diff_test.rb (Tip from Chris Roos)
-* Applied [#5449] Rake stats for specs (Patch from Nick Sieger)
-* Applied [#5468, #5058] Fix spec runner to correctly run controller specs (Patch from Daniel Siemssen)
-* Applied fixes to rails_spec_server to improve its ability to run several times. (Patch from Daniel Siemssen)
-* Changed RCov::VerifyTask to fail if the coverage is above the threshold. This is to ensure it gets bumped when coverage improves.
-
-=== Version 0.6.0
-This release makes an official commitment to underscore_syntax (with no more support for dot.syntax)
-
-* Fixed bug (5292) that caused mock argument matching to fail
-* Converted ALL tests to use underscore syntax
-* Fixed all remaining problems with underscores revealed by converting all the tests to underscores
-* Enhanced sugar to support combinations of methods (i.e. once.and_return)
-* Simplified helper structure taking advantage of dot/underscore combos (i.e. should.be.an_instance_of, which can be expressed as should be_an_instance_of)
-* Added support for at_most in mocks
-* Added support for should_not_receive(:msg) (will be removing should_receive(:msg).never some time soon)
-* Added support for should_have_exactly(5).items_in_collection
-
-=== Version 0.5.16
-This release improves Rails support and test2spec translation.
-
-* Fixed underscore problems that occurred when RSpec was used in Rails
-* Simplified the Rails support by packaging it as a plugin instead of a generator gem.
-* Fixed [#5063] 'rspec_on_rails' require line in spec_helper.rb
-* Added pre_commit rake task to reduce risk of regressions. Useful for RSpec developers and patchers.
-* Added failure_message to RSpec Rake task
-* test2spec now defines converted helper methods outside of the setup block (bug #5057).
-
-=== Version 0.5.15
-This release removes a prematurely added feature that shouldn't have been added.
-
-* Removed support for differences that was added in 0.5.14. The functionality is not aligned with RSpec's vision.
-
-=== Version 0.5.14
-This release introduces better ways to extend specs, improves some of the core API and
-a experimental support for faster rails specs.
-
-* Added proc methods for specifying differences (increments and decrements). See difference_test.rb
-* Methods can now be defined alongside specs. This obsoletes the need for defining methods in setup. (Patch #5002 from Brian Takita)
-* Sugar (underscores) now works correctly with should be_a_kind_of and should be_an_instance_of
-* Added support for include and inherit in contexts. (Patch #4971 from Brian Takita)
-* Added rails_spec and rails_spec_server for faster specs on rails (still buggy - help needed)
-* Fixed bug that caused should_render to break if given a :symbol (in Rails)
-* Added support for comparing exception message in should_raise and should_not_raise
-
-=== Version 0.5.13
-This release fixes some subtle bugs in the mock API.
-
-* Use fully-qualified class name of Exceptions in failure message. Easier to debug that way.
-* Fixed a bug that caused mocks to yield a one-element array (rather than the element) when one yield arg specified.
-* Mocks not raise AmbiguousReturnError if an explicit return is used at the same time as an expectation block.
-* Blocks passed to yielding mocks can now raise without causing mock verification to fail.
-
-=== Version 0.5.12
-This release adds diff support for failure messages, a HTML formatter plus some other
-minor enhancements.
-
-* Added HTML formatter.
-* Added fail_on_error option to spectask.
-* Added support for diffing, using the diff-lcs Rubygem (#2648).
-* Remove RSpec on Rails files from backtrace (#4694).
-* All of RSpec's own tests run successfully after translation with test2spec.
-* Added --verbose mode for test2spec - useful for debugging when classes fail to translate.
-* Output of various formatters is now flushed - to get more continuous output.
-
-=== Version 0.5.11
-This release makes test2spec usable with Rails (with some manual steps).
-See http://rspec.rubyforge.org/tools/rails.html for more details
-
-* test2spec now correctly translates bodies of helper methods (non- test_*, setup and teardown ones).
-* Added more documentation about how to get test2spec to work with Rails.
-
-=== Version 0.5.10
-This version features a second rewrite of test2spec - hopefully better than the previous one.
-
-* Improved test2spec's internals. It now transforms the syntax tree before writing out the code.
-
-=== Version 0.5.9
-This release improves test2spec by allowing more control over the output
-
-* Added --template option to test2spec, which allows for custom output driven by ERB
-* Added --quiet option to test2spec
-* Removed unnecessary dependency on RubyToC
-
-=== Version 0.5.8
-This release features a new Test::Unit to RSpec translation tool.
-Also note that the RubyGem of the previous release (0.5.7) was corrupt.
-We're close to being able to translate all of RSpec's own Test::Unit
-tests and have them run successfully!
-
-* Updated test2spec documentation.
-* Replaced old test2rspec with a new test2spec, which is based on ParseTree and RubyInline.
-
-=== Version 0.5.7
-This release changes examples and documentation to recommend underscores rather than dots,
-and addresses some bugfixes and changes to the spec commandline.
-
-* spec DIR now works correctly, recursing down and slurping all *.rb files
-* All documentation and examples are now using '_' instead of '.'
-* Custom external formatters can now be specified via --require and --format.
-
-=== Version 0.5.6
-This release fixes a bug in the Rails controller generator
-
-* The controller generator did not write correct source code (missing 'do'). Fixed.
-
-=== Version 0.5.5
-This release adds initial support for Ruby on Rails in the rspec_generator gem.
-
-* [Rails] Reorganised Lachie's original code to be a generator packaged as a gem rather than a plugin.
-* [Rails] Imported code from http://lachie.info/svn/projects/rails_plugins/rspec_on_rails (Written by Lachie Cox)
-* Remove stack trace lines from TextMate's Ruby bundle
-* Better error message from spectask when no spec files are found.
-
-=== Version 0.5.4
-The "the tutorial is ahead of the gem" release
-
-* Support for running a single spec with --spec
-* Exitcode is now 1 unless all specs pass, in which case it's 0.
-* -v, --version now both mean the same thing
-* For what was verbose output (-v), use --format specdoc or -f s
-* --format rdoc always runs in dry-run mode
-* Removed --doc and added --format and --dry-run
-* Refactored towards more pluggable formatters
-* Use webgen's execute tag when generating website (more accurate)
-* Fixed incorrect quoting of spec_opts in SpecTask
-* Added patch to enable underscored shoulds like 1.should_equal(1) - patch from Rich Kilmer
-* Removed most inherited instance method from Mock, making more methods mockable.
-* Made the RCovVerify task part of the standard toolset.
-* Documented Rake task and how to use it with Rcov
-* Implemented tags for website (hooking into ERB, RedCloth and syntax)
-* RSpec Rake task now takes spec_opts and out params so it can be used for doc generation
-* RCov integration for RSpec Rake task (#4058)
-* Group all results instead of printing them several times (#4057)
-* Mocks can now yield
-* Various improvements to error reporting (including #4191)
-* backtrace excludes rspec code - use -b to include it
-* split examples into examples (passing) and failing_examples
-
-=== Version 0.5.3
-The "hurry up, CoR is in two days" release.
-
-* Don't run rcov by default
-* Make separate task for running tests with RCov
-* Added Rake task to fail build if coverage drops below a certain threshold
-* Even more failure output cleanup (simplification)
-* Added duck_type constraint for mocks
-
-=== Version 0.5.2
-This release has minor improvements to the commandline and fixes some gem warnings
-
-* Readded README to avoid RDoc warnings
-* Added --version switch to commandline
-* More changes to the mock API
-
-=== Version 0.5.1
-This release is the first release of RSpec with a new website. It will look better soon.
-
-* Added initial documentation for API
-* Added website based on webgen
-* Modified test task to use rcov
-* Deleted unused code (thanks, rcov!)
-* Various changes to the mock API,
-* Various improvements to failure reporting
-
-=== Version 0.5.0
-This release introduces a new API and obsolesces previous versions.
-
-* Moved source code to separate subfolders
-* Added new DSL runner based on instance_exec
-* Added spike for testdox/rdoc generation
-* merge Astels' and Chelimsky's work on ShouldHelper
-* this would be 0.5.0 if I updated the documentation
-* it breaks all of your existing specifications. We're not sorry.
-
-=== Version 0.3.2
-
-The "srbaker is an idiot" release.
-
-* also forgot to update the path to the actual Subversion repository
-* this should be it
-
-=== Version 0.3.1
-
-This is just 0.3.0, but with the TUTORIAL added to the documentation list.
-
-* forgot to include TUTORIAL in the documentation
-
-=== Version 0.3.0
-
-It's been a while since last release, lots of new stuff is available. For instance:
-
-* improvements to the runners
-* addition of should_raise expectation (thanks to Brian Takita)
-* some documentation improvements
-* RSpec usable as a DSL
-
-=== Version 0.2.0
-
-This release provides a tutorial for new users wishing to get started with
-RSpec, and many improvements.
-
-* improved reporting in the spec runner output
-* update the examples to the new mock api
-* added TUTORIAL, a getting started document for new users of RSpec
-
-=== Version 0.1.7
-
-This release improves installation and documentation, mock integration and error reporting.
-
-* Comparison errors now print the class name too.
-* Mocks now take an optional +options+ parameter to specify behaviour.
-* Removed __expects in favour of should_receive
-* Added line number reporting in mock error messages for unreceived message expectations.
-* Added should_match and should_not_match.
-* Added a +mock+ method to Spec::Context which will create mocks that autoverify (no need to call __verify).
-* Mocks now require names in the constructor to ensure sensible error messages.
-* Made 'spec' executable and updated usage instructions in README accordingly.
-* Made more parts of the Spec::Context API private to avoid accidental usage.
-* Added more RDoc to Spec::Context.
-
-=== Version 0.1.6
-
-More should methods.
-
-* Added should_match and should_not_match.
-
-=== Version 0.1.5
-
-Included examples and tests in gem.
-
-=== Version 0.1.4
-
-More tests on block based Mock expectations.
-
-=== Version 0.1.3
-
-Improved mocking:
-
-* block based Mock expectations.
-
-=== Version 0.1.2
-
-This release adds some improvements to the mock API and minor syntax improvements
-
-* Added Mock.should_expect for a more consistent DSL.
-* Added MockExpectation.and_returns for a better DSL.
-* Made Mock behave as a null object after a call to Mock.ignore_missing
-* Internal syntax improvements.
-* Improved exception trace by adding exception class name to error message.
-* Renamed some tests for better consistency.
-
-=== Version 0.1.1
-
-This release adds some shoulds and improves error reporting
-
-* Added should be_same_as and should_not be_same_as.
-* Improved error reporting for comparison expectations.
-
-=== Version 0.1.0
-
-This is the first preview release of RSpec, a Behaviour-Driven Development library for Ruby
-
-* Added Rake script with tasks for gems, rdoc etc.
-* Added an XForge task to make release go easier.
diff --git a/vendor/plugins/rspec/License.txt b/vendor/plugins/rspec/License.txt
deleted file mode 100644
index b98ea7693..000000000
--- a/vendor/plugins/rspec/License.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-(The MIT License)
-
-Copyright (c) 2005-2008 The RSpec Development Team
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/plugins/rspec/Manifest.txt b/vendor/plugins/rspec/Manifest.txt
deleted file mode 100644
index 3171e0c2b..000000000
--- a/vendor/plugins/rspec/Manifest.txt
+++ /dev/null
@@ -1,403 +0,0 @@
-History.txt
-License.txt
-Manifest.txt
-README.txt
-Rakefile
-TODO.txt
-bin/autospec
-bin/spec
-examples/pure/autogenerated_docstrings_example.rb
-examples/pure/before_and_after_example.rb
-examples/pure/behave_as_example.rb
-examples/pure/custom_expectation_matchers.rb
-examples/pure/custom_formatter.rb
-examples/pure/dynamic_spec.rb
-examples/pure/file_accessor.rb
-examples/pure/file_accessor_spec.rb
-examples/pure/greeter_spec.rb
-examples/pure/helper_method_example.rb
-examples/pure/io_processor.rb
-examples/pure/io_processor_spec.rb
-examples/pure/legacy_spec.rb
-examples/pure/mocking_example.rb
-examples/pure/multi_threaded_behaviour_runner.rb
-examples/pure/nested_classes_example.rb
-examples/pure/partial_mock_example.rb
-examples/pure/pending_example.rb
-examples/pure/predicate_example.rb
-examples/pure/priority.txt
-examples/pure/shared_example_group_example.rb
-examples/pure/shared_stack_examples.rb
-examples/pure/spec_helper.rb
-examples/pure/stack.rb
-examples/pure/stack_spec.rb
-examples/pure/stack_spec_with_nested_example_groups.rb
-examples/pure/stubbing_example.rb
-examples/pure/yielding_example.rb
-examples/stories/adder.rb
-examples/stories/addition
-examples/stories/addition.rb
-examples/stories/calculator.rb
-examples/stories/game-of-life/.loadpath
-examples/stories/game-of-life/README.txt
-examples/stories/game-of-life/behaviour/everything.rb
-examples/stories/game-of-life/behaviour/examples/examples.rb
-examples/stories/game-of-life/behaviour/examples/game_behaviour.rb
-examples/stories/game-of-life/behaviour/examples/grid_behaviour.rb
-examples/stories/game-of-life/behaviour/stories/CellsWithLessThanTwoNeighboursDie.story
-examples/stories/game-of-life/behaviour/stories/CellsWithMoreThanThreeNeighboursDie.story
-examples/stories/game-of-life/behaviour/stories/EmptySpacesWithThreeNeighboursCreateACell.story
-examples/stories/game-of-life/behaviour/stories/ICanCreateACell.story
-examples/stories/game-of-life/behaviour/stories/ICanKillACell.story
-examples/stories/game-of-life/behaviour/stories/TheGridWraps.story
-examples/stories/game-of-life/behaviour/stories/create_a_cell.rb
-examples/stories/game-of-life/behaviour/stories/helper.rb
-examples/stories/game-of-life/behaviour/stories/kill_a_cell.rb
-examples/stories/game-of-life/behaviour/stories/steps.rb
-examples/stories/game-of-life/behaviour/stories/stories.rb
-examples/stories/game-of-life/behaviour/stories/stories.txt
-examples/stories/game-of-life/life.rb
-examples/stories/game-of-life/life/game.rb
-examples/stories/game-of-life/life/grid.rb
-examples/stories/helper.rb
-examples/stories/steps/addition_steps.rb
-failing_examples/README.txt
-failing_examples/diffing_spec.rb
-failing_examples/failing_autogenerated_docstrings_example.rb
-failing_examples/failure_in_setup.rb
-failing_examples/failure_in_teardown.rb
-failing_examples/mocking_example.rb
-failing_examples/mocking_with_flexmock.rb
-failing_examples/mocking_with_mocha.rb
-failing_examples/mocking_with_rr.rb
-failing_examples/partial_mock_example.rb
-failing_examples/predicate_example.rb
-failing_examples/raising_example.rb
-failing_examples/spec_helper.rb
-failing_examples/syntax_error_example.rb
-failing_examples/team_spec.rb
-failing_examples/timeout_behaviour.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/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/extensions.rb
-lib/spec/extensions/class.rb
-lib/spec/extensions/main.rb
-lib/spec/extensions/metaclass.rb
-lib/spec/extensions/object.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/exist.rb
-lib/spec/matchers/has.rb
-lib/spec/matchers/have.rb
-lib/spec/matchers/include.rb
-lib/spec/matchers/match.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/rspec_spec.rb
-spec/rspec_suite.rb
-spec/ruby_forker.rb
-spec/spec.opts
-spec/spec/adapters/ruby_engine_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/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/extensions/main_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_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_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/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/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_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/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
diff --git a/vendor/plugins/rspec/README.txt b/vendor/plugins/rspec/README.txt
deleted file mode 100644
index e95951514..000000000
--- a/vendor/plugins/rspec/README.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-= 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
diff --git a/vendor/plugins/rspec/Rakefile b/vendor/plugins/rspec/Rakefile
deleted file mode 100644
index 429072a50..000000000
--- a/vendor/plugins/rspec/Rakefile
+++ /dev/null
@@ -1,89 +0,0 @@
-# -*- ruby -*-
-
-$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
-require 'rubygems'
-require 'hoe'
-require 'spec/version'
-require 'spec/rake/spectask'
-
-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 = "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'
-
-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 = '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
- ruby "stories/all.rb --colour --format plain"
-end
-
-desc "Run failing examples (see failure output)"
-Spec::Rake::SpecTask.new('failing_examples') do |t|
- t.spec_files = FileList['failing_examples/**/*_spec.rb']
- t.spec_opts = ['--options', 'spec/spec.opts']
-end
-
-def egrep(pattern)
- Dir['**/*.rb'].each do |fn|
- count = 0
- open(fn) do |f|
- while line = f.gets
- count += 1
- if line =~ pattern
- puts "#{fn}:#{count}:#{line}"
- end
- end
- end
- end
-end
-
-desc "Look for TODO and FIXME tags in the code"
-task :todo do
- egrep /(FIXME|TODO|TBD)/
-end
-
-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
- IO.popen('git status') do |io|
- io.each_line do |line|
- raise "\n!!! Do a git commit first !!!\n\n" if line =~ /^#\s*modified:/
- end
- end
-end
\ No newline at end of file
diff --git a/vendor/plugins/rspec/TODO.txt b/vendor/plugins/rspec/TODO.txt
deleted file mode 100644
index ae5a2302e..000000000
--- a/vendor/plugins/rspec/TODO.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-== 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
diff --git a/vendor/plugins/rspec/bin/autospec b/vendor/plugins/rspec/bin/autospec
deleted file mode 100755
index 82a314f15..000000000
--- a/vendor/plugins/rspec/bin/autospec
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/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
diff --git a/vendor/plugins/rspec/bin/spec b/vendor/plugins/rspec/bin/spec
deleted file mode 100755
index a4b6e47b4..000000000
--- a/vendor/plugins/rspec/bin/spec
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env ruby
-$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../lib"))
-require 'spec'
-exit ::Spec::Runner::CommandLine.run
diff --git a/vendor/plugins/rspec/examples/pure/autogenerated_docstrings_example.rb b/vendor/plugins/rspec/examples/pure/autogenerated_docstrings_example.rb
deleted file mode 100644
index a4004f54d..000000000
--- a/vendor/plugins/rspec/examples/pure/autogenerated_docstrings_example.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-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
diff --git a/vendor/plugins/rspec/examples/pure/before_and_after_example.rb b/vendor/plugins/rspec/examples/pure/before_and_after_example.rb
deleted file mode 100644
index 7db6274ef..000000000
--- a/vendor/plugins/rspec/examples/pure/before_and_after_example.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-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
diff --git a/vendor/plugins/rspec/examples/pure/behave_as_example.rb b/vendor/plugins/rspec/examples/pure/behave_as_example.rb
deleted file mode 100755
index e95d1469a..000000000
--- a/vendor/plugins/rspec/examples/pure/behave_as_example.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-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
diff --git a/vendor/plugins/rspec/examples/pure/custom_expectation_matchers.rb b/vendor/plugins/rspec/examples/pure/custom_expectation_matchers.rb
deleted file mode 100644
index 075bb542d..000000000
--- a/vendor/plugins/rspec/examples/pure/custom_expectation_matchers.rb
+++ /dev/null
@@ -1,54 +0,0 @@
-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
diff --git a/vendor/plugins/rspec/examples/pure/custom_formatter.rb b/vendor/plugins/rspec/examples/pure/custom_formatter.rb
deleted file mode 100644
index c449fdc2e..000000000
--- a/vendor/plugins/rspec/examples/pure/custom_formatter.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-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 failing_examples -r examples/custom_formatter.rb -f CustomFormatter
-class CustomFormatter < Spec::Runner::Formatter::ProgressBarFormatter
- def backtrace_line(line)
- line.gsub(/([^:]*\.rb):(\d*)/) do
- "#{$1}:#{$2} "
- end
- end
-end
diff --git a/vendor/plugins/rspec/examples/pure/dynamic_spec.rb b/vendor/plugins/rspec/examples/pure/dynamic_spec.rb
deleted file mode 100644
index 15d473d61..000000000
--- a/vendor/plugins/rspec/examples/pure/dynamic_spec.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-require File.dirname(__FILE__) + '/spec_helper'
-
-describe "Some integers" do
- (1..10).each do |n|
- it "The root of #{n} square should be #{n}" do
- Math.sqrt(n*n).should == n
- end
- end
-end
diff --git a/vendor/plugins/rspec/examples/pure/file_accessor.rb b/vendor/plugins/rspec/examples/pure/file_accessor.rb
deleted file mode 100644
index ff6fb743c..000000000
--- a/vendor/plugins/rspec/examples/pure/file_accessor.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-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
diff --git a/vendor/plugins/rspec/examples/pure/file_accessor_spec.rb b/vendor/plugins/rspec/examples/pure/file_accessor_spec.rb
deleted file mode 100644
index 628d4c0b0..000000000
--- a/vendor/plugins/rspec/examples/pure/file_accessor_spec.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-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
diff --git a/vendor/plugins/rspec/examples/pure/greeter_spec.rb b/vendor/plugins/rspec/examples/pure/greeter_spec.rb
deleted file mode 100644
index ec7669dcc..000000000
--- a/vendor/plugins/rspec/examples/pure/greeter_spec.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-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
diff --git a/vendor/plugins/rspec/examples/pure/helper_method_example.rb b/vendor/plugins/rspec/examples/pure/helper_method_example.rb
deleted file mode 100644
index d97f19e65..000000000
--- a/vendor/plugins/rspec/examples/pure/helper_method_example.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-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
-
diff --git a/vendor/plugins/rspec/examples/pure/io_processor.rb b/vendor/plugins/rspec/examples/pure/io_processor.rb
deleted file mode 100644
index 6b15147b6..000000000
--- a/vendor/plugins/rspec/examples/pure/io_processor.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-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
diff --git a/vendor/plugins/rspec/examples/pure/io_processor_spec.rb b/vendor/plugins/rspec/examples/pure/io_processor_spec.rb
deleted file mode 100644
index 5cab7bf31..000000000
--- a/vendor/plugins/rspec/examples/pure/io_processor_spec.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-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
diff --git a/vendor/plugins/rspec/examples/pure/legacy_spec.rb b/vendor/plugins/rspec/examples/pure/legacy_spec.rb
deleted file mode 100644
index c86369515..000000000
--- a/vendor/plugins/rspec/examples/pure/legacy_spec.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-require File.dirname(__FILE__) + '/spec_helper'
-context "A legacy spec" do
- setup do
- end
-
- specify "should work fine" do
- end
-
- teardown do
- end
-end
diff --git a/vendor/plugins/rspec/examples/pure/mocking_example.rb b/vendor/plugins/rspec/examples/pure/mocking_example.rb
deleted file mode 100644
index 6adbef59d..000000000
--- a/vendor/plugins/rspec/examples/pure/mocking_example.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-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
diff --git a/vendor/plugins/rspec/examples/pure/multi_threaded_behaviour_runner.rb b/vendor/plugins/rspec/examples/pure/multi_threaded_behaviour_runner.rb
deleted file mode 100644
index 36edcd497..000000000
--- a/vendor/plugins/rspec/examples/pure/multi_threaded_behaviour_runner.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-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
diff --git a/vendor/plugins/rspec/examples/pure/nested_classes_example.rb b/vendor/plugins/rspec/examples/pure/nested_classes_example.rb
deleted file mode 100644
index abe43b0a6..000000000
--- a/vendor/plugins/rspec/examples/pure/nested_classes_example.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-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
diff --git a/vendor/plugins/rspec/examples/pure/partial_mock_example.rb b/vendor/plugins/rspec/examples/pure/partial_mock_example.rb
deleted file mode 100644
index 2af608b2f..000000000
--- a/vendor/plugins/rspec/examples/pure/partial_mock_example.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-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
diff --git a/vendor/plugins/rspec/examples/pure/pending_example.rb b/vendor/plugins/rspec/examples/pure/pending_example.rb
deleted file mode 100644
index 13f3d00c4..000000000
--- a/vendor/plugins/rspec/examples/pure/pending_example.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-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
-
diff --git a/vendor/plugins/rspec/examples/pure/predicate_example.rb b/vendor/plugins/rspec/examples/pure/predicate_example.rb
deleted file mode 100644
index 1202bb670..000000000
--- a/vendor/plugins/rspec/examples/pure/predicate_example.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-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
diff --git a/vendor/plugins/rspec/examples/pure/priority.txt b/vendor/plugins/rspec/examples/pure/priority.txt
deleted file mode 100644
index 5b00064e2..000000000
--- a/vendor/plugins/rspec/examples/pure/priority.txt
+++ /dev/null
@@ -1 +0,0 @@
-examples/custom_expectation_matchers.rb
\ No newline at end of file
diff --git a/vendor/plugins/rspec/examples/pure/shared_example_group_example.rb b/vendor/plugins/rspec/examples/pure/shared_example_group_example.rb
deleted file mode 100644
index 42a385f90..000000000
--- a/vendor/plugins/rspec/examples/pure/shared_example_group_example.rb
+++ /dev/null
@@ -1,81 +0,0 @@
-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
diff --git a/vendor/plugins/rspec/examples/pure/shared_stack_examples.rb b/vendor/plugins/rspec/examples/pure/shared_stack_examples.rb
deleted file mode 100644
index 7a0816250..000000000
--- a/vendor/plugins/rspec/examples/pure/shared_stack_examples.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-require File.join(File.dirname(__FILE__), *%w[spec_helper])
-
-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
diff --git a/vendor/plugins/rspec/examples/pure/spec_helper.rb b/vendor/plugins/rspec/examples/pure/spec_helper.rb
deleted file mode 100644
index 1e880796c..000000000
--- a/vendor/plugins/rspec/examples/pure/spec_helper.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-lib_path = File.expand_path("#{File.dirname(__FILE__)}/../../lib")
-$LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path)
-require 'spec'
diff --git a/vendor/plugins/rspec/examples/pure/stack.rb b/vendor/plugins/rspec/examples/pure/stack.rb
deleted file mode 100644
index 407173f7b..000000000
--- a/vendor/plugins/rspec/examples/pure/stack.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-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
diff --git a/vendor/plugins/rspec/examples/pure/stack_spec.rb b/vendor/plugins/rspec/examples/pure/stack_spec.rb
deleted file mode 100644
index 2a769da00..000000000
--- a/vendor/plugins/rspec/examples/pure/stack_spec.rb
+++ /dev/null
@@ -1,63 +0,0 @@
-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
-
- # NOTE that this one auto-generates the description "should be empty"
- 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 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
diff --git a/vendor/plugins/rspec/examples/pure/stack_spec_with_nested_example_groups.rb b/vendor/plugins/rspec/examples/pure/stack_spec_with_nested_example_groups.rb
deleted file mode 100644
index 05f6ad464..000000000
--- a/vendor/plugins/rspec/examples/pure/stack_spec_with_nested_example_groups.rb
+++ /dev/null
@@ -1,67 +0,0 @@
-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
diff --git a/vendor/plugins/rspec/examples/pure/stubbing_example.rb b/vendor/plugins/rspec/examples/pure/stubbing_example.rb
deleted file mode 100644
index 31354aec6..000000000
--- a/vendor/plugins/rspec/examples/pure/stubbing_example.rb
+++ /dev/null
@@ -1,69 +0,0 @@
-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
-
-
diff --git a/vendor/plugins/rspec/examples/pure/yielding_example.rb b/vendor/plugins/rspec/examples/pure/yielding_example.rb
deleted file mode 100644
index 4f6271835..000000000
--- a/vendor/plugins/rspec/examples/pure/yielding_example.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-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
diff --git a/vendor/plugins/rspec/examples/stories/adder.rb b/vendor/plugins/rspec/examples/stories/adder.rb
deleted file mode 100644
index 0b027b0ff..000000000
--- a/vendor/plugins/rspec/examples/stories/adder.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-class Adder
- def initialize
- @addends = []
- end
-
- def <<(val)
- @addends << val
- end
-
- def sum
- @addends.inject(0) { |sum_so_far, val| sum_so_far + val }
- end
-end
\ No newline at end of file
diff --git a/vendor/plugins/rspec/examples/stories/addition b/vendor/plugins/rspec/examples/stories/addition
deleted file mode 100644
index 58f092990..000000000
--- a/vendor/plugins/rspec/examples/stories/addition
+++ /dev/null
@@ -1,34 +0,0 @@
-This is a story about a calculator. The text up here above the Story: declaration
-won't be processed, so you can write whatever you wish!
-
-Story: simple addition
-
- As an accountant
- I want to add numbers
- So that I can count beans
-
- Scenario: add one plus one
- Given an addend of 1
- And an addend of 1
-
- When the addends are addeds
-
- Then the sum should be 3
- And the corks should be popped
-
- Scenario: add two plus five
- Given an addend of 2
- And an addend of 5
-
- When the addends are added
-
- Then the sum should be 7
- Then it should snow
-
- Scenario: add three more
- GivenScenario add two plus five
- And an addend of 3
-
- When the addends are added
-
- Then the sum should be 10
diff --git a/vendor/plugins/rspec/examples/stories/addition.rb b/vendor/plugins/rspec/examples/stories/addition.rb
deleted file mode 100644
index e43f5cf39..000000000
--- a/vendor/plugins/rspec/examples/stories/addition.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-require File.join(File.dirname(__FILE__), "helper")
-require File.join(File.dirname(__FILE__), "adder")
-
-# with_steps_for :addition, :more_addition do
-with_steps_for :addition, :more_addition do
- # Then("the corks should be popped") { }
- run File.expand_path(__FILE__).gsub(".rb","")
-end
-
diff --git a/vendor/plugins/rspec/examples/stories/calculator.rb b/vendor/plugins/rspec/examples/stories/calculator.rb
deleted file mode 100644
index d86fc7e5c..000000000
--- a/vendor/plugins/rspec/examples/stories/calculator.rb
+++ /dev/null
@@ -1,65 +0,0 @@
-$:.push File.join(File.dirname(__FILE__), *%w[.. .. lib])
-require 'spec'
-
-class AdditionMatchers < Spec::Story::StepGroup
- steps do |add|
- add.given("an addend of $addend") do |addend|
- @adder ||= Adder.new
- @adder << addend.to_i
- end
- end
-end
-
-steps = AdditionMatchers.new do |add|
- add.then("the sum should be $sum") do |sum|
- @sum.should == sum.to_i
- end
-end
-
-steps.when("they are added") do
- @sum = @adder.sum
-end
-
-# This Story uses steps (see above) instead of blocks
-# passed to Given, When and Then
-
-Story "addition", %{
- As an accountant
- I want to add numbers
- So that I can count some beans
-}, :steps_for => steps do
- Scenario "2 + 3" do
- Given "an addend of 2"
- And "an addend of 3"
- When "they are added"
- Then "the sum should be 5"
- end
-
- # This scenario uses GivenScenario, which silently runs
- # all the steps in a previous scenario.
-
- Scenario "add 4 more" do
- GivenScenario "2 + 3"
- Given "an addend of 4"
- When "they are added"
- Then "the sum should be 9"
- end
-end
-
-# And the class that makes the story pass
-
-class Adder
- def << addend
- addends << addend
- end
-
- def sum
- @addends.inject(0) do |result, addend|
- result + addend.to_i
- end
- end
-
- def addends
- @addends ||= []
- end
-end
diff --git a/vendor/plugins/rspec/examples/stories/game-of-life/.loadpath b/vendor/plugins/rspec/examples/stories/game-of-life/.loadpath
deleted file mode 100644
index 9a6222015..000000000
--- a/vendor/plugins/rspec/examples/stories/game-of-life/.loadpath
+++ /dev/null
@@ -1,5 +0,0 @@
-
-expected
and target
, 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 && 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 << "\nDiff:" << self.differ.diff_as_string(target.to_s, expected)
- elsif !target.is_a?(Proc)
- message << "\nDiff:" << self.differ.diff_as_object(target, expected)
- end
- end
- Kernel::raise(Spec::Expectations::ExpectationNotMetError.new(message))
- end
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/expectations/differs/default.rb b/vendor/plugins/rspec/lib/spec/expectations/differs/default.rb
deleted file mode 100644
index 74b59bbe3..000000000
--- a/vendor/plugins/rspec/lib/spec/expectations/differs/default.rb
+++ /dev/null
@@ -1,66 +0,0 @@
-begin
- require 'rubygems'
- require 'diff/lcs' #necessary due to loading bug on some machines - not sure why - DaC
- require 'diff/lcs/hunk'
-rescue LoadError ; raise "You must gem install diff-lcs to use diffing" ; end
-
-require 'pp'
-
-module Spec
- module Expectations
- module Differs
-
- # TODO add some rdoc
- class Default
- def initialize(options)
- @options = options
- end
-
- # This is snagged from diff/lcs/ldiff.rb (which is a commandline tool)
- 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 = ""
- diffs = Diff::LCS.diff(data_old, data_new)
- return output if diffs.empty?
- oldhunk = hunk = nil
- file_length_difference = 0
- diffs.each do |piece|
- begin
- hunk = Diff::LCS::Hunk.new(data_old, data_new, piece, context_lines,
- file_length_difference)
- file_length_difference = hunk.file_length_difference
- next unless oldhunk
- # Hunks may overlap, which is why we need to be careful when our
- # diff includes lines of context. Otherwise, we might print
- # redundant lines.
- if (context_lines > 0) and hunk.overlaps?(oldhunk)
- hunk.unshift(oldhunk)
- else
- output << oldhunk.diff(format)
- end
- ensure
- oldhunk = hunk
- output << "\n"
- end
- end
- #Handle the last remaining hunk
- output << oldhunk.diff(format) << "\n"
- end
-
- def diff_as_object(target,expected)
- diff_as_string(PP.pp(target,""), PP.pp(expected,""))
- end
-
- protected
- def format
- @options.diff_format
- end
-
- def context_lines
- @options.context_lines
- end
- end
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/expectations/errors.rb b/vendor/plugins/rspec/lib/spec/expectations/errors.rb
deleted file mode 100644
index 1fabd105d..000000000
--- a/vendor/plugins/rspec/lib/spec/expectations/errors.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-module Spec
- module Expectations
- # 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 < superclass
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/expectations/extensions.rb b/vendor/plugins/rspec/lib/spec/expectations/extensions.rb
deleted file mode 100644
index 60c9b9e7d..000000000
--- a/vendor/plugins/rspec/lib/spec/expectations/extensions.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-require 'spec/expectations/extensions/object'
-require 'spec/expectations/extensions/string_and_symbol'
diff --git a/vendor/plugins/rspec/lib/spec/expectations/extensions/object.rb b/vendor/plugins/rspec/lib/spec/expectations/extensions/object.rb
deleted file mode 100644
index 66dc60e40..000000000
--- a/vendor/plugins/rspec/lib/spec/expectations/extensions/object.rb
+++ /dev/null
@@ -1,63 +0,0 @@
-module Spec
- module Expectations
- # rspec adds #should and #should_not to every Object (and,
- # implicitly, every Class).
- module ObjectExpectations
- # :call-seq:
- # should(matcher)
- # should == expected
- # should === expected
- # should =~ expected
- #
- # receiver.should(matcher)
- # => Passes if matcher.matches?(receiver)
- #
- # receiver.should == expected #any value
- # => Passes if (receiver == expected)
- #
- # receiver.should === expected #any value
- # => Passes if (receiver === expected)
- #
- # receiver.should =~ regexp
- # => Passes if (receiver =~ regexp)
- #
- # See Spec::Matchers for more information about matchers
- #
- # == Warning
- #
- # NOTE that this does NOT support receiver.should != expected.
- # Instead, use receiver.should_not == expected
- def should(matcher=nil, &block)
- ExpectationMatcherHandler.handle_matcher(self, matcher, &block)
- end
-
- # :call-seq:
- # should_not(matcher)
- # should_not == expected
- # should_not === expected
- # should_not =~ expected
- #
- # receiver.should_not(matcher)
- # => Passes unless matcher.matches?(receiver)
- #
- # receiver.should_not == expected
- # => Passes unless (receiver == expected)
- #
- # receiver.should_not === expected
- # => Passes unless (receiver === expected)
- #
- # receiver.should_not =~ regexp
- # => Passes unless (receiver =~ regexp)
- #
- # See Spec::Matchers for more information about matchers
- def should_not(matcher=nil, &block)
- NegativeExpectationMatcherHandler.handle_matcher(self, matcher, &block)
- end
-
- end
- end
-end
-
-class Object
- include Spec::Expectations::ObjectExpectations
-end
diff --git a/vendor/plugins/rspec/lib/spec/expectations/extensions/string_and_symbol.rb b/vendor/plugins/rspec/lib/spec/expectations/extensions/string_and_symbol.rb
deleted file mode 100644
index 29cfbddfa..000000000
--- a/vendor/plugins/rspec/lib/spec/expectations/extensions/string_and_symbol.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-module Spec
- module Expectations
- module StringHelpers
- def starts_with?(prefix)
- to_s[0..(prefix.to_s.length - 1)] == prefix.to_s
- end
- end
- end
-end
-
-class String
- include Spec::Expectations::StringHelpers
-end
-
-class Symbol
- include Spec::Expectations::StringHelpers
-end
diff --git a/vendor/plugins/rspec/lib/spec/expectations/handler.rb b/vendor/plugins/rspec/lib/spec/expectations/handler.rb
deleted file mode 100644
index c5f1efce1..000000000
--- a/vendor/plugins/rspec/lib/spec/expectations/handler.rb
+++ /dev/null
@@ -1,52 +0,0 @@
-module Spec
- module Expectations
- class InvalidMatcherError < ArgumentError; end
-
- class ExpectationMatcherHandler
- class << self
- def handle_matcher(actual, matcher, &block)
- ::Spec::Matchers.last_should = "should"
- return Spec::Matchers::PositiveOperatorMatcher.new(actual) if matcher.nil?
-
- unless matcher.respond_to?(:matches?)
- raise InvalidMatcherError, "Expected a matcher, got #{matcher.inspect}."
- end
-
- match = matcher.matches?(actual, &block)
- ::Spec::Matchers.last_matcher = matcher
- Spec::Expectations.fail_with(matcher.failure_message) unless match
- match
- end
- end
- end
-
- class NegativeExpectationMatcherHandler
- class << self
- def handle_matcher(actual, matcher, &block)
- ::Spec::Matchers.last_should = "should not"
- return Spec::Matchers::NegativeOperatorMatcher.new(actual) if matcher.nil?
-
- unless matcher.respond_to?(:matches?)
- raise InvalidMatcherError, "Expected a matcher, got #{matcher.inspect}."
- end
-
- unless matcher.respond_to?(:negative_failure_message)
- Spec::Expectations.fail_with(
-<<-EOF
-Matcher does not support should_not.
-See Spec::Matchers for more information
-about matchers.
-EOF
-)
- end
- match = matcher.matches?(actual, &block)
- ::Spec::Matchers.last_matcher = matcher
- Spec::Expectations.fail_with(matcher.negative_failure_message) if match
- match
- end
- end
- end
-
- end
-end
-
diff --git a/vendor/plugins/rspec/lib/spec/extensions.rb b/vendor/plugins/rspec/lib/spec/extensions.rb
deleted file mode 100755
index 715bb49f2..000000000
--- a/vendor/plugins/rspec/lib/spec/extensions.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-require 'spec/extensions/object'
-require 'spec/extensions/class'
-require 'spec/extensions/main'
-require 'spec/extensions/metaclass'
diff --git a/vendor/plugins/rspec/lib/spec/extensions/class.rb b/vendor/plugins/rspec/lib/spec/extensions/class.rb
deleted file mode 100644
index 30730f87e..000000000
--- a/vendor/plugins/rspec/lib/spec/extensions/class.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-class Class
- # Creates a new subclass of self, with a name "under" our own name.
- # Example:
- #
- # x = Foo::Bar.subclass('Zap'){}
- # x.name # => Foo::Bar::Zap_1
- # x.superclass.name # => Foo::Bar
- def subclass(base_name, &body)
- klass = Class.new(self)
- class_name = "#{base_name}_#{class_count!}"
- instance_eval do
- const_set(class_name, klass)
- end
- klass.instance_eval(&body)
- klass
- end
-
- private
- def class_count!
- @class_count ||= 0
- @class_count += 1
- @class_count
- end
-end
\ No newline at end of file
diff --git a/vendor/plugins/rspec/lib/spec/extensions/main.rb b/vendor/plugins/rspec/lib/spec/extensions/main.rb
deleted file mode 100644
index 0236de434..000000000
--- a/vendor/plugins/rspec/lib/spec/extensions/main.rb
+++ /dev/null
@@ -1,87 +0,0 @@
-module Spec
- module Extensions
- module Main
- # Creates and returns a class that includes the ExampleGroupMethods
- # module. Which ExampleGroup type is created depends on the directory of the file
- # calling this method. For example, Spec::Rails will use different
- # classes for specs living in spec/models,
- # spec/helpers, spec/views and
- # spec/controllers.
- #
- # It is also possible to override autodiscovery of the example group
- # type with an options Hash as the last argument:
- #
- # describe "name", :type => :something_special do ...
- #
- # The reason for using different behaviour classes is to have different
- # matcher methods available from within the describe block.
- #
- # See Spec::Example::ExampleGroupFactory#register for details about how to
- # register special implementations.
- #
- def describe(*args, &block)
- raise ArgumentError if args.empty?
- raise ArgumentError unless block
- args << {} unless Hash === args.last
- args.last[:spec_path] = File.expand_path(caller(0)[1])
- Spec::Example::ExampleGroupFactory.create_example_group(*args, &block)
- end
- alias :context :describe
-
- # Creates an example group that can be shared by other example groups
- #
- # == Examples
- #
- # share_examples_for "All Editions" do
- # it "all editions behaviour" ...
- # end
- #
- # describe SmallEdition do
- # it_should_behave_like "All Editions"
- #
- # it "should do small edition stuff" do
- # ...
- # end
- # end
- def share_examples_for(name, &block)
- describe(name, :shared => true, &block)
- end
-
- alias :shared_examples_for :share_examples_for
-
- # Creates a Shared Example Group and assigns it to a constant
- #
- # share_as :AllEditions do
- # it "should do all editions stuff" ...
- # end
- #
- # describe SmallEdition do
- # it_should_behave_like AllEditions
- #
- # it "should do small edition stuff" do
- # ...
- # end
- # end
- #
- # And, for those of you who prefer to use something more like Ruby, you
- # can just include the module directly
- #
- # describe SmallEdition do
- # include AllEditions
- #
- # it "should do small edition stuff" do
- # ...
- # end
- # end
- def share_as(name, &block)
- begin
- Object.const_set(name, share_examples_for(name, &block))
- rescue NameError => e
- raise NameError.new(e.message + "\nThe first argument to share_as must be a legal name for a constant\n")
- end
- end
- end
- end
-end
-
-include Spec::Extensions::Main
diff --git a/vendor/plugins/rspec/lib/spec/extensions/metaclass.rb b/vendor/plugins/rspec/lib/spec/extensions/metaclass.rb
deleted file mode 100644
index acf9febea..000000000
--- a/vendor/plugins/rspec/lib/spec/extensions/metaclass.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-module Spec
- module MetaClass
- def metaclass
- class << self; self; end
- end
- end
-end
\ No newline at end of file
diff --git a/vendor/plugins/rspec/lib/spec/extensions/object.rb b/vendor/plugins/rspec/lib/spec/extensions/object.rb
deleted file mode 100755
index 0b8c26fa2..000000000
--- a/vendor/plugins/rspec/lib/spec/extensions/object.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-class Object
- def args_and_options(*args)
- options = Hash === args.last ? args.pop : {}
- return args, options
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/interop/test.rb b/vendor/plugins/rspec/lib/spec/interop/test.rb
deleted file mode 100644
index afa16137b..000000000
--- a/vendor/plugins/rspec/lib/spec/interop/test.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-require 'test/unit'
-require 'test/unit/testresult'
-
-require 'spec/interop/test/unit/testcase'
-require 'spec/interop/test/unit/testsuite_adapter'
-require 'spec/interop/test/unit/autorunner'
-require 'spec/interop/test/unit/testresult'
-require 'spec/interop/test/unit/ui/console/testrunner'
-
-Spec::Example::ExampleGroupFactory.default(Test::Unit::TestCase)
-
-Test::Unit.run = true
diff --git a/vendor/plugins/rspec/lib/spec/interop/test/unit/autorunner.rb b/vendor/plugins/rspec/lib/spec/interop/test/unit/autorunner.rb
deleted file mode 100644
index 3944e6995..000000000
--- a/vendor/plugins/rspec/lib/spec/interop/test/unit/autorunner.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-class Test::Unit::AutoRunner
- remove_method :process_args
- def process_args(argv)
- true
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/interop/test/unit/testcase.rb b/vendor/plugins/rspec/lib/spec/interop/test/unit/testcase.rb
deleted file mode 100644
index db1a6819d..000000000
--- a/vendor/plugins/rspec/lib/spec/interop/test/unit/testcase.rb
+++ /dev/null
@@ -1,71 +0,0 @@
-require 'test/unit/testcase'
-
-module Test
- module Unit
- # This extension of the standard Test::Unit::TestCase makes RSpec
- # available from within, so that you can do things like:
- #
- # require 'test/unit'
- # require 'spec'
- #
- # class MyTest < Test::Unit::TestCase
- # it "should work with Test::Unit assertions" do
- # assert_equal 4, 2+1
- # end
- #
- # def test_should_work_with_rspec_expectations
- # (3+1).should == 5
- # end
- # end
- #
- # See also Spec::Example::ExampleGroup
- class TestCase
- extend Spec::Example::ExampleGroupMethods
- include Spec::Example::ExampleMethods
-
- before(:each) {setup}
- after(:each) {teardown}
-
- class << self
- def suite
- Test::Unit::TestSuiteAdapter.new(self)
- end
-
- def example_method?(method_name)
- should_method?(method_name) || test_method?(method_name)
- end
-
- def test_method?(method_name)
- method_name =~ /^test[_A-Z]./ && (
- instance_method(method_name).arity == 0 ||
- instance_method(method_name).arity == -1
- )
- end
- end
-
- def initialize(defined_description, options={}, &implementation)
- @_defined_description = defined_description
-
- # TODO - examples fail in rspec-rails if we remove "|| pending_implementation"
- # - find a way to fail without it in rspec's code examples
- @_implementation = implementation || pending_implementation
-
- @_result = ::Test::Unit::TestResult.new
- # @method_name is important to set here because it "complies" with Test::Unit's interface.
- # Some Test::Unit extensions depend on @method_name being present.
- @method_name = @_defined_description
- end
-
- def run(ignore_this_argument=nil)
- super()
- end
-
- private
-
- def pending_implementation
- error = Spec::Example::NotYetImplementedError.new(caller)
- lambda { raise(error) }
- end
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/interop/test/unit/testresult.rb b/vendor/plugins/rspec/lib/spec/interop/test/unit/testresult.rb
deleted file mode 100644
index 1386dc728..000000000
--- a/vendor/plugins/rspec/lib/spec/interop/test/unit/testresult.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-class Test::Unit::TestResult
- alias_method :tu_passed?, :passed?
- def passed?
- return tu_passed? & ::Spec.run
- end
-end
\ No newline at end of file
diff --git a/vendor/plugins/rspec/lib/spec/interop/test/unit/testsuite_adapter.rb b/vendor/plugins/rspec/lib/spec/interop/test/unit/testsuite_adapter.rb
deleted file mode 100644
index 7c0ed092d..000000000
--- a/vendor/plugins/rspec/lib/spec/interop/test/unit/testsuite_adapter.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-module Test
- module Unit
- class TestSuiteAdapter < TestSuite
- attr_reader :example_group, :examples
- alias_method :tests, :examples
- def initialize(example_group)
- @example_group = example_group
- @examples = example_group.examples
- end
-
- def name
- example_group.description
- end
-
- def run(*args)
- return true unless args.empty?
- example_group.run
- end
-
- def size
- example_group.number_of_examples
- end
-
- def delete(example)
- examples.delete example
- end
-
- def empty?
- examples.empty?
- end
- end
- end
-end
-
diff --git a/vendor/plugins/rspec/lib/spec/interop/test/unit/ui/console/testrunner.rb b/vendor/plugins/rspec/lib/spec/interop/test/unit/ui/console/testrunner.rb
deleted file mode 100644
index 8e9995e02..000000000
--- a/vendor/plugins/rspec/lib/spec/interop/test/unit/ui/console/testrunner.rb
+++ /dev/null
@@ -1,61 +0,0 @@
-require 'test/unit/ui/console/testrunner'
-
-module Test
- module Unit
- module UI
- module Console
- class TestRunner
-
- alias_method :started_without_rspec, :started
- def started_with_rspec(result)
- @result = result
- @need_to_output_started = true
- end
- alias_method :started, :started_with_rspec
-
- alias_method :test_started_without_rspec, :test_started
- def test_started_with_rspec(name)
- if @need_to_output_started
- if @rspec_io
- @rspec_io.rewind
- output(@rspec_io.read)
- end
- output("Started")
- @need_to_output_started = false
- end
- test_started_without_rspec(name)
- end
- alias_method :test_started, :test_started_with_rspec
-
- alias_method :test_finished_without_rspec, :test_finished
- def test_finished_with_rspec(name)
- test_finished_without_rspec(name)
- @ran_test = true
- end
- alias_method :test_finished, :test_finished_with_rspec
-
- alias_method :finished_without_rspec, :finished
- def finished_with_rspec(elapsed_time)
- @ran_test ||= false
- if @ran_test
- finished_without_rspec(elapsed_time)
- end
- end
- alias_method :finished, :finished_with_rspec
-
- alias_method :setup_mediator_without_rspec, :setup_mediator
- def setup_mediator_with_rspec
- orig_io = @io
- @io = StringIO.new
- setup_mediator_without_rspec
- ensure
- @rspec_io = @io
- @io = orig_io
- end
- alias_method :setup_mediator, :setup_mediator_with_rspec
-
- end
- end
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/matchers.rb b/vendor/plugins/rspec/lib/spec/matchers.rb
deleted file mode 100644
index 16e7eeed6..000000000
--- a/vendor/plugins/rspec/lib/spec/matchers.rb
+++ /dev/null
@@ -1,162 +0,0 @@
-require 'spec/matchers/simple_matcher'
-require 'spec/matchers/be'
-require 'spec/matchers/be_close'
-require 'spec/matchers/change'
-require 'spec/matchers/eql'
-require 'spec/matchers/equal'
-require 'spec/matchers/exist'
-require 'spec/matchers/has'
-require 'spec/matchers/have'
-require 'spec/matchers/include'
-require 'spec/matchers/match'
-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
-
- # RSpec ships with a number of useful Expression Matchers. An Expression Matcher
- # is any object that responds to the following methods:
- #
- # matches?(actual)
- # failure_message
- # negative_failure_message #optional
- # description #optional
- #
- # See Spec::Expectations to learn how to use these as Expectation Matchers.
- # See Spec::Mocks to learn how to use them as Mock Argument Constraints.
- #
- # == Predicates
- #
- # In addition to those Expression Matchers that are defined explicitly, RSpec will
- # create custom Matchers on the fly for any arbitrary predicate, giving your specs
- # a much more natural language feel.
- #
- # A Ruby predicate is a method that ends with a "?" and returns true or false.
- # Common examples are +empty?+, +nil?+, and +instance_of?+.
- #
- # All you need to do is write +should be_+ followed by the predicate without
- # the question mark, and RSpec will figure it out from there. For example:
- #
- # [].should be_empty => [].empty? #passes
- # [].should_not be_empty => [].empty? #fails
- #
- # In addtion to prefixing the predicate matchers with "be_", you can also use "be_a_"
- # and "be_an_", making your specs read much more naturally:
- #
- # "a string".should be_an_instance_of(String) =>"a string".instance_of?(String) #passes
- #
- # 3.should be_a_kind_of(Fixnum) => 3.kind_of?(Numeric) #passes
- # 3.should be_a_kind_of(Numeric) => 3.kind_of?(Numeric) #passes
- # 3.should be_an_instance_of(Fixnum) => 3.instance_of?(Fixnum) #passes
- # 3.should_not be_instance_of(Numeric) => 3.instance_of?(Numeric) #fails
- #
- # RSpec will also create custom matchers for predicates like +has_key?+. To
- # use this feature, just state that the object should have_key(:key) and RSpec will
- # call has_key?(:key) on the target. For example:
- #
- # {:a => "A"}.should have_key(:a) => {:a => "A"}.has_key?(:a) #passes
- # {:a => "A"}.should have_key(:b) => {:a => "A"}.has_key?(:b) #fails
- #
- # You can use this feature to invoke any predicate that begins with "has_", whether it is
- # part of the Ruby libraries (like +Hash#has_key?+) or a method you wrote on your own class.
- #
- # == Custom Expectation Matchers
- #
- # When you find that none of the stock Expectation Matchers provide a natural
- # feeling expectation, you can very easily write your own.
- #
- # For example, imagine that you are writing a game in which players can
- # be in various zones on a virtual board. To specify that bob should
- # be in zone 4, you could say:
- #
- # bob.current_zone.should eql(Zone.new("4"))
- #
- # But you might find it more expressive to say:
- #
- # bob.should be_in_zone("4")
- #
- # and/or
- #
- # bob.should_not be_in_zone("3")
- #
- # To do this, you would need to write a class like this:
- #
- # class BeInZone
- # def initialize(expected)
- # @expected = expected
- # end
- # def matches?(target)
- # @target = target
- # @target.current_zone.eql?(Zone.new(@expected))
- # end
- # def failure_message
- # "expected #{@target.inspect} to be in Zone #{@expected}"
- # end
- # def negative_failure_message
- # "expected #{@target.inspect} not to be in Zone #{@expected}"
- # end
- # end
- #
- # ... and a method like this:
- #
- # def be_in_zone(expected)
- # BeInZone.new(expected)
- # end
- #
- # And then expose the method to your specs. This is normally done
- # by including the method and the class in a module, which is then
- # included in your spec:
- #
- # module CustomGameMatchers
- # class BeInZone
- # ...
- # end
- #
- # def be_in_zone(expected)
- # ...
- # end
- # end
- #
- # describe "Player behaviour" do
- # include CustomGameMatchers
- # ...
- # end
- #
- # or you can include in globally in a spec_helper.rb file required
- # from your spec file(s):
- #
- # Spec::Runner.configure do |config|
- # config.include(CustomGameMatchers)
- # end
- #
- module Matchers
- module ModuleMethods
- attr_accessor :last_matcher, :last_should
-
- def clear_generated_description
- self.last_matcher = nil
- self.last_should = nil
- end
-
- def generated_description
- last_should.nil? ? nil :
- "#{last_should} #{last_matcher.respond_to?(:description) ? last_matcher.description : 'NO NAME'}"
- end
- end
-
- extend ModuleMethods
-
- def method_missing(sym, *args, &block) # :nodoc:
- return Matchers::Be.new(sym, *args) if sym.starts_with?("be_")
- return Matchers::Has.new(sym, *args) if sym.starts_with?("have_")
- super
- end
-
- class MatcherError < StandardError
- end
-
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/matchers/be.rb b/vendor/plugins/rspec/lib/spec/matchers/be.rb
deleted file mode 100644
index 0f94677df..000000000
--- a/vendor/plugins/rspec/lib/spec/matchers/be.rb
+++ /dev/null
@@ -1,221 +0,0 @@
-module Spec
- module Matchers
-
- class Be #:nodoc:
- def initialize(*args)
- if args.empty?
- @expected = :satisfy_if
- else
- @expected = parse_expected(args.shift)
- end
- @args = args
- @comparison = ""
- end
-
- def matches?(given)
- @given = given
- if handling_predicate?
- begin
- return @result = given.__send__(predicate, *@args)
- rescue => 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 = "http://eigenclass.org/hiki.rb?rcov-0.8.0"
- end
-
- begin
- return @result = given.__send__(present_tense_predicate, *@args)
- rescue
- raise predicate_error
- end
- else
- return match_or_compare
- end
- end
-
- def failure_message
- return "expected #{@comparison}#{expected}, got #{@given.inspect}" unless handling_predicate?
- return "expected #{predicate}#{args_to_s} to return true, got #{@result.inspect}"
- end
-
- def negative_failure_message
- return "expected not #{expected}, got #{@given.inspect}" unless handling_predicate?
- return "expected #{predicate}#{args_to_s} to return false, got #{@result.inspect}"
- end
-
- def expected
- return "if to be satisfied" if @expected == :satisfy_if
- return true if @expected == :true
- return false if @expected == :false
- return "nil" if @expected == :nil
- return @expected.inspect
- end
-
- def match_or_compare
- return @given ? true : false if @expected == :satisfy_if
- return @given == true if @expected == :true
- return @given == false if @expected == :false
- return @given.nil? if @expected == :nil
- return @given < @expected if @less_than
- return @given <= @expected if @less_than_or_equal
- return @given >= @expected if @greater_than_or_equal
- return @given > @expected if @greater_than
- return @given == @expected if @double_equal
- return @given === @expected if @triple_equal
- return @given.equal?(@expected)
- end
-
- def ==(expected)
- @prefix = "be "
- @double_equal = true
- @comparison = "== "
- @expected = expected
- self
- end
-
- def ===(expected)
- @prefix = "be "
- @triple_equal = true
- @comparison = "=== "
- @expected = expected
- self
- end
-
- def <(expected)
- @prefix = "be "
- @less_than = true
- @comparison = "< "
- @expected = expected
- self
- end
-
- def <=(expected)
- @prefix = "be "
- @less_than_or_equal = true
- @comparison = "<= "
- @expected = expected
- self
- end
-
- def >=(expected)
- @prefix = "be "
- @greater_than_or_equal = true
- @comparison = ">= "
- @expected = expected
- self
- end
-
- def >(expected)
- @prefix = "be "
- @greater_than = true
- @comparison = "> "
- @expected = expected
- self
- end
-
- def description
- "#{prefix_to_sentence}#{comparison}#{expected_to_sentence}#{args_to_sentence}"
- end
-
- private
- def parse_expected(expected)
- if Symbol === expected
- @handling_predicate = true
- ["be_an_","be_a_","be_"].each do |prefix|
- if expected.starts_with?(prefix)
- @prefix = prefix
- return "#{expected.to_s.sub(@prefix,"")}".to_sym
- end
- end
- end
- @prefix = ""
- return expected
- end
-
- def handling_predicate?
- return false if [:true, :false, :nil].include?(@expected)
- return @handling_predicate
- end
-
- def predicate
- "#{@expected.to_s}?".to_sym
- end
-
- def present_tense_predicate
- "#{@expected.to_s}s?".to_sym
- end
-
- def args_to_s
- return "" if @args.empty?
- inspected_args = @args.collect{|a| a.inspect}
- return "(#{inspected_args.join(', ')})"
- end
-
- def comparison
- @comparison
- end
-
- def expected_to_sentence
- split_words(@expected)
- end
-
- def prefix_to_sentence
- split_words(@prefix)
- end
-
- def split_words(sym)
- sym.to_s.gsub(/_/,' ')
- end
-
- def args_to_sentence
- case @args.length
- when 0
- ""
- when 1
- " #{@args[0]}"
- else
- " #{@args[0...-1].join(', ')} and #{@args[-1]}"
- end
- end
-
- end
-
- # :call-seq:
- # should be
- # should be_true
- # should be_false
- # should be_nil
- # should be_arbitrary_predicate(*args)
- # should_not be_nil
- # should_not be_arbitrary_predicate(*args)
- #
- # Given true, false, or nil, will pass if given 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 "?" and returns true or false.
- # Given be_ followed by arbitrary_predicate (without the "?"), RSpec will match
- # convert that into a query against the target object.
- #
- # The arbitrary_predicate feature will handle any predicate
- # prefixed with "be_an_" (e.g. be_an_instance_of), "be_a_" (e.g. be_a_kind_of)
- # or "be_" (e.g. be_empty), letting you choose the prefix that best suits the predicate.
- #
- # == Examples
- #
- # target.should be
- # target.should be_true
- # target.should be_false
- # target.should be_nil
- # target.should_not be_nil
- #
- # collection.should be_empty #passes if target.empty?
- # "this string".should be_an_intance_of(String)
- #
- # target.should_not be_empty #passes unless target.empty?
- # target.should_not be_old_enough(16) #passes unless target.old_enough?(16)
- def be(*args)
- Matchers::Be.new(*args)
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/matchers/be_close.rb b/vendor/plugins/rspec/lib/spec/matchers/be_close.rb
deleted file mode 100644
index 888df5a26..000000000
--- a/vendor/plugins/rspec/lib/spec/matchers/be_close.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-module Spec
- module Matchers
-
- class BeClose #:nodoc:
- def initialize(expected, delta)
- @expected = expected
- @delta = delta
- end
-
- def matches?(given)
- @given = given
- (@given - @expected).abs < @delta
- end
-
- def failure_message
- "expected #{@expected} +/- (< #{@delta}), got #{@given}"
- end
-
- def description
- "be close to #{@expected} (within +- #{@delta})"
- end
- end
-
- # :call-seq:
- # should be_close(expected, delta)
- # should_not be_close(expected, delta)
- #
- # Passes if given == expected +/- delta
- #
- # == Example
- #
- # result.should be_close(3.0, 0.5)
- def be_close(expected, delta)
- Matchers::BeClose.new(expected, delta)
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/matchers/change.rb b/vendor/plugins/rspec/lib/spec/matchers/change.rb
deleted file mode 100644
index d3a5f6c1f..000000000
--- a/vendor/plugins/rspec/lib/spec/matchers/change.rb
+++ /dev/null
@@ -1,148 +0,0 @@
-module Spec
- module Matchers
-
- #Based on patch from Wilson Bilkovich
- class Change #:nodoc:
- def initialize(receiver=nil, message=nil, &block)
- @message = message || "result"
- @value_proc = block || lambda {
- receiver.__send__(message)
- }
- end
-
- 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) >= @minimum) if @minimum
- return ((@after - @before) <= @maximum) if @maximum
- return @before != @after
- end
-
- def raise_block_syntax_error
- raise MatcherError.new(<<-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
- "#{@message} should have been changed to #{@to.inspect}, but is now #{@after.inspect}"
- elsif @from
- "#{@message} should have initially been #{@from.inspect}, but was #{@before.inspect}"
- elsif @amount
- "#{@message} should have been changed by #{@amount.inspect}, but was changed by #{actual_delta.inspect}"
- elsif @minimum
- "#{@message} should have been changed by at least #{@minimum.inspect}, but was changed by #{actual_delta.inspect}"
- elsif @maximum
- "#{@message} should have been changed by at most #{@maximum.inspect}, but was changed by #{actual_delta.inspect}"
- else
- "#{@message} should have changed, but is still #{@before.inspect}"
- end
- end
-
- def actual_delta
- @after - @before
- end
-
- def negative_failure_message
- "#{@message} should not have changed, but did change from #{@before.inspect} to #{@after.inspect}"
- end
-
- def by(amount)
- @amount = amount
- self
- end
-
- def by_at_least(minimum)
- @minimum = minimum
- self
- end
-
- def by_at_most(maximum)
- @maximum = maximum
- self
- end
-
- def to(to)
- @to = to
- self
- end
-
- def from (from)
- @from = from
- self
- end
- end
-
- # :call-seq:
- # should change(receiver, message, &block)
- # should change(receiver, message, &block).by(value)
- # should change(receiver, message, &block).from(old).to(new)
- # should_not change(receiver, message, &block)
- #
- # Allows you to specify that a Proc will cause some value to change.
- #
- # == Examples
- #
- # lambda {
- # team.add_player(player)
- # }.should change(roster, :count)
- #
- # lambda {
- # team.add_player(player)
- # }.should change(roster, :count).by(1)
- #
- # lambda {
- # team.add_player(player)
- # }.should change(roster, :count).by_at_least(1)
- #
- # lambda {
- # team.add_player(player)
- # }.should change(roster, :count).by_at_most(1)
- #
- # string = "string"
- # lambda {
- # string.reverse!
- # }.should change { string }.from("string").to("gnirts")
- #
- # lambda {
- # person.happy_birthday
- # }.should change(person, :birthday).from(32).to(33)
- #
- # lambda {
- # employee.develop_great_new_social_networking_app
- # }.should change(employee, :title).from("Mail Clerk").to("CEO")
- #
- # Evaluates receiver.message or block before and after
- # it evaluates the c object (generated by the lambdas in the examples
- # above).
- #
- # Then compares the values before and after the receiver.message
- # and evaluates the difference compared to the expected difference.
- #
- # == 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 should change and should_not
- # change must use the {} form (do/end is not
- # supported).
- #
- def change(receiver=nil, message=nil, &block)
- Matchers::Change.new(receiver, message, &block)
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/matchers/eql.rb b/vendor/plugins/rspec/lib/spec/matchers/eql.rb
deleted file mode 100644
index 1985a91d8..000000000
--- a/vendor/plugins/rspec/lib/spec/matchers/eql.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-module Spec
- module Matchers
-
- class Eql #:nodoc:
- def initialize(expected)
- @expected = expected
- end
-
- def matches?(given)
- @given = given
- @given.eql?(@expected)
- end
-
- def failure_message
- return "expected #{@expected.inspect}, got #{@given.inspect} (using .eql?)", @expected, @given
- end
-
- def negative_failure_message
- return "expected #{@given.inspect} not to equal #{@expected.inspect} (using .eql?)", @expected, @given
- end
-
- def description
- "eql #{@expected.inspect}"
- end
- end
-
- # :call-seq:
- # should eql(expected)
- # should_not eql(expected)
- #
- # Passes if given and expected are of equal value, but not necessarily the same object.
- #
- # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more information about equality in Ruby.
- #
- # == Examples
- #
- # 5.should eql(5)
- # 5.should_not eql(3)
- def eql(expected)
- Matchers::Eql.new(expected)
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/matchers/equal.rb b/vendor/plugins/rspec/lib/spec/matchers/equal.rb
deleted file mode 100644
index e13617308..000000000
--- a/vendor/plugins/rspec/lib/spec/matchers/equal.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-module Spec
- module Matchers
-
- class Equal #:nodoc:
- def initialize(expected)
- @expected = expected
- end
-
- def matches?(given)
- @given = given
- @given.equal?(@expected)
- end
-
- def failure_message
- return "expected #{@expected.inspect}, got #{@given.inspect} (using .equal?)", @expected, @given
- end
-
- def negative_failure_message
- return "expected #{@given.inspect} not to equal #{@expected.inspect} (using .equal?)", @expected, @given
- end
-
- def description
- "equal #{@expected.inspect}"
- end
- end
-
- # :call-seq:
- # should equal(expected)
- # should_not equal(expected)
- #
- # 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.
- #
- # == Examples
- #
- # 5.should equal(5) #Fixnums are equal
- # "5".should_not equal("5") #Strings that look the same are not the same object
- def equal(expected)
- Matchers::Equal.new(expected)
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/matchers/exist.rb b/vendor/plugins/rspec/lib/spec/matchers/exist.rb
deleted file mode 100644
index b6fc0927d..000000000
--- a/vendor/plugins/rspec/lib/spec/matchers/exist.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-module Spec
- module Matchers
- class Exist
- def matches?(given)
- @given = given
- @given.exist?
- end
- def failure_message
- "expected #{@given.inspect} to exist, but it doesn't."
- end
- def negative_failure_message
- "expected #{@given.inspect} to not exist, but it does."
- end
- end
- # :call-seq:
- # should exist
- # should_not exist
- #
- # Passes if given.exist?
- def exist; Exist.new; end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/matchers/has.rb b/vendor/plugins/rspec/lib/spec/matchers/has.rb
deleted file mode 100644
index 6b412bbbc..000000000
--- a/vendor/plugins/rspec/lib/spec/matchers/has.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-module Spec
- module Matchers
-
- class Has #:nodoc:
- def initialize(sym, *args)
- @sym = sym
- @args = args
- end
-
- def matches?(given)
- given.__send__(predicate, *@args)
- end
-
- def failure_message
- "expected ##{predicate}(#{@args[0].inspect}) to return true, got false"
- end
-
- def negative_failure_message
- "expected ##{predicate}(#{@args[0].inspect}) to return false, got true"
- end
-
- def description
- "have key #{@args[0].inspect}"
- end
-
- private
- def predicate
- "#{@sym.to_s.sub("have_","has_")}?".to_sym
- end
-
- end
-
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/matchers/have.rb b/vendor/plugins/rspec/lib/spec/matchers/have.rb
deleted file mode 100644
index e33af96ce..000000000
--- a/vendor/plugins/rspec/lib/spec/matchers/have.rb
+++ /dev/null
@@ -1,150 +0,0 @@
-module Spec
- module Matchers
- class Have #:nodoc:
- def initialize(expected, relativity=:exactly)
- @expected = (expected == :no ? 0 : expected)
- @relativity = relativity
- end
-
- def relativities
- @relativities ||= {
- :exactly => "",
- :at_least => "at least ",
- :at_most => "at most "
- }
- end
-
- def matches?(collection_owner)
- if collection_owner.respond_to?(@collection_name)
- collection = collection_owner.__send__(@collection_name, *@args, &@block)
- elsif (@plural_collection_name && collection_owner.respond_to?(@plural_collection_name))
- collection = collection_owner.__send__(@plural_collection_name, *@args, &@block)
- elsif (collection_owner.respond_to?(:length) || collection_owner.respond_to?(:size))
- collection = collection_owner
- else
- collection_owner.__send__(@collection_name, *@args, &@block)
- end
- @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 >= @expected if @relativity == :at_least
- return @given <= @expected if @relativity == :at_most
- return @given == @expected
- end
-
- def not_a_collection
- "expected #{@collection_name} to be a collection but it does not respond to #length or #size"
- end
-
- def failure_message
- "expected #{relative_expectation} #{@collection_name}, got #{@given}"
- end
-
- def negative_failure_message
- if @relativity == :exactly
- return "expected target not to have #{@expected} #{@collection_name}, got #{@given}"
- elsif @relativity == :at_most
- return <<-EOF
-Isn't life confusing enough?
-Instead of having to figure out the meaning of this:
- should_not have_at_most(#{@expected}).#{@collection_name}
-We recommend that you use this instead:
- should have_at_least(#{@expected + 1}).#{@collection_name}
-EOF
- elsif @relativity == :at_least
- return <<-EOF
-Isn't life confusing enough?
-Instead of having to figure out the meaning of this:
- should_not have_at_least(#{@expected}).#{@collection_name}
-We recommend that you use this instead:
- should have_at_most(#{@expected - 1}).#{@collection_name}
-EOF
- end
- end
-
- def description
- "have #{relative_expectation} #{@collection_name}"
- end
-
- def respond_to?(sym)
- @expected.respond_to?(sym) || super
- end
-
- private
-
- def method_missing(sym, *args, &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
- "#{relativities[@relativity]}#{@expected}"
- end
- end
-
- # :call-seq:
- # should have(number).named_collection__or__sugar
- # should_not have(number).named_collection__or__sugar
- #
- # Passes if receiver is a collection with the submitted
- # number of items OR if the receiver OWNS a collection
- # with the submitted number of items.
- #
- # If the receiver OWNS the collection, you must use the name
- # of the collection. So if a Team instance has a
- # collection named #players, you must use that name
- # to set the expectation.
- #
- # If the receiver IS the collection, you can use any name
- # you like for named_collection. We'd recommend using
- # either "elements", "members", or "items" as these are all
- # standard ways of describing the things IN a collection.
- #
- # This also works for Strings, letting you set an expectation
- # about its length
- #
- # == Examples
- #
- # # Passes if team.players.size == 11
- # team.should have(11).players
- #
- # # Passes if [1,2,3].length == 3
- # [1,2,3].should have(3).items #"items" is pure sugar
- #
- # # Passes if "this string".length == 11
- # "this string".should have(11).characters #"characters" is pure sugar
- def have(n)
- Matchers::Have.new(n)
- end
- alias :have_exactly :have
-
- # :call-seq:
- # should have_at_least(number).items
- #
- # Exactly like have() with >=.
- #
- # == Warning
- #
- # +should_not+ +have_at_least+ is not supported
- def have_at_least(n)
- Matchers::Have.new(n, :at_least)
- end
-
- # :call-seq:
- # should have_at_most(number).items
- #
- # Exactly like have() with <=.
- #
- # == Warning
- #
- # +should_not+ +have_at_most+ is not supported
- def have_at_most(n)
- Matchers::Have.new(n, :at_most)
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/matchers/include.rb b/vendor/plugins/rspec/lib/spec/matchers/include.rb
deleted file mode 100644
index 7ae297bed..000000000
--- a/vendor/plugins/rspec/lib/spec/matchers/include.rb
+++ /dev/null
@@ -1,77 +0,0 @@
-module Spec
- module Matchers
-
- class Include #:nodoc:
-
- def initialize(*expecteds)
- @expecteds = expecteds
- end
-
- def matches?(given)
- @given = given
- @expecteds.each do |expected|
- case given
- when Hash
- expected.each_pair do |k,v|
- return false unless given[k] == v
- end
- else
- return false unless given.include?(expected)
- end
- end
- true
- end
-
- def failure_message
- _message
- end
-
- def negative_failure_message
- _message("not ")
- end
-
- def description
- "include #{_pretty_print(@expecteds)}"
- end
-
- private
- def _message(maybe_not="")
- "expected #{@given.inspect} #{maybe_not}to include #{_pretty_print(@expecteds)}"
- end
-
- def _pretty_print(array)
- result = ""
- array.each_with_index do |item, index|
- if index < (array.length - 2)
- result << "#{item.inspect}, "
- elsif index < (array.length - 1)
- result << "#{item.inspect} and "
- else
- result << "#{item.inspect}"
- end
- end
- result
- end
- end
-
- # :call-seq:
- # should include(expected)
- # should_not include(expected)
- #
- # Passes if given includes expected. This works for
- # collections and Strings. You can also pass in multiple args
- # and it will only pass if all args are found in collection.
- #
- # == Examples
- #
- # [1,2,3].should include(3)
- # [1,2,3].should include(2,3) #would pass
- # [1,2,3].should include(2,3,4) #would fail
- # [1,2,3].should_not include(4)
- # "spread".should include("read")
- # "spread".should_not include("red")
- def include(*expected)
- Matchers::Include.new(*expected)
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/matchers/match.rb b/vendor/plugins/rspec/lib/spec/matchers/match.rb
deleted file mode 100644
index dc3d5822e..000000000
--- a/vendor/plugins/rspec/lib/spec/matchers/match.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-module Spec
- module Matchers
-
- class Match #:nodoc:
- def initialize(regexp)
- @regexp = regexp
- end
-
- def matches?(given)
- @given = given
- return true if given =~ @regexp
- return false
- end
-
- def failure_message
- return "expected #{@given.inspect} to match #{@regexp.inspect}", @regexp, @given
- end
-
- def negative_failure_message
- return "expected #{@given.inspect} not to match #{@regexp.inspect}", @regexp, @given
- end
-
- def description
- "match #{@regexp.inspect}"
- end
- end
-
- # :call-seq:
- # should match(regexp)
- # should_not match(regexp)
- #
- # Given a Regexp, passes if given =~ regexp
- #
- # == Examples
- #
- # email.should match(/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i)
- def match(regexp)
- Matchers::Match.new(regexp)
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/matchers/operator_matcher.rb b/vendor/plugins/rspec/lib/spec/matchers/operator_matcher.rb
deleted file mode 100755
index b1a345584..000000000
--- a/vendor/plugins/rspec/lib/spec/matchers/operator_matcher.rb
+++ /dev/null
@@ -1,79 +0,0 @@
-module Spec
- module Matchers
- class BaseOperatorMatcher
- attr_reader :generated_description
-
- def initialize(given)
- @given = given
- end
-
- def ==(expected)
- @expected = expected
- __delegate_method_missing_to_given("==", expected)
- end
-
- def ===(expected)
- @expected = expected
- __delegate_method_missing_to_given("===", expected)
- end
-
- def =~(expected)
- @expected = expected
- __delegate_method_missing_to_given("=~", expected)
- end
-
- def >(expected)
- @expected = expected
- __delegate_method_missing_to_given(">", expected)
- end
-
- def >=(expected)
- @expected = expected
- __delegate_method_missing_to_given(">=", expected)
- end
-
- def <(expected)
- @expected = expected
- __delegate_method_missing_to_given("<", expected)
- end
-
- def <=(expected)
- @expected = expected
- __delegate_method_missing_to_given("<=", expected)
- end
-
- def fail_with_message(message)
- Spec::Expectations.fail_with(message, @expected, @given)
- end
-
- def description
- "#{@operator} #{@expected.inspect}"
- end
-
- end
-
- class PositiveOperatorMatcher < BaseOperatorMatcher #:nodoc:
-
- def __delegate_method_missing_to_given(operator, expected)
- @operator = operator
- ::Spec::Matchers.last_matcher = self
- return true if @given.__send__(operator, expected)
- return fail_with_message("expected: #{expected.inspect},\n got: #{@given.inspect} (using #{operator})") if ['==','===', '=~'].include?(operator)
- return fail_with_message("expected: #{operator} #{expected.inspect},\n got: #{operator.gsub(/./, ' ')} #{@given.inspect}")
- end
-
- end
-
- class NegativeOperatorMatcher < BaseOperatorMatcher #:nodoc:
-
- def __delegate_method_missing_to_given(operator, expected)
- @operator = operator
- ::Spec::Matchers.last_matcher = self
- return true unless @given.__send__(operator, expected)
- return fail_with_message("expected not: #{operator} #{expected.inspect},\n got: #{operator.gsub(/./, ' ')} #{@given.inspect}")
- end
-
- end
-
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/matchers/raise_error.rb b/vendor/plugins/rspec/lib/spec/matchers/raise_error.rb
deleted file mode 100644
index fcd76ca3c..000000000
--- a/vendor/plugins/rspec/lib/spec/matchers/raise_error.rb
+++ /dev/null
@@ -1,132 +0,0 @@
-module Spec
- module Matchers
- class RaiseError #:nodoc:
- def initialize(expected_error_or_message=Exception, expected_message=nil, &block)
- @block = block
- case expected_error_or_message
- when String, Regexp
- @expected_error, @expected_message = Exception, expected_error_or_message
- else
- @expected_error, @expected_message = expected_error_or_message, expected_message
- end
- end
-
- def matches?(given_proc)
- @raised_expected_error = false
- @with_expected_message = false
- @eval_block = false
- @eval_block_passed = false
- begin
- given_proc.call
- rescue @expected_error => @given_error
- @raised_expected_error = true
- @with_expected_message = verify_message
- rescue Exception => @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 = "http://eigenclass.org/hiki.rb?rcov-0.8.0"
- end
-
- unless negative_expectation?
- eval_block if @raised_expected_error && @with_expected_message && @block
- end
- ensure
- return (@raised_expected_error && @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 => err
- @given_error = err
- end
- end
-
- def verify_message
- case @expected_message
- when nil
- return true
- when Regexp
- return @expected_message =~ @given_error.message
- else
- return @expected_message == @given_error.message
- end
- end
-
- def failure_message
- if @eval_block
- return @given_error.message
- else
- return "expected #{expected_error}#{given_error}"
- end
- end
-
- def negative_failure_message
- "expected no #{expected_error}#{given_error}"
- end
-
- def description
- "raise #{expected_error}"
- end
-
- private
- def expected_error
- case @expected_message
- when nil
- @expected_error
- when Regexp
- "#{@expected_error} with message matching #{@expected_message.inspect}"
- else
- "#{@expected_error} with #{@expected_message.inspect}"
- end
- end
-
- def given_error
- @given_error.nil? ? " but nothing was raised" : ", got #{@given_error.inspect}"
- 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
-
- # :call-seq:
- # should raise_error()
- # 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)
- # should_not raise_error(NamedError, Regexp)
- #
- # With no args, matches if any error is raised.
- # 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, "that was too risky")
- # lambda { do_something_risky }.should raise_error(PoorRiskDecisionError, /oo ri/)
- #
- # lambda { do_something_risky }.should_not raise_error
- # lambda { do_something_risky }.should_not raise_error(PoorRiskDecisionError)
- # lambda { do_something_risky }.should_not raise_error(PoorRiskDecisionError, "that was too risky")
- # lambda { do_something_risky }.should_not raise_error(PoorRiskDecisionError, /oo ri/)
- def raise_error(error=Exception, message=nil, &block)
- Matchers::RaiseError.new(error, message, &block)
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/matchers/respond_to.rb b/vendor/plugins/rspec/lib/spec/matchers/respond_to.rb
deleted file mode 100644
index 560cdea31..000000000
--- a/vendor/plugins/rspec/lib/spec/matchers/respond_to.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-module Spec
- module Matchers
-
- class RespondTo #:nodoc:
- def initialize(*names)
- @names = names
- @names_not_responded_to = []
- end
-
- def matches?(given)
- @given = given
- @names.each do |name|
- unless given.respond_to?(name)
- @names_not_responded_to << name
- end
- end
- return @names_not_responded_to.empty?
- end
-
- def failure_message
- "expected #{@given.inspect} to respond to #{@names_not_responded_to.collect {|name| name.inspect }.join(', ')}"
- end
-
- def negative_failure_message
- "expected #{@given.inspect} not to respond to #{@names.collect {|name| name.inspect }.join(', ')}"
- end
-
- def description
- "respond to ##{@names.to_s}"
- end
- end
-
- # :call-seq:
- # should respond_to(*names)
- # should_not respond_to(*names)
- #
- # Matches if the target object responds to all of the names
- # provided. Names can be Strings or Symbols.
- #
- # == Examples
- #
- def respond_to(*names)
- Matchers::RespondTo.new(*names)
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/matchers/satisfy.rb b/vendor/plugins/rspec/lib/spec/matchers/satisfy.rb
deleted file mode 100644
index 3610453d3..000000000
--- a/vendor/plugins/rspec/lib/spec/matchers/satisfy.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-module Spec
- module Matchers
-
- class Satisfy #:nodoc:
- def initialize(&block)
- @block = block
- end
-
- def matches?(given, &block)
- @block = block if block
- @given = given
- @block.call(given)
- end
-
- def failure_message
- "expected #{@given} to satisfy block"
- end
-
- def negative_failure_message
- "expected #{@given} not to satisfy block"
- end
- end
-
- # :call-seq:
- # should satisfy {}
- # should_not satisfy {}
- #
- # Passes if the submitted block returns true. Yields target to the
- # block.
- #
- # Generally speaking, this should be thought of as a last resort when
- # you can't find any other way to specify the behaviour you wish to
- # specify.
- #
- # If you do find yourself in such a situation, you could always write
- # a custom matcher, which would likely make your specs more expressive.
- #
- # == Examples
- #
- # 5.should satisfy { |n|
- # n > 3
- # }
- def satisfy(&block)
- Matchers::Satisfy.new(&block)
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/matchers/simple_matcher.rb b/vendor/plugins/rspec/lib/spec/matchers/simple_matcher.rb
deleted file mode 100644
index 7588ecbbe..000000000
--- a/vendor/plugins/rspec/lib/spec/matchers/simple_matcher.rb
+++ /dev/null
@@ -1,132 +0,0 @@
-module Spec
- module Matchers
- class SimpleMatcher
- attr_writer :failure_message, :negative_failure_message, :description
-
- def initialize(description, &match_block)
- @description = description
- @match_block = match_block
- end
-
- 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
- @failure_message || (@description.nil? ? explanation : %[expected #{@description.inspect} but got #{@given.inspect}])
- end
-
- def negative_failure_message
- @negative_failure_message || (@description.nil? ? explanation : %[expected not to get #{@description.inspect}, but got #{@given.inspect}])
- end
-
- def explanation
- "No description provided. See RDoc for simple_matcher()"
- end
- end
-
- # 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 description argument will appear as part of any failure
- # message, and is also the source for auto-generated descriptions.
- #
- # The match_block 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 match_block should return a boolean: true
- # indicates a match, which will pass if you use should and fail
- # if you use should_not. false (or nil) indicates no match,
- # which will do the reverse: fail if you use should and pass if
- # you use should_not.
- #
- # An error in the match_block will bubble up, resulting in a
- # failure.
- #
- # == Example with default messages
- #
- # def be_even
- # simple_matcher("an even number") { |given| given % 2 == 0 }
- # end
- #
- # describe 2 do
- # it "should be even" do
- # 2.should be_even
- # end
- # end
- #
- # Given an odd number, this example would produce an error message stating:
- # expected "an even number", got 3.
- #
- # Unfortunately, if you're a fan of auto-generated descriptions, this will
- # produce "should an even number." Not the most desirable result. You can
- # control that using custom messages:
- #
- # == Example with custom messages
- #
- # def rhyme_with(expected)
- # simple_matcher("rhyme with #{expected.inspect}") do |given, matcher|
- # matcher.failure_message = "expected #{given.inspect} to rhyme with #{expected.inspect}"
- # matcher.negative_failure_message = "expected #{given.inspect} not to rhyme with #{expected.inspect}"
- # given.rhymes_with? expected
- # end
- # end
- #
- # # OR
- #
- # def rhyme_with(expected)
- # simple_matcher do |given, matcher|
- # matcher.description = "rhyme with #{expected.inspect}"
- # matcher.failure_message = "expected #{given.inspect} to rhyme with #{expected.inspect}"
- # matcher.negative_failure_message = "expected #{given.inspect} not to rhyme with #{expected.inspect}"
- # given.rhymes_with? expected
- # end
- # end
- #
- # describe "pecan" do
- # it "should rhyme with 'be gone'" do
- # nut = "pecan"
- # nut.extend Rhymer
- # nut.should rhyme_with("be gone")
- # end
- # end
- #
- # The resulting messages would be:
- # description: rhyme with "be gone"
- # failure_message: expected "pecan" to rhyme with "be gone"
- # negative failure_message: expected "pecan" not to rhyme with "be gone"
- #
- # == Wrapped Expectations
- #
- # Because errors will bubble up, it is possible to wrap other expectations
- # in a SimpleMatcher.
- #
- # def be_even
- # simple_matcher("an even number") { |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
- # (should) or negative (should_not), but not both.
- # The reason is that is you wrap a should and call the wrapper
- # with should_not, the correct result (the should
- # failing), will fail when you want it to pass.
- #
- def simple_matcher(description=nil, &match_block)
- SimpleMatcher.new(description, &match_block)
- end
- end
-end
\ No newline at end of file
diff --git a/vendor/plugins/rspec/lib/spec/matchers/throw_symbol.rb b/vendor/plugins/rspec/lib/spec/matchers/throw_symbol.rb
deleted file mode 100644
index 12a9c19fa..000000000
--- a/vendor/plugins/rspec/lib/spec/matchers/throw_symbol.rb
+++ /dev/null
@@ -1,74 +0,0 @@
-module Spec
- module Matchers
-
- class ThrowSymbol #:nodoc:
- def initialize(expected=nil)
- @expected = expected
- @actual = nil
- end
-
- def matches?(given_proc)
- begin
- given_proc.call
- rescue NameError => e
- raise e unless e.message =~ /uncaught throw/
- @actual = e.name.to_sym
- ensure
- if @expected.nil?
- return @actual.nil? ? false : true
- else
- return @actual == @expected
- end
- end
- end
-
- def failure_message
- if @actual
- "expected #{expected}, got #{@actual.inspect}"
- else
- "expected #{expected} but nothing was thrown"
- end
- end
-
- def negative_failure_message
- if @expected
- "expected #{expected} not to be thrown"
- else
- "expected no Symbol, got :#{@actual}"
- end
- end
-
- def description
- "throw #{expected}"
- end
-
- private
-
- def expected
- @expected.nil? ? "a Symbol" : @expected.inspect
- end
-
- end
-
- # :call-seq:
- # should throw_symbol()
- # should throw_symbol(:sym)
- # should_not throw_symbol()
- # should_not throw_symbol(:sym)
- #
- # Given a Symbol argument, matches if the given proc throws the specified Symbol.
- #
- # Given no argument, matches if a proc throws any Symbol.
- #
- # == Examples
- #
- # lambda { do_something_risky }.should throw_symbol
- # lambda { do_something_risky }.should throw_symbol(:that_was_risky)
- #
- # lambda { do_something_risky }.should_not throw_symbol
- # lambda { do_something_risky }.should_not throw_symbol(:that_was_risky)
- def throw_symbol(sym=nil)
- Matchers::ThrowSymbol.new(sym)
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/mocks.rb b/vendor/plugins/rspec/lib/spec/mocks.rb
deleted file mode 100644
index df993e635..000000000
--- a/vendor/plugins/rspec/lib/spec/mocks.rb
+++ /dev/null
@@ -1,200 +0,0 @@
-require 'spec/mocks/framework'
-require 'spec/mocks/extensions/object'
-
-module Spec
- # == Mocks and Stubs
- #
- # RSpec will create Mock Objects and Stubs for you at runtime, or attach stub/mock behaviour
- # to any of your real objects (Partial Mock/Stub). Because the underlying implementation
- # for mocks and stubs is the same, you can intermingle mock and stub
- # behaviour in either dynamically generated mocks or your pre-existing classes.
- # There is a semantic difference in how they are created, however,
- # which can help clarify the role it is playing within a given spec.
- #
- # == Mock Objects
- #
- # Mocks are objects that allow you to set and verify expectations that they will
- # receive specific messages during run time. They are very useful for specifying how the subject of
- # the spec interacts with its collaborators. This approach is widely known as "interaction
- # testing".
- #
- # Mocks are also very powerful as a design tool. As you are
- # driving the implementation of a given class, Mocks provide an anonymous
- # collaborator that can change in behaviour as quickly as you can write an expectation in your
- # spec. This flexibility allows you to design the interface of a collaborator that often
- # does not yet exist. As the shape of the class being specified becomes more clear, so do the
- # requirements for its collaborators - often leading to the discovery of new types that are
- # needed in your system.
- #
- # Read Endo-Testing[http://www.mockobjects.com/files/endotesting.pdf] for a much
- # more in depth description of this process.
- #
- # == Stubs
- #
- # Stubs are objects that allow you to set "stub" responses to
- # messages. As Martin Fowler points out on his site,
- # mocks_arent_stubs[http://www.martinfowler.com/articles/mocksArentStubs.html].
- # Paraphrasing Fowler's paraphrasing
- # of Gerard Meszaros: Stubs provide canned responses to messages they might receive in a test, while
- # mocks allow you to specify and, subsquently, verify that certain messages should be received during
- # the execution of a test.
- #
- # == Partial Mocks/Stubs
- #
- # RSpec also supports partial mocking/stubbing, allowing you to add stub/mock behaviour
- # to instances of your existing classes. This is generally
- # something to be avoided, because changes to the class can have ripple effects on
- # seemingly unrelated specs. When specs fail due to these ripple effects, the fact
- # that some methods are being mocked can make it difficult to understand why a
- # failure is occurring.
- #
- # That said, partials do allow you to expect and
- # verify interactions with class methods such as +#find+ and +#create+
- # on Ruby on Rails model classes.
- #
- # == Further Reading
- #
- # There are many different viewpoints about the meaning of mocks and stubs. If you are interested
- # in learning more, here is some recommended reading:
- #
- # * Mock Objects: http://www.mockobjects.com/
- # * Endo-Testing: http://www.mockobjects.com/files/endotesting.pdf
- # * Mock Roles, Not Objects: http://www.mockobjects.com/files/mockrolesnotobjects.pdf
- # * Test Double Patterns: http://xunitpatterns.com/Test%20Double%20Patterns.html
- # * Mocks aren't stubs: http://www.martinfowler.com/articles/mocksArentStubs.html
- #
- # == Creating a Mock
- #
- # You can create a mock in any specification (or setup) using:
- #
- # mock(name, options={})
- #
- # The optional +options+ argument is a +Hash+. Currently the only supported
- # option is +:null_object+. Setting this to true instructs the mock to ignore
- # any messages it hasn’t been told to expect – and quietly return itself. For example:
- #
- # mock("person", :null_object => true)
- #
- # == Creating a Stub
- #
- # You can create a stub in any specification (or setup) using:
- #
- # stub(name, stub_methods_and_values_hash)
- #
- # For example, if you wanted to create an object that always returns
- # "More?!?!?!" to "please_sir_may_i_have_some_more" you would do this:
- #
- # stub("Mr Sykes", :please_sir_may_i_have_some_more => "More?!?!?!")
- #
- # == Creating a Partial Mock
- #
- # You don't really "create" a partial mock, you simply add method stubs and/or
- # mock expectations to existing classes and objects:
- #
- # Factory.should_receive(:find).with(id).and_return(value)
- # obj.stub!(:to_i).and_return(3)
- # etc ...
- #
- # == Expecting Messages
- #
- # my_mock.should_receive(:sym)
- # my_mock.should_not_receive(:sym)
- #
- # == Expecting Arguments
- #
- # my_mock.should_receive(:sym).with(*args)
- # my_mock.should_not_receive(:sym).with(*args)
- #
- # == Argument Constraints using Expression Matchers
- #
- # Arguments that are passed to #with are compared with actual arguments received
- # using == by default. In cases in which you want to specify things about the arguments
- # rather than the arguments themselves, you can use any of the Expression Matchers.
- # They don't all make syntactic sense (they were primarily designed for use with
- # Spec::Expectations), but you are free to create your own custom Spec::Matchers.
- #
- # Spec::Mocks does provide one additional Matcher method named #ducktype.
- #
- # In addition, Spec::Mocks adds some keyword Symbols that you can use to
- # specify certain kinds of arguments:
- #
- # my_mock.should_receive(:sym).with(no_args())
- # my_mock.should_receive(:sym).with(any_args())
- # my_mock.should_receive(:sym).with(1, an_instance_of(Numeric), "b") #2nd argument can any type of Numeric
- # my_mock.should_receive(:sym).with(1, boolean(), "b") #2nd argument can true or false
- # my_mock.should_receive(:sym).with(1, /abc/, "b") #2nd argument can be any String matching the submitted Regexp
- # my_mock.should_receive(:sym).with(1, anything(), "b") #2nd argument can be anything at all
- # my_mock.should_receive(:sym).with(1, ducktype(:abs, :div), "b")
- # #2nd argument can be object that responds to #abs and #div
- #
- # == Receive Counts
- #
- # my_mock.should_receive(:sym).once
- # my_mock.should_receive(:sym).twice
- # my_mock.should_receive(:sym).exactly(n).times
- # my_mock.should_receive(:sym).at_least(:once)
- # my_mock.should_receive(:sym).at_least(:twice)
- # my_mock.should_receive(:sym).at_least(n).times
- # my_mock.should_receive(:sym).at_most(:once)
- # my_mock.should_receive(:sym).at_most(:twice)
- # my_mock.should_receive(:sym).at_most(n).times
- # my_mock.should_receive(:sym).any_number_of_times
- #
- # == Ordering
- #
- # my_mock.should_receive(:sym).ordered
- # my_mock.should_receive(:other_sym).ordered
- # #This will fail if the messages are received out of order
- #
- # == Setting Reponses
- #
- # Whether you are setting a mock expectation or a simple stub, you can tell the
- # object precisely how to respond:
- #
- # my_mock.should_receive(:sym).and_return(value)
- # my_mock.should_receive(:sym).exactly(3).times.and_return(value1, value2, value3)
- # # returns value1 the first time, value2 the second, etc
- # my_mock.should_receive(:sym).and_return { ... } #returns value returned by the block
- # my_mock.should_receive(:sym).and_raise(error)
- # #error can be an instantiated object or a class
- # #if it is a class, it must be instantiable with no args
- # my_mock.should_receive(:sym).and_throw(:sym)
- # my_mock.should_receive(:sym).and_yield(values,to,yield)
- # my_mock.should_receive(:sym).and_yield(values,to,yield).and_yield(some,other,values,this,time)
- # # for methods that yield to a block multiple times
- #
- # Any of these responses can be applied to a stub as well, but stubs do
- # not support any qualifiers about the message received (i.e. you can't specify arguments
- # or receive counts):
- #
- # my_mock.stub!(:sym).and_return(value)
- # my_mock.stub!(:sym).and_return(value1, value2, value3)
- # my_mock.stub!(:sym).and_raise(error)
- # my_mock.stub!(:sym).and_throw(:sym)
- # my_mock.stub!(:sym).and_yield(values,to,yield)
- # my_mock.stub!(:sym).and_yield(values,to,yield).and_yield(some,other,values,this,time)
- #
- # == Arbitrary Handling
- #
- # Once in a while you'll find that the available expectations don't solve the
- # particular problem you are trying to solve. Imagine that you expect the message
- # to come with an Array argument that has a specific length, but you don't care
- # what is in it. You could do this:
- #
- # my_mock.should_receive(:sym) do |arg|
- # arg.should be_an_istance_of(Array)
- # arg.length.should == 7
- # end
- #
- # Note that this would fail if the number of arguments received was different from
- # the number of block arguments (in this case 1).
- #
- # == Combining Expectation Details
- #
- # Combining the message name with specific arguments, receive counts and responses
- # you can get quite a bit of detail in your expectations:
- #
- # my_mock.should_receive(:<<).with("illegal value").once.and_raise(ArgumentError)
- module Mocks
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/mocks/argument_constraints.rb b/vendor/plugins/rspec/lib/spec/mocks/argument_constraints.rb
deleted file mode 100644
index 6f888b3da..000000000
--- a/vendor/plugins/rspec/lib/spec/mocks/argument_constraints.rb
+++ /dev/null
@@ -1,165 +0,0 @@
-module Spec
- module Mocks
-
- # ArgumentConstraints are messages that you can include in message
- # expectations to match arguments against a broader check than simple
- # equality.
- #
- # With the exception of any_args() and no_args(), the constraints
- # are all positional - they match against the arg in the given position.
- module ArgumentConstraints
-
- class AnyArgsConstraint
- def description
- "any args"
- end
- end
-
- class AnyArgConstraint
- def initialize(ignore)
- end
-
- def ==(other)
- true
- end
- end
-
- class NoArgsConstraint
- def description
- "no args"
- end
-
- def ==(args)
- args == []
- end
- end
-
- class RegexpConstraint
- def initialize(regexp)
- @regexp = regexp
- end
-
- def ==(value)
- return value =~ @regexp unless value.is_a?(Regexp)
- value == @regexp
- end
- end
-
- class BooleanConstraint
- def initialize(ignore)
- end
-
- def ==(value)
- TrueClass === value || FalseClass === value
- end
- end
-
- class HashIncludingConstraint
- def initialize(expected)
- @expected = expected
- end
-
- def ==(actual)
- @expected.each do | key, value |
- return false unless actual.has_key?(key) && value == actual[key]
- end
- true
- rescue NoMethodError => ex
- return false
- end
-
- def description
- "hash_including(#{@expected.inspect.sub(/^\{/,"").sub(/\}$/,"")})"
- end
- end
-
- class DuckTypeConstraint
- def initialize(*methods_to_respond_to)
- @methods_to_respond_to = methods_to_respond_to
- end
-
- def ==(value)
- @methods_to_respond_to.all? { |sym| value.respond_to?(sym) }
- end
- end
-
- class MatcherConstraint
- def initialize(matcher)
- @matcher = matcher
- end
-
- def ==(value)
- @matcher.matches?(value)
- end
- end
-
- class EqualityProxy
- def initialize(given)
- @given = given
- end
-
- def ==(expected)
- @given == expected
- end
- end
-
- # :call-seq:
- # object.should_receive(:message).with(any_args())
- #
- # Passes if object receives :message with any args at all. This is
- # really a more explicit variation of object.should_receive(:message)
- def any_args
- AnyArgsConstraint.new
- end
-
- # :call-seq:
- # object.should_receive(:message).with(anything())
- #
- # Passes as long as there is an argument.
- def anything
- AnyArgConstraint.new(nil)
- end
-
- # :call-seq:
- # object.should_receive(:message).with(no_args)
- #
- # Passes if no arguments are passed along with the message
- def no_args
- NoArgsConstraint.new
- end
-
- # :call-seq:
- # object.should_receive(:message).with(duck_type(:hello))
- # object.should_receive(:message).with(duck_type(:hello, :goodbye))
- #
- # Passes if the argument responds to the specified messages.
- #
- # == Examples
- #
- # array = []
- # display = mock('display')
- # display.should_receive(:present_names).with(duck_type(:length, :each))
- # => passes
- def duck_type(*args)
- DuckTypeConstraint.new(*args)
- end
-
- # :call-seq:
- # object.should_receive(:message).with(boolean())
- #
- # Passes if the argument is boolean.
- def boolean
- BooleanConstraint.new(nil)
- end
-
- # :call-seq:
- # object.should_receive(:message).with(hash_including(:this => that))
- #
- # Passes if the argument is a hash that includes the specified key/value
- # pairs. If the hash includes other keys, it will still pass.
- def hash_including(expected={})
- HashIncludingConstraint.new(expected)
- end
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/mocks/argument_expectation.rb b/vendor/plugins/rspec/lib/spec/mocks/argument_expectation.rb
deleted file mode 100644
index 096c47ae6..000000000
--- a/vendor/plugins/rspec/lib/spec/mocks/argument_expectation.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-module Spec
- module Mocks
-
- class ArgumentExpectation
- attr_reader :args
-
- def initialize(args, &block)
- @args = 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 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 is_matcher?(obj)
- return obj.respond_to?(:matches?) && obj.respond_to?(:description)
- end
-
- def args_match?(given_args)
- match_any_args? || constraints_block_matches?(given_args) || constraints_match?(given_args)
- end
-
- def constraints_block_matches?(given_args)
- @constraints_block ? @constraints_block.call(*given_args) : nil
- end
-
- def constraints_match?(given_args)
- @constraints == given_args
- end
-
- def match_any_args?
- @match_any_args
- end
-
- end
-
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/mocks/error_generator.rb b/vendor/plugins/rspec/lib/spec/mocks/error_generator.rb
deleted file mode 100644
index 440546512..000000000
--- a/vendor/plugins/rspec/lib/spec/mocks/error_generator.rb
+++ /dev/null
@@ -1,84 +0,0 @@
-module Spec
- module Mocks
- class ErrorGenerator
- attr_writer :opts
-
- def initialize(target, name)
- @target = target
- @name = name
- end
-
- def opts
- @opts ||= {}
- end
-
- def raise_unexpected_message_error(sym, *args)
- __raise "#{intro} received unexpected message :#{sym}#{arg_message(*args)}"
- end
-
- def raise_unexpected_message_args_error(expectation, *args)
- expected_args = format_args(*expectation.expected_args)
- actual_args = args.empty? ? "(no args)" : format_args(*args)
- __raise "#{intro} expected #{expectation.sym.inspect} with #{expected_args} but received it with #{actual_args}"
- end
-
- def raise_expectation_error(sym, expected_received_count, actual_received_count, *args)
- __raise "#{intro} expected :#{sym}#{arg_message(*args)} #{count_message(expected_received_count)}, but received it #{count_message(actual_received_count)}"
- end
-
- def raise_out_of_order_error(sym)
- __raise "#{intro} received :#{sym} out of order"
- end
-
- def raise_block_failed_error(sym, detail)
- __raise "#{intro} received :#{sym} but passed block failed with: #{detail}"
- end
-
- def raise_missing_block_error(args_to_yield)
- __raise "#{intro} asked to yield |#{arg_list(*args_to_yield)}| but no block was passed"
- end
-
- def raise_wrong_arity_error(args_to_yield, arity)
- __raise "#{intro} yielded |#{arg_list(*args_to_yield)}| to block with arity of #{arity}"
- end
-
- private
- def intro
- @name ? "Mock '#{@name}'" : @target.class == Class ? "<#{@target.inspect} (class)>" : (@target.nil? ? "nil" : @target.to_s)
- end
-
- def __raise(message)
- message = opts[:message] unless opts[:message].nil?
- Kernel::raise(Spec::Mocks::MockExpectationError, message)
- end
-
- def arg_message(*args)
- " with " + format_args(*args)
- end
-
- def format_args(*args)
- return "(no args)" if args.empty? || args == [:no_args]
- return "(any args)" if args == [:any_args]
- "(" + arg_list(*args) + ")"
- end
-
- def arg_list(*args)
- args.collect do |arg|
- arg.respond_to?(:description) ? arg.description : arg.inspect
- end.join(", ")
- end
-
- def count_message(count)
- return "at least #{pretty_print(count.abs)}" if count < 0
- return pretty_print(count)
- end
-
- def pretty_print(count)
- return "once" if count == 1
- return "twice" if count == 2
- return "#{count} times"
- end
-
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/mocks/errors.rb b/vendor/plugins/rspec/lib/spec/mocks/errors.rb
deleted file mode 100644
index 68fdfe006..000000000
--- a/vendor/plugins/rspec/lib/spec/mocks/errors.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-module Spec
- module Mocks
- class MockExpectationError < StandardError
- end
-
- class AmbiguousReturnError < StandardError
- end
- end
-end
-
diff --git a/vendor/plugins/rspec/lib/spec/mocks/extensions.rb b/vendor/plugins/rspec/lib/spec/mocks/extensions.rb
deleted file mode 100644
index 6fd51a272..000000000
--- a/vendor/plugins/rspec/lib/spec/mocks/extensions.rb
+++ /dev/null
@@ -1 +0,0 @@
-require 'spec/mocks/extensions/object'
diff --git a/vendor/plugins/rspec/lib/spec/mocks/extensions/object.rb b/vendor/plugins/rspec/lib/spec/mocks/extensions/object.rb
deleted file mode 100644
index 4b7531066..000000000
--- a/vendor/plugins/rspec/lib/spec/mocks/extensions/object.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-class Object
- include Spec::Mocks::Methods
-end
diff --git a/vendor/plugins/rspec/lib/spec/mocks/framework.rb b/vendor/plugins/rspec/lib/spec/mocks/framework.rb
deleted file mode 100644
index 89d24c443..000000000
--- a/vendor/plugins/rspec/lib/spec/mocks/framework.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# Require everything except the global extensions of class and object. This
-# supports wrapping rspec's mocking functionality without invading every
-# object in the system.
-
-require 'spec/mocks/methods'
-require 'spec/mocks/argument_constraints'
-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/space'
diff --git a/vendor/plugins/rspec/lib/spec/mocks/message_expectation.rb b/vendor/plugins/rspec/lib/spec/mocks/message_expectation.rb
deleted file mode 100644
index e70adbe68..000000000
--- a/vendor/plugins/rspec/lib/spec/mocks/message_expectation.rb
+++ /dev/null
@@ -1,331 +0,0 @@
-module Spec
- module Mocks
-
- 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
- @error_generator.opts = opts
- @expected_from = expected_from
- @sym = sym
- @method_block = method_block
- @return_block = nil
- @actual_received_count = 0
- @expected_received_count = expected_received_count
- @args_expectation = ArgumentExpectation.new([ArgumentConstraints::AnyArgsConstraint.new])
- @consecutive = false
- @exception_to_raise = nil
- @symbol_to_throw = nil
- @order_group = expectation_ordering
- @at_least = nil
- @at_most = nil
- @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 error_generator_opts=(opts={})
- @error_generator.opts = opts
- end
- protected :error_generator_opts=
-
- def expected_args
- @args_expectation.args
- end
-
- def and_return(*values, &return_block)
- Kernel::raise AmbiguousReturnError unless @method_block.nil?
- case values.size
- when 0 then value = nil
- when 1 then value = values[0]
- else
- value = values
- @consecutive = true
- @expected_received_count = values.size if !ignoring_args? &&
- @expected_received_count < 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:
- # and_raise()
- # and_raise(Exception) #any exception class
- # and_raise(exception) #any exception object
- #
- # == Warning
- #
- # When you pass an exception class, the MessageExpectation will
- # raise an instance of it, creating it with +new+. If the exception
- # class initializer requires any parameters, you must pass in an
- # instance and not the class.
- def and_raise(exception=Exception)
- @exception_to_raise = exception
- end
-
- def and_throw(symbol)
- @symbol_to_throw = symbol
- 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 << args
- self
- end
-
- def matches(sym, 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?
- default_return_val = invoke_method_block(args)
- elsif @args_to_yield.size > 0
- 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 && @expected_received_count > 0 &&
- @actual_received_count >= @expected_received_count
- end
-
- protected
-
- def invoke_method_block(args)
- begin
- @method_block.call(*args)
- rescue => detail
- @error_generator.raise_block_failed_error @sym, detail.message
- end
- end
-
- def invoke_with_yield(block)
- 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 > -1 && args_to_yield_this_time.length != block.arity
- @error_generator.raise_wrong_arity_error args_to_yield_this_time, block.arity
- end
- value = block.call(*args_to_yield_this_time)
- end
- value
- end
-
- def invoke_consecutive_return_block(args, block)
- args << block unless block.nil?
- value = @return_block.call(*args)
-
- index = [@actual_received_count, value.size-1].min
- value[index]
- end
-
- def invoke_return_block(args, block)
- args << block unless block.nil?
- # Ruby 1.9 - when we set @return_block to return values
- # regardless of arguments, any arguments will result in
- # a "wrong number of arguments" 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 < BaseExpectation
-
- def matches_name_but_not_args(sym, args)
- @sym == sym and not @args_expectation.args_match?(args)
- end
-
- def verify_messages_received
- return if expected_messages_received? || failed_fast?
-
- generate_error
- rescue Spec::Mocks::MockExpectationError => error
- error.backtrace.insert(0, @expected_from)
- 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
-
- def matches_at_least_count?
- @at_least && @actual_received_count >= @expected_received_count
- end
-
- def matches_at_most_count?
- @at_most && @actual_received_count <= @expected_received_count
- end
-
- def matches_exact_count?
- @expected_received_count == @actual_received_count
- end
-
- def similar_messages
- @similar_messages ||= []
- end
-
- def advise(args, block)
- similar_messages << args
- end
-
- def generate_error
- 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, &block)
- @args_expectation = ArgumentExpectation.new(args, &block)
- self
- end
-
- def exactly(n)
- set_expected_received_count :exactly, n
- self
- end
-
- def at_least(n)
- set_expected_received_count :at_least, n
- self
- end
-
- def at_most(n)
- set_expected_received_count :at_most, n
- self
- end
-
- def times(&block)
- @method_block = block if block
- self
- end
-
- def any_number_of_times(&block)
- @method_block = block if block
- @expected_received_count = :any
- self
- end
-
- def never
- @expected_received_count = 0
- self
- end
-
- def once(&block)
- @method_block = block if block
- @expected_received_count = 1
- self
- end
-
- def twice(&block)
- @method_block = block if block
- @expected_received_count = 2
- self
- end
-
- def ordered(&block)
- @method_block = block if block
- @order_group.register(self)
- @ordered = true
- self
- end
-
- def negative_expectation_for?(sym)
- return false
- end
-
- protected
- def set_expected_received_count(relativity, n)
- @at_least = (relativity == :at_least)
- @at_most = (relativity == :at_most)
- @expected_received_count = case n
- when Numeric
- n
- when :once
- 1
- when :twice
- 2
- end
- end
-
- end
-
- class NegativeMessageExpectation < MessageExpectation
- def initialize(message, expectation_ordering, expected_from, sym, method_block)
- super(message, expectation_ordering, expected_from, sym, method_block, 0)
- end
-
- def negative_expectation_for?(sym)
- return @sym == sym
- end
- end
-
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/mocks/methods.rb b/vendor/plugins/rspec/lib/spec/mocks/methods.rb
deleted file mode 100644
index 7387e4ff3..000000000
--- a/vendor/plugins/rspec/lib/spec/mocks/methods.rb
+++ /dev/null
@@ -1,51 +0,0 @@
-module Spec
- module Mocks
- module Methods
- def should_receive(sym, opts={}, &block)
- __mock_proxy.add_message_expectation(opts[:expected_from] || caller(1)[0], sym.to_sym, opts, &block)
- end
-
- def should_not_receive(sym, &block)
- __mock_proxy.add_negative_message_expectation(caller(1)[0], sym.to_sym, &block)
- end
-
- 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, &block) #:nodoc:
- __mock_proxy.received_message?(sym.to_sym, *args, &block)
- end
-
- def rspec_verify #:nodoc:
- __mock_proxy.verify
- end
-
- 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
-
- def __mock_proxy
- if Mock === self
- @mock_proxy ||= Proxy.new(self, @name, @options)
- else
- @mock_proxy ||= Proxy.new(self)
- end
- end
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/mocks/mock.rb b/vendor/plugins/rspec/lib/spec/mocks/mock.rb
deleted file mode 100644
index 33549a494..000000000
--- a/vendor/plugins/rspec/lib/spec/mocks/mock.rb
+++ /dev/null
@@ -1,56 +0,0 @@
-module Spec
- module Mocks
- class Mock
- include Methods
-
- # Creates a new mock with a +name+ (that will be used in error messages
- # only) == Options:
- # * :null_object - 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 = 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
- def ==(other)
- other == __mock_proxy
- end
-
- def method_missing(sym, *args, &block)
- __mock_proxy.instance_eval {@messages_received << [sym, args, block]}
- begin
- return self if __mock_proxy.null_object?
- super(sym, *args, &block)
- rescue NameError
- __mock_proxy.raise_unexpected_message_error sym, *args
- end
- end
-
- def inspect
- "#<#{self.class}:#{sprintf '0x%x', self.object_id} @name=#{@name.inspect}>"
- end
-
- def to_s
- inspect.gsub('<','[').gsub('>',']')
- end
-
- private
-
- def parse_options(options)
- options.has_key?(:null_object) ? {:null_object => 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 --git a/vendor/plugins/rspec/lib/spec/mocks/order_group.rb b/vendor/plugins/rspec/lib/spec/mocks/order_group.rb
deleted file mode 100644
index 9983207eb..000000000
--- a/vendor/plugins/rspec/lib/spec/mocks/order_group.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-module Spec
- module Mocks
- class OrderGroup
- def initialize error_generator
- @error_generator = error_generator
- @ordering = Array.new
- end
-
- def register(expectation)
- @ordering << expectation
- end
-
- def ready_for?(expectation)
- return @ordering.first == expectation
- end
-
- def consume
- @ordering.shift
- end
-
- def handle_order_constraint expectation
- return unless @ordering.include? expectation
- return consume if ready_for?(expectation)
- @error_generator.raise_out_of_order_error expectation.sym
- end
-
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/mocks/proxy.rb b/vendor/plugins/rspec/lib/spec/mocks/proxy.rb
deleted file mode 100644
index ab51fd5bb..000000000
--- a/vendor/plugins/rspec/lib/spec/mocks/proxy.rb
+++ /dev/null
@@ -1,224 +0,0 @@
-module Spec
- module Mocks
- class Proxy
- DEFAULT_OPTIONS = {
- :null_object => 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=nil, options={})
- @target = target
- @name = name
- @error_generator = ErrorGenerator.new target, name
- @expectation_ordering = OrderGroup.new @error_generator
- @expectations = []
- @messages_received = []
- @stubs = []
- @proxied_methods = []
- @options = options ? DEFAULT_OPTIONS.dup.merge(options) : DEFAULT_OPTIONS
- end
-
- 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={}, &block)
- __add sym
- 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 << expectation
- @expectations.last
- end
-
- def add_negative_message_expectation(expected_from, sym, &block)
- __add sym
- warn_if_nil_class sym
- @expectations << NegativeMessageExpectation.new(@error_generator, @expectation_ordering, expected_from, sym, block_given? ? block : nil)
- @expectations.last
- end
-
- def add_stub(expected_from, sym, opts={})
- __add sym
- @stubs.unshift MessageExpectation.new(@error_generator, @expectation_ordering, expected_from, sym, nil, :any, opts)
- @stubs.first
- end
-
- def verify #:nodoc:
- verify_expectations
- ensure
- reset
- end
-
- def reset
- clear_expectations
- clear_stubs
- reset_proxied_methods
- clear_proxied_methods
- reset_nil_expectations_warning
- end
-
- def received_message?(sym, *args, &block)
- @messages_received.any? {|array| array == [sym, args, block]}
- end
-
- def has_negative_expectation?(sym)
- @expectations.detect {|expectation| expectation.negative_expectation_for?(sym)}
- end
-
- def message_received(sym, *args, &block)
- expectation = find_matching_expectation(sym, *args)
- stub = find_matching_method_stub(sym, *args)
-
- if (stub && expectation && expectation.called_max_times?) || (stub && !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)
- 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, &block
- end
- end
-
- def raise_unexpected_message_args_error(expectation, *args)
- @error_generator.raise_unexpected_message_args_error expectation, *args
- end
-
- def raise_unexpected_message_error(sym, *args)
- @error_generator.raise_unexpected_message_error sym, *args
- end
-
- private
-
- def __add(sym)
- $rspec_mocks.add(@target) unless $rspec_mocks.nil?
- define_expected_method(sym)
- end
-
- def warn_if_nil_class(sym)
- if proxy_for_nil_class? && @@warn_about_expectations_on_nil
- Kernel.warn("An expectation of :#{sym} was set on nil. Called from #{caller[2]}. Use allow_message_expectations_on_nil to disable warnings.")
- end
- end
-
- def define_expected_method(sym)
- visibility_string = "#{visibility(sym)} :#{sym}"
- if target_responds_to?(sym) && !target_metaclass.method_defined?(munge(sym))
- munged_sym = munge(sym)
- target_metaclass.instance_eval do
- alias_method munged_sym, sym if method_defined?(sym.to_s)
- end
- @proxied_methods << sym
- end
-
- target_metaclass.class_eval(<<-EOF, __FILE__, __LINE__)
- def #{sym}(*args, &block)
- __mock_proxy.message_received :#{sym}, *args, &block
- end
- #{visibility_string}
- EOF
- end
-
- def target_responds_to?(sym)
- 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)
- 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)
- "proxied_by_rspec__#{sym.to_s}".to_sym
- end
-
- def clear_expectations
- @expectations.clear
- end
-
- def clear_stubs
- @stubs.clear
- end
-
- def clear_proxied_methods
- @proxied_methods.clear
- end
-
- def target_metaclass
- class << @target; self; end
- end
-
- def verify_expectations
- @expectations.each do |expectation|
- expectation.verify_messages_received
- end
- end
-
- def reset_proxied_methods
- @proxied_methods.each do |sym|
- munged_sym = munge(sym)
- 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
- 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)}
- end
-
- def find_almost_matching_expectation(sym, *args)
- @expectations.find {|expectation| expectation.matches_name_but_not_args(sym, args)}
- end
-
- def find_matching_method_stub(sym, *args)
- @stubs.find {|stub| stub.matches(sym, args)}
- end
-
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/mocks/space.rb b/vendor/plugins/rspec/lib/spec/mocks/space.rb
deleted file mode 100644
index 3e13224c7..000000000
--- a/vendor/plugins/rspec/lib/spec/mocks/space.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-module Spec
- module Mocks
- class Space
- def add(obj)
- mocks << obj unless mocks.detect {|m| m.equal? obj}
- end
-
- def verify_all
- mocks.each do |mock|
- mock.rspec_verify
- end
- end
-
- def reset_all
- mocks.each do |mock|
- mock.rspec_reset
- end
- mocks.clear
- end
-
- private
-
- def mocks
- @mocks ||= []
- end
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/mocks/spec_methods.rb b/vendor/plugins/rspec/lib/spec/mocks/spec_methods.rb
deleted file mode 100644
index aea5fd775..000000000
--- a/vendor/plugins/rspec/lib/spec/mocks/spec_methods.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-module Spec
- module Mocks
- module ExampleMethods
- include Spec::Mocks::ArgumentConstraints
-
- # Shortcut for creating an instance of Spec::Mocks::Mock.
- #
- # +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 = mock("thing", :a => "A")
- # stub_thing.a == "A" => true
- #
- # stub_person = stub("thing", :name => "Joe", :email => "joe@domain.com")
- # stub_person.name => "Joe"
- # stub_person.email => "joe@domain.com"
- 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 => 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
-end
diff --git a/vendor/plugins/rspec/lib/spec/rake/spectask.rb b/vendor/plugins/rspec/lib/spec/rake/spectask.rb
deleted file mode 100644
index b69d3a79a..000000000
--- a/vendor/plugins/rspec/lib/spec/rake/spectask.rb
+++ /dev/null
@@ -1,227 +0,0 @@
-#!/usr/bin/env ruby
-
-# Define a task library for running RSpec contexts.
-
-require 'rake'
-require 'rake/tasklib'
-
-module Spec
- module Rake
-
- # A Rake task that runs a set of specs.
- #
- # Example:
- #
- # Spec::Rake::SpecTask.new do |t|
- # t.warning = true
- # t.rcov = true
- # end
- #
- # This will create a task that can be run with:
- #
- # rake spec
- #
- # If rake is invoked with a "SPEC=filename" command line option,
- # then the list of spec files will be overridden to include only the
- # filename specified on the command line. This provides an easy way
- # to run just one spec.
- #
- # If rake is invoked with a "SPEC_OPTS=options" command line option,
- # then the given options will override the value of the +spec_opts+
- # attribute.
- #
- # If rake is invoked with a "RCOV_OPTS=options" command line option,
- # then the given options will override the value of the +rcov_opts+
- # attribute.
- #
- # Examples:
- #
- # rake spec # run specs normally
- # rake spec SPEC=just_one_file.rb # run just one spec file.
- # rake spec SPEC_OPTS="--diff" # enable diffing
- # rake spec RCOV_OPTS="--aggregate myfile.txt" # see rcov --help for details
- #
- # 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 < ::Rake::TaskLib
- class << self
- def attr_accessor(*names)
- super(*names)
- names.each do |name|
- module_eval "def #{name}() evaluate(@#{name}) end" # Allows use of procs
- end
- end
- end
-
- # Name of spec task. (default is :spec)
- attr_accessor :name
-
- # Array of directories to be added to $LOAD_PATH before running the
- # specs. Defaults to ['before :each
- # and after the last after :each
. The use of these is generally discouraged, because it
- # introduces dependencies between the examples. Still, it might prove useful for very expensive operations
- # if you know what you are doing.
- #
- # == Local helper methods
- #
- # You can include local helper methods by simply expressing them within a context:
- #
- # describe "..." do
- #
- # it "..." do
- # helper_method
- # end
- #
- # def helper_method
- # ...
- # end
- #
- # end
- #
- # == Included helper methods
- #
- # You can include helper methods in multiple contexts by expressing them within
- # a module, and then including that module in your context:
- #
- # module AccountExampleHelperMethods
- # def helper_method
- # ...
- # end
- # end
- #
- # describe "A new account" do
- # include AccountExampleHelperMethods
- # before do
- # @account = Account.new
- # end
- #
- # it "should have a balance of $0" do
- # helper_method
- # @account.balance.should eql(Money.new(0, :dollars))
- # end
- # end
- #
- # == Shared Example Groups
- #
- # You can define a shared Example Group, that may be used on other groups
- #
- # share_examples_for "All Editions" do
- # it "all editions behaviour" ...
- # end
- #
- # describe SmallEdition do
- # it_should_behave_like "All Editions"
- #
- # it "should do small edition stuff" do
- # ...
- # end
- # end
- #
- # You can also assign the shared group to a module and include that
- #
- # share_as :AllEditions do
- # it "should do all editions stuff" ...
- # end
- #
- # describe SmallEdition do
- # it_should_behave_like AllEditions
- #
- # it "should do small edition stuff" do
- # ...
- # end
- # end
- #
- # And, for those of you who prefer to use something more like Ruby, you
- # can just include the module directly
- #
- # describe SmallEdition do
- # include AllEditions
- #
- # it "should do small edition stuff" do
- # ...
- # end
- # end
- module Runner
- class << self
- def 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 configuration 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 register_at_exit_hook # :nodoc:
- unless @already_registered_at_exit_hook
- at_exit do
- unless $! || Spec.run? || Spec::Example::ExampleGroupFactory.all_registered?(options.example_groups)
- success = Spec.run
- exit success if Spec.exit?
- end
- end
- @already_registered_at_exit_hook = true
- end
- end
-
- def options # :nodoc:
- @options ||= begin
- parser = ::Spec::Runner::OptionParser.new($stderr, $stdout)
- parser.order!(ARGV)
- parser.options
- end
- end
-
- def use options
- @options = options
- end
-
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/runner/backtrace_tweaker.rb b/vendor/plugins/rspec/lib/spec/runner/backtrace_tweaker.rb
deleted file mode 100644
index b4fae8e3a..000000000
--- a/vendor/plugins/rspec/lib/spec/runner/backtrace_tweaker.rb
+++ /dev/null
@@ -1,56 +0,0 @@
-module Spec
- module Runner
- class BacktraceTweaker
- def clean_up_double_slashes(line)
- line.gsub!('//','/')
- end
- end
-
- class NoisyBacktraceTweaker < BacktraceTweaker
- def tweak_backtrace(error)
- return if error.backtrace.nil?
- error.backtrace.each do |line|
- clean_up_double_slashes(line)
- end
- end
- end
-
- # Tweaks raised Exceptions to mask noisy (unneeded) parts of the backtrace
- class QuietBacktraceTweaker < BacktraceTweaker
- unless defined?(IGNORE_PATTERNS)
- root_dir = File.expand_path(File.join(__FILE__, '..', '..', '..', '..'))
- spec_files = Dir["#{root_dir}/lib/*"].map do |path|
- subpath = path[root_dir.length..-1]
- /#{subpath}/
- end
- IGNORE_PATTERNS = spec_files + [
- /\/lib\/ruby\//,
- /bin\/spec:/,
- /bin\/rcov:/,
- /lib\/rspec-rails/,
- /vendor\/rails/,
- # TextMate's Ruby and RSpec plugins
- /Ruby\.tmbundle\/Support\/tmruby.rb:/,
- /RSpec\.tmbundle\/Support\/lib/,
- /temp_textmate\./,
- /mock_frameworks\/rspec/,
- /spec_server/
- ]
- end
-
- def tweak_backtrace(error)
- return if error.backtrace.nil?
- error.backtrace.collect! do |message|
- clean_up_double_slashes(message)
- kept_lines = message.split("\n").select do |line|
- IGNORE_PATTERNS.each do |ignore|
- break if line =~ ignore
- end
- end
- kept_lines.empty?? nil : kept_lines.join("\n")
- end
- error.backtrace.compact!
- end
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/runner/class_and_arguments_parser.rb b/vendor/plugins/rspec/lib/spec/runner/class_and_arguments_parser.rb
deleted file mode 100644
index 65dc4519c..000000000
--- a/vendor/plugins/rspec/lib/spec/runner/class_and_arguments_parser.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-module Spec
- module Runner
- class ClassAndArgumentsParser
- class << self
- def parse(s)
- if s =~ /([a-zA-Z_]+(?:::[a-zA-Z_]+)*):?(.*)/
- arg = $2 == "" ? nil : $2
- [$1, arg]
- else
- raise "Couldn't parse #{s.inspect}"
- end
- end
- end
- end
- end
-end
\ No newline at end of file
diff --git a/vendor/plugins/rspec/lib/spec/runner/command_line.rb b/vendor/plugins/rspec/lib/spec/runner/command_line.rb
deleted file mode 100644
index e7639a676..000000000
--- a/vendor/plugins/rspec/lib/spec/runner/command_line.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-require 'spec/runner/option_parser'
-
-module Spec
- module Runner
- class CommandLine
- class << self
- def 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
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/runner/drb_command_line.rb b/vendor/plugins/rspec/lib/spec/runner/drb_command_line.rb
deleted file mode 100644
index 911c86897..000000000
--- a/vendor/plugins/rspec/lib/spec/runner/drb_command_line.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-require "drb/drb"
-
-module Spec
- module Runner
- # Facade to run specs by connecting to a DRB server
- class DrbCommandLine
- # Runs specs on a DRB server. Note that this API is similar to that of
- # CommandLine - making it possible for clients to use both interchangeably.
- def self.run(options)
- begin
- DRb.start_service
- spec_server = DRbObject.new_with_uri("druby://127.0.0.1:8989")
- spec_server.run(options.argv, options.error_stream, options.output_stream)
- rescue DRb::DRbConnError => e
- options.error_stream.puts "No server is running"
- end
- end
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb b/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb
deleted file mode 100644
index 7275c6a88..000000000
--- a/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-module Spec
- module Runner
- class ExampleGroupRunner
- def initialize(options)
- @options = options
- end
-
- def load_files(files)
- # It's important that loading files (or choosing not to) stays the
- # 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|
- load file
- end
- end
-
- def run
- prepare
- success = true
- example_groups.each do |example_group|
- success = success & example_group.run
- end
- return success
- ensure
- finish
- end
-
- protected
- def prepare
- reporter.start(number_of_examples)
- example_groups.reverse! if reverse
- end
-
- def finish
- reporter.end
- reporter.dump
- end
-
- def reporter
- @options.reporter
- end
-
- def reverse
- @options.reverse
- end
-
- def example_groups
- @options.example_groups
- end
-
- def number_of_examples
- @options.number_of_examples
- end
- end
- # TODO: BT - Deprecate BehaviourRunner?
- BehaviourRunner = ExampleGroupRunner
- end
-end
\ No newline at end of file
diff --git a/vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb b/vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb
deleted file mode 100644
index b3501c605..000000000
--- a/vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb
+++ /dev/null
@@ -1,79 +0,0 @@
-module Spec
- module Runner
- 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
- end
-
- # This method is invoked before any examples are run, right after
- # they have all been collected. This can be useful for special
- # formatters that need to provide progress on feedback (graphical ones)
- #
- # This method will only be invoked once, and the next one to be invoked
- # is #add_example_group
- def start(example_count)
- end
-
- # 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(example_group)
- @example_group = example_group
- end
-
- # This method is invoked when an +example+ starts.
- def example_started(example)
- end
-
- # This method is invoked when an +example+ passes.
- def example_passed(example)
- end
-
- # This method is invoked when an +example+ fails, i.e. an exception occurred
- # inside it (such as a failed should or other exception). +counter+ is the
- # sequence number of the failure (starting at 1) and +failure+ is the associated
- # Failure object.
- def example_failed(example, counter, failure)
- end
-
- # 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.
- # +message+ is the message from the ExamplePendingError, if it exists, or the
- # default value of "Not Yet Implemented"
- # +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
- # to be invoked after this one is #dump_failure (once for each failed example),
- def start_dump
- end
-
- # Dumps detailed information about an example failure.
- # This method is invoked for each failed example after all examples have run. +counter+ is the sequence number
- # of the associated example. +failure+ is a Failure object, which contains detailed
- # information about the failure.
- def dump_failure(counter, failure)
- end
-
- # This method is invoked after the dumping of examples and failures.
- def dump_summary(duration, example_count, failure_count, pending_count)
- end
-
- # This gets invoked after the summary if option is set to do so.
- def dump_pending
- end
-
- # This method is invoked at the very end. Allows the formatter to clean up, like closing open streams.
- def close
- end
- end
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb b/vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb
deleted file mode 100644
index 7e8bb844b..000000000
--- a/vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb
+++ /dev/null
@@ -1,126 +0,0 @@
-require 'spec/runner/formatter/base_formatter'
-
-module Spec
- module Runner
- module Formatter
- # Baseclass for text-based formatters. Can in fact be used for
- # non-text based ones too - just ignore the +output+ constructor
- # argument.
- class BaseTextFormatter < 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)
- @output = File.open(where, 'w')
- else
- @output = where
- end
- @pending_examples = []
- end
-
- def example_pending(example, message, pending_caller)
- @pending_examples << [example.__full_description, message, pending_caller]
- end
-
- def dump_failure(counter, failure)
- @output.puts
- @output.puts "#{counter.to_s})"
- @output.puts colourise("#{failure.header}\n#{failure.exception.message}", failure)
- @output.puts format_backtrace(failure.exception.backtrace)
- @output.flush
- end
-
- def colourise(s, failure)
- if(failure.expectation_not_met?)
- red(s)
- elsif(failure.pending_fixed?)
- blue(s)
- else
- magenta(s)
- end
- end
-
- def dump_summary(duration, example_count, failure_count, pending_count)
- return if dry_run?
- @output.puts
- @output.puts "Finished in #{duration} seconds"
- @output.puts
-
- summary = "#{example_count} example#{'s' unless example_count == 1}, #{failure_count} failure#{'s' unless failure_count == 1}"
- summary << ", #{pending_count} pending" if pending_count > 0
-
- if failure_count == 0
- if pending_count > 0
- @output.puts yellow(summary)
- else
- @output.puts green(summary)
- end
- else
- @output.puts red(summary)
- end
- @output.flush
- end
-
- def dump_pending
- unless @pending_examples.empty?
- @output.puts
- @output.puts "Pending:"
- @pending_examples.each do |pending_example|
- @output.puts "#{pending_example[0]} (#{pending_example[1]})"
- @output.puts " Called from #{pending_example[2]}"
- end
- end
- @output.flush
- end
-
- def close
- if IO === @output && @output != $stdout
- @output.close
- end
- end
-
- def format_backtrace(backtrace)
- return "" if backtrace.nil?
- backtrace.map { |line| backtrace_line(line) }.join("\n")
- end
-
- protected
-
- def colour?
- @options.colour ? true : false
- end
-
- def dry_run?
- @options.dry_run ? true : false
- end
-
- def backtrace_line(line)
- line.sub(/\A([^:]+:\d+)$/, '\\1:')
- end
-
- def colour(text, colour_code)
- return text unless colour? && output_to_tty?
- "#{colour_code}#{text}\e[0m"
- end
-
- def output_to_tty?
- begin
- @output.tty? || ENV.has_key?("AUTOTEST")
- rescue NoMethodError
- false
- end
- end
-
- def green(text); colour(text, "\e[32m"); end
- def red(text); colour(text, "\e[31m"); end
- def magenta(text); colour(text, "\e[35m"); end
- def yellow(text); colour(text, "\e[33m"); end
- def blue(text); colour(text, "\e[34m"); end
-
- end
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/runner/formatter/failing_example_groups_formatter.rb b/vendor/plugins/rspec/lib/spec/runner/formatter/failing_example_groups_formatter.rb
deleted file mode 100644
index 8d39bc572..000000000
--- a/vendor/plugins/rspec/lib/spec/runner/formatter/failing_example_groups_formatter.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-require 'spec/runner/formatter/base_text_formatter'
-
-module Spec
- module Runner
- module Formatter
- class FailingExampleGroupsFormatter < BaseTextFormatter
- def example_failed(example, counter, failure)
- if @example_group
- description_parts = @example_group.description_parts.collect do |description|
- description =~ /(.*) \(druby.*\)$/ ? $1 : description
- end
- @output.puts ::Spec::Example::ExampleGroupMethods.description_text(*description_parts)
-
- @output.flush
- @example_group = nil
- end
- end
-
- def dump_failure(counter, failure)
- end
-
- def dump_summary(duration, example_count, failure_count, pending_count)
- end
- end
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/runner/formatter/failing_examples_formatter.rb b/vendor/plugins/rspec/lib/spec/runner/formatter/failing_examples_formatter.rb
deleted file mode 100644
index e3a271c8b..000000000
--- a/vendor/plugins/rspec/lib/spec/runner/formatter/failing_examples_formatter.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-require 'spec/runner/formatter/base_text_formatter'
-
-module Spec
- module Runner
- module Formatter
- class FailingExamplesFormatter < BaseTextFormatter
- def example_failed(example, counter, failure)
- @output.puts "#{example_group.description} #{example.description}"
- @output.flush
- end
-
- def dump_failure(counter, failure)
- end
-
- def dump_summary(duration, example_count, failure_count, pending_count)
- end
- end
- end
- end
-end
diff --git a/vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb b/vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb
deleted file mode 100644
index 51eee513e..000000000
--- a/vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb
+++ /dev/null
@@ -1,337 +0,0 @@
-require 'erb'
-require 'spec/runner/formatter/base_text_formatter'
-
-module Spec
- module Runner
- module Formatter
- class HtmlFormatter < BaseTextFormatter
- include ERB::Util # for the #h method
-
- def initialize(options, output)
- super
- @example_group_number = 0
- @example_number = 0
- end
-
- def method_missing(sym, *args)
- # no-op
- end
-
- # 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 example_number
- @example_number
- end
-
- def start(example_count)
- @example_count = example_count
-
- @output.puts html_header
- @output.puts report_header
- @output.flush
- end
-
- 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 " "
- @output.puts ""
- end
- @output.puts ""
- @output.puts "
"
- @output.puts "#{format_backtrace(failure.exception.backtrace)}
"
- end
-
- def move_progress
- @output.puts " "
- @output.flush
- end
-
- def percent_done
- result = 100.0
- if @example_count != 0
- result = ((example_number).to_f / @example_count.to_f * 1000).to_i / 10.0
- end
- result
- end
-
- def dump_failure(counter, failure)
- end
-
- def dump_summary(duration, example_count, failure_count, pending_count)
- if dry_run?
- totals = "This was a dry-run"
- else
- totals = "#{example_count} example#{'s' unless example_count == 1}, #{failure_count} failure#{'s' unless failure_count == 1}"
- totals << ", #{pending_count} pending" if pending_count > 0
- end
- @output.puts ""
- @output.puts ""
- @output.puts ""
- @output.puts ""
- @output.puts "#{@snippet_extractor.snippet(failure.exception)}