deckshuffler 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.DS_Store +0 -0
- data/MIT-LICENSE +21 -0
- data/Rakefile +55 -0
- data/app/controllers/account_controller.rb +41 -0
- data/app/controllers/application.rb +27 -0
- data/app/controllers/board_controller.rb +15 -0
- data/app/controllers/capacities_controller.rb +52 -0
- data/app/controllers/card_sizes_controller.rb +47 -0
- data/app/controllers/card_types_controller.rb +47 -0
- data/app/controllers/cards_controller.rb +233 -0
- data/app/controllers/functional_sets_controller.rb +55 -0
- data/app/controllers/iteration_controller.rb +93 -0
- data/app/controllers/milestones_controller.rb +51 -0
- data/app/controllers/priorities_controller.rb +52 -0
- data/app/controllers/project_infos_controller.rb +40 -0
- data/app/helpers/account_helper.rb +2 -0
- data/app/helpers/application_helper.rb +39 -0
- data/app/helpers/board_helper.rb +2 -0
- data/app/helpers/capacities_helper.rb +2 -0
- data/app/helpers/card_sizes_helper.rb +2 -0
- data/app/helpers/card_types_helper.rb +2 -0
- data/app/helpers/cards_helper.rb +2 -0
- data/app/helpers/functional_sets_helper.rb +2 -0
- data/app/helpers/milestones_helper.rb +2 -0
- data/app/helpers/priorities_helper.rb +2 -0
- data/app/helpers/project_infos_helper.rb +5 -0
- data/app/models/capacity.rb +4 -0
- data/app/models/card.rb +64 -0
- data/app/models/card_size.rb +13 -0
- data/app/models/card_type.rb +13 -0
- data/app/models/functional_set.rb +5 -0
- data/app/models/milestone.rb +15 -0
- data/app/models/previous_card_owner.rb +6 -0
- data/app/models/priority.rb +14 -0
- data/app/models/project_info.rb +3 -0
- data/app/views/account/index.rhtml +56 -0
- data/app/views/account/login.rhtml +12 -0
- data/app/views/account/signup.rhtml +24 -0
- data/app/views/board/_card_summary.rhtml +24 -0
- data/app/views/board/_cards_column.rhtml +11 -0
- data/app/views/board/index.rhtml +30 -0
- data/app/views/capacities/edit.rhtml +11 -0
- data/app/views/capacities/list.rhtml +34 -0
- data/app/views/capacities/new.rhtml +10 -0
- data/app/views/capacities/show.rhtml +8 -0
- data/app/views/card_sizes/_form.rhtml +10 -0
- data/app/views/card_sizes/edit.rhtml +7 -0
- data/app/views/card_sizes/list.rhtml +27 -0
- data/app/views/card_sizes/new.rhtml +6 -0
- data/app/views/card_sizes/show.rhtml +8 -0
- data/app/views/card_types/_form.rhtml +7 -0
- data/app/views/card_types/edit.rhtml +7 -0
- data/app/views/card_types/list.rhtml +27 -0
- data/app/views/card_types/new.rhtml +6 -0
- data/app/views/card_types/show.rhtml +8 -0
- data/app/views/cards/_form.rhtml +104 -0
- data/app/views/cards/edit.rhtml +4 -0
- data/app/views/cards/import.rhtml +4 -0
- data/app/views/cards/list_per_functional_set.rhtml +37 -0
- data/app/views/cards/list_per_milestone.rhtml +36 -0
- data/app/views/cards/list_per_status.rhtml +40 -0
- data/app/views/cards/list_per_user.rhtml +38 -0
- data/app/views/cards/merge.rhtml +41 -0
- data/app/views/cards/raise_card.rhtml +4 -0
- data/app/views/cards/split.rhtml +4 -0
- data/app/views/functional_sets/_form.rhtml +10 -0
- data/app/views/functional_sets/edit.rhtml +4 -0
- data/app/views/functional_sets/list.rhtml +25 -0
- data/app/views/functional_sets/new.rhtml +4 -0
- data/app/views/iteration/bulk_edit_actual.rhtml +23 -0
- data/app/views/iteration/bulk_edit_planned.rhtml +19 -0
- data/app/views/layouts/account.rhtml +22 -0
- data/app/views/layouts/standard.rhtml +36 -0
- data/app/views/milestones/_form.rhtml +8 -0
- data/app/views/milestones/edit.rhtml +7 -0
- data/app/views/milestones/list.rhtml +23 -0
- data/app/views/milestones/new.rhtml +6 -0
- data/app/views/milestones/show.rhtml +8 -0
- data/app/views/priorities/_form.rhtml +9 -0
- data/app/views/priorities/edit.rhtml +7 -0
- data/app/views/priorities/list.rhtml +25 -0
- data/app/views/priorities/new.rhtml +6 -0
- data/app/views/priorities/show.rhtml +9 -0
- data/app/views/project_infos/_form.rhtml +18 -0
- data/app/views/project_infos/edit.rhtml +7 -0
- data/app/views/project_infos/list.rhtml +25 -0
- data/app/views/project_infos/new.rhtml +6 -0
- data/bin/deckshuffler +74 -0
- data/config/boot.rb +19 -0
- data/config/environment.rb +68 -0
- data/config/routes.rb +19 -0
- data/db/development_structure.sql +81 -0
- data/db/migrate/001_cards.rb +41 -0
- data/db/migrate/002_statuses.rb +45 -0
- data/db/migrate/003_card_sizes.rb +17 -0
- data/db/migrate/004_card_types.rb +15 -0
- data/db/migrate/005_functional_set.rb +23 -0
- data/db/migrate/006_project_info.rb +14 -0
- data/db/migrate/007_create_users.rb +18 -0
- data/db/migrate/008_capacities.rb +14 -0
- data/db/migrate/009_in_play_status.rb +48 -0
- data/db/migrate/010_milestones.rb +14 -0
- data/db/migrate/011_priorities.rb +18 -0
- data/db/migrate/012_card_dependencies.rb +21 -0
- data/db/migrate/013_authentication_independent.rb +15 -0
- data/db/schema.rb +104 -0
- data/doc/.DS_Store +0 -0
- data/doc/deckshuffler.svg +199 -0
- data/lib/authentication/authenticated_system.rb +162 -0
- data/lib/authentication/authenticated_test_helper.rb +113 -0
- data/lib/authentication/user.rb +67 -0
- data/lib/authentication/user_notifier.rb +22 -0
- data/lib/authentication/user_observer.rb +9 -0
- data/lib/cards_csv_exporter.rb +33 -0
- data/lib/cards_csv_importer.rb +87 -0
- data/lib/module_validator.rb +12 -0
- data/lib/status.rb +69 -0
- data/lib/transition_manager.rb +30 -0
- data/previous_failures.txt +0 -0
- data/public/.DS_Store +0 -0
- data/public/.htaccess +41 -0
- data/public/404.html +8 -0
- data/public/500.html +8 -0
- data/public/dispatch.cgi +10 -0
- data/public/dispatch.fcgi +29 -0
- data/public/dispatch.rb +10 -0
- data/public/favicon.ico +0 -0
- data/public/images/.DS_Store +0 -0
- data/public/images/deckshuffler.png +0 -0
- data/public/javascripts/controls.js +750 -0
- data/public/javascripts/dragdrop.js +584 -0
- data/public/javascripts/effects.js +854 -0
- data/public/javascripts/prototype.js +1785 -0
- data/public/robots.txt +1 -0
- data/public/stylesheets/deckshuffler.css +142 -0
- data/public/stylesheets/scaffold.css +74 -0
- data/script/about +3 -0
- data/script/breakpointer +3 -0
- data/script/console +3 -0
- data/script/destroy +3 -0
- data/script/generate +3 -0
- data/script/performance/benchmarker +3 -0
- data/script/performance/profiler +3 -0
- data/script/plugin +3 -0
- data/script/process/reaper +3 -0
- data/script/process/spawner +3 -0
- data/script/process/spinner +3 -0
- data/script/runner +3 -0
- data/script/server +3 -0
- data/script/spec +4 -0
- data/script/spec_server +86 -0
- data/spec/controllers/cards_controller_spec.rb +98 -0
- data/spec/lib/cards_csv_exporter_spec.rb +86 -0
- data/spec/lib/cards_csv_importer_spec.rb +184 -0
- data/spec/spec.opts +6 -0
- data/spec/spec_helper.rb +23 -0
- data/test/.DS_Store +0 -0
- data/test/fixtures/capacities.yml +5 -0
- data/test/fixtures/card_sizes.yml +6 -0
- data/test/fixtures/card_types.yml +5 -0
- data/test/fixtures/cards.yml +17 -0
- data/test/fixtures/functional_sets.yml +5 -0
- data/test/fixtures/milestones.yml +5 -0
- data/test/fixtures/priorities.yml +7 -0
- data/test/fixtures/project_infos.yml +5 -0
- data/test/fixtures/users.yml +17 -0
- data/test/functional/.DS_Store +0 -0
- data/test/functional/account_controller_test.rb +129 -0
- data/test/functional/board_controller_test.rb +28 -0
- data/test/functional/capacities_controller_test.rb +37 -0
- data/test/functional/cards_controller_test.rb +268 -0
- data/test/functional/functional_sets_controller_test.rb +27 -0
- data/test/functional/project_infos_controller_test.rb +38 -0
- data/test/test_helper.rb +30 -0
- data/test/unit/.DS_Store +0 -0
- data/test/unit/capacity_test.rb +14 -0
- data/test/unit/card_size_test.rb +21 -0
- data/test/unit/card_test.rb +51 -0
- data/test/unit/card_type_test.rb +20 -0
- data/test/unit/milestone_test.rb +20 -0
- data/test/unit/priority_test.rb +20 -0
- data/test/unit/status_test.rb +93 -0
- data/test/unit/transition_manager_test.rb +142 -0
- data/test/unit/user_notifier_test.rb +32 -0
- data/test/unit/user_test.rb +75 -0
- data/vendor/plugins/acts_as_authenticated/CHANGELOG +86 -0
- data/vendor/plugins/acts_as_authenticated/README +20 -0
- data/vendor/plugins/acts_as_authenticated/generators/authenticated/USAGE +1 -0
- data/vendor/plugins/acts_as_authenticated/generators/authenticated/authenticated_generator.rb +102 -0
- data/vendor/plugins/acts_as_authenticated/generators/authenticated/templates/authenticated_system.rb +131 -0
- data/vendor/plugins/acts_as_authenticated/generators/authenticated/templates/authenticated_test_helper.rb +113 -0
- data/vendor/plugins/acts_as_authenticated/generators/authenticated/templates/controller.rb +43 -0
- data/vendor/plugins/acts_as_authenticated/generators/authenticated/templates/fixtures.yml +17 -0
- data/vendor/plugins/acts_as_authenticated/generators/authenticated/templates/functional_test.rb +129 -0
- data/vendor/plugins/acts_as_authenticated/generators/authenticated/templates/helper.rb +2 -0
- data/vendor/plugins/acts_as_authenticated/generators/authenticated/templates/index.rhtml +56 -0
- data/vendor/plugins/acts_as_authenticated/generators/authenticated/templates/login.rhtml +14 -0
- data/vendor/plugins/acts_as_authenticated/generators/authenticated/templates/migration.rb +18 -0
- data/vendor/plugins/acts_as_authenticated/generators/authenticated/templates/model.rb +64 -0
- data/vendor/plugins/acts_as_authenticated/generators/authenticated/templates/signup.rhtml +16 -0
- data/vendor/plugins/acts_as_authenticated/generators/authenticated/templates/unit_test.rb +75 -0
- data/vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/USAGE +1 -0
- data/vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/authenticated_mailer_generator.rb +27 -0
- data/vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/activation.rhtml +3 -0
- data/vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/notifier.rb +22 -0
- data/vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/notifier_test.rb +27 -0
- data/vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/observer.rb +9 -0
- data/vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/signup_notification.rhtml +8 -0
- data/vendor/plugins/acts_as_authenticated/install.rb +1 -0
- data/vendor/plugins/rspec/CHANGES +963 -0
- data/vendor/plugins/rspec/MIT-LICENSE +20 -0
- data/vendor/plugins/rspec/README +75 -0
- data/vendor/plugins/rspec/Rakefile +273 -0
- data/vendor/plugins/rspec/TODO +54 -0
- data/vendor/plugins/rspec/UPGRADE +31 -0
- data/vendor/plugins/rspec/autotest/discover.rb +6 -0
- data/vendor/plugins/rspec/autotest/rspec.rb +1 -0
- data/vendor/plugins/rspec/bin/spec +3 -0
- data/vendor/plugins/rspec/bin/spec_translator +8 -0
- data/vendor/plugins/rspec/examples/auto_spec_description_example.rb +19 -0
- data/vendor/plugins/rspec/examples/before_and_after_example.rb +40 -0
- data/vendor/plugins/rspec/examples/behave_as_example.rb +45 -0
- data/vendor/plugins/rspec/examples/custom_expectation_matchers.rb +54 -0
- data/vendor/plugins/rspec/examples/custom_formatter.rb +12 -0
- data/vendor/plugins/rspec/examples/dynamic_spec.rb +9 -0
- data/vendor/plugins/rspec/examples/file_accessor.rb +19 -0
- data/vendor/plugins/rspec/examples/file_accessor_spec.rb +38 -0
- data/vendor/plugins/rspec/examples/greeter_spec.rb +31 -0
- data/vendor/plugins/rspec/examples/helper_method_example.rb +11 -0
- data/vendor/plugins/rspec/examples/io_processor.rb +8 -0
- data/vendor/plugins/rspec/examples/io_processor_spec.rb +21 -0
- data/vendor/plugins/rspec/examples/legacy_spec.rb +11 -0
- data/vendor/plugins/rspec/examples/mocking_example.rb +27 -0
- data/vendor/plugins/rspec/examples/multi_threaded_behaviour_runner.rb +27 -0
- data/vendor/plugins/rspec/examples/partial_mock_example.rb +28 -0
- data/vendor/plugins/rspec/examples/pending_example.rb +20 -0
- data/vendor/plugins/rspec/examples/predicate_example.rb +27 -0
- data/vendor/plugins/rspec/examples/priority.txt +1 -0
- data/vendor/plugins/rspec/examples/shared_behaviours_example.rb +39 -0
- data/vendor/plugins/rspec/examples/spec_and_test_together.rb +20 -0
- data/vendor/plugins/rspec/examples/spec_helper.rb +3 -0
- data/vendor/plugins/rspec/examples/stack.rb +36 -0
- data/vendor/plugins/rspec/examples/stack_spec.rb +97 -0
- data/vendor/plugins/rspec/examples/story/game-of-life/.loadpath +5 -0
- data/vendor/plugins/rspec/examples/story/game-of-life/README.txt +21 -0
- data/vendor/plugins/rspec/examples/story/game-of-life/behaviour/everything.rb +6 -0
- data/vendor/plugins/rspec/examples/story/game-of-life/behaviour/examples/examples.rb +3 -0
- data/vendor/plugins/rspec/examples/story/game-of-life/behaviour/examples/game_behaviour.rb +35 -0
- data/vendor/plugins/rspec/examples/story/game-of-life/behaviour/examples/grid_behaviour.rb +66 -0
- data/vendor/plugins/rspec/examples/story/game-of-life/behaviour/stories/CellsWithLessThanTwoNeighboursDie.story +21 -0
- data/vendor/plugins/rspec/examples/story/game-of-life/behaviour/stories/CellsWithMoreThanThreeNeighboursDie.story +21 -0
- data/vendor/plugins/rspec/examples/story/game-of-life/behaviour/stories/EmptySpacesWithThreeNeighboursCreateACell.story +42 -0
- data/vendor/plugins/rspec/examples/story/game-of-life/behaviour/stories/ICanCreateACell.story +42 -0
- data/vendor/plugins/rspec/examples/story/game-of-life/behaviour/stories/ICanKillACell.story +17 -0
- data/vendor/plugins/rspec/examples/story/game-of-life/behaviour/stories/TheGridWraps.story +53 -0
- data/vendor/plugins/rspec/examples/story/game-of-life/behaviour/stories/create_a_cell.rb +52 -0
- data/vendor/plugins/rspec/examples/story/game-of-life/behaviour/stories/kill_a_cell.rb +24 -0
- data/vendor/plugins/rspec/examples/story/game-of-life/behaviour/stories/stories.rb +5 -0
- data/vendor/plugins/rspec/examples/story/game-of-life/behaviour/stories/stories.txt +22 -0
- data/vendor/plugins/rspec/examples/story/game-of-life/life.rb +3 -0
- data/vendor/plugins/rspec/examples/story/game-of-life/life/game.rb +23 -0
- data/vendor/plugins/rspec/examples/story/game-of-life/life/grid.rb +43 -0
- data/vendor/plugins/rspec/examples/stubbing_example.rb +69 -0
- data/vendor/plugins/rspec/examples/test_case_adapter_example.rb +26 -0
- data/vendor/plugins/rspec/failing_examples/diffing_spec.rb +36 -0
- data/vendor/plugins/rspec/failing_examples/failure_in_setup.rb +10 -0
- data/vendor/plugins/rspec/failing_examples/failure_in_teardown.rb +10 -0
- data/vendor/plugins/rspec/failing_examples/mocking_example.rb +40 -0
- data/vendor/plugins/rspec/failing_examples/mocking_with_flexmock.rb +26 -0
- data/vendor/plugins/rspec/failing_examples/mocking_with_mocha.rb +25 -0
- data/vendor/plugins/rspec/failing_examples/mocking_with_rr.rb +27 -0
- data/vendor/plugins/rspec/failing_examples/partial_mock_example.rb +20 -0
- data/vendor/plugins/rspec/failing_examples/predicate_example.rb +29 -0
- data/vendor/plugins/rspec/failing_examples/raising_example.rb +47 -0
- data/vendor/plugins/rspec/failing_examples/spec_helper.rb +3 -0
- data/vendor/plugins/rspec/failing_examples/syntax_error_example.rb +7 -0
- data/vendor/plugins/rspec/failing_examples/team_spec.rb +44 -0
- data/vendor/plugins/rspec/failing_examples/timeout_behaviour.rb +7 -0
- data/vendor/plugins/rspec/init.rb +3 -0
- data/vendor/plugins/rspec/lib/autotest/discover.rb +3 -0
- data/vendor/plugins/rspec/lib/autotest/rspec.rb +94 -0
- data/vendor/plugins/rspec/lib/spec.rb +12 -0
- data/vendor/plugins/rspec/lib/spec/dsl.rb +16 -0
- data/vendor/plugins/rspec/lib/spec/dsl/behaviour.rb +183 -0
- data/vendor/plugins/rspec/lib/spec/dsl/behaviour_description.rb +85 -0
- data/vendor/plugins/rspec/lib/spec/dsl/behaviour_factory.rb +59 -0
- data/vendor/plugins/rspec/lib/spec/dsl/configuration.rb +137 -0
- data/vendor/plugins/rspec/lib/spec/dsl/errors.rb +9 -0
- data/vendor/plugins/rspec/lib/spec/dsl/example.rb +7 -0
- data/vendor/plugins/rspec/lib/spec/dsl/example_definition.rb +32 -0
- data/vendor/plugins/rspec/lib/spec/dsl/example_matcher.rb +38 -0
- data/vendor/plugins/rspec/lib/spec/dsl/example_module.rb +198 -0
- data/vendor/plugins/rspec/lib/spec/dsl/example_runner.rb +147 -0
- data/vendor/plugins/rspec/lib/spec/dsl/example_suite.rb +110 -0
- data/vendor/plugins/rspec/lib/spec/dsl/pending.rb +18 -0
- data/vendor/plugins/rspec/lib/spec/dsl/shared_behaviour.rb +52 -0
- data/vendor/plugins/rspec/lib/spec/dsl/should_raise_handler.rb +64 -0
- data/vendor/plugins/rspec/lib/spec/expectations.rb +56 -0
- data/vendor/plugins/rspec/lib/spec/expectations/differs/default.rb +66 -0
- data/vendor/plugins/rspec/lib/spec/expectations/errors.rb +6 -0
- data/vendor/plugins/rspec/lib/spec/expectations/extensions.rb +2 -0
- data/vendor/plugins/rspec/lib/spec/expectations/extensions/object.rb +71 -0
- data/vendor/plugins/rspec/lib/spec/expectations/extensions/string_and_symbol.rb +17 -0
- data/vendor/plugins/rspec/lib/spec/expectations/handler.rb +52 -0
- data/vendor/plugins/rspec/lib/spec/extensions.rb +2 -0
- data/vendor/plugins/rspec/lib/spec/extensions/main.rb +51 -0
- data/vendor/plugins/rspec/lib/spec/extensions/object.rb +10 -0
- data/vendor/plugins/rspec/lib/spec/matchers.rb +153 -0
- data/vendor/plugins/rspec/lib/spec/matchers/be.rb +206 -0
- data/vendor/plugins/rspec/lib/spec/matchers/be_close.rb +37 -0
- data/vendor/plugins/rspec/lib/spec/matchers/change.rb +120 -0
- data/vendor/plugins/rspec/lib/spec/matchers/eql.rb +43 -0
- data/vendor/plugins/rspec/lib/spec/matchers/equal.rb +43 -0
- data/vendor/plugins/rspec/lib/spec/matchers/has.rb +44 -0
- data/vendor/plugins/rspec/lib/spec/matchers/have.rb +142 -0
- data/vendor/plugins/rspec/lib/spec/matchers/include.rb +70 -0
- data/vendor/plugins/rspec/lib/spec/matchers/match.rb +41 -0
- data/vendor/plugins/rspec/lib/spec/matchers/operator_matcher.rb +73 -0
- data/vendor/plugins/rspec/lib/spec/matchers/raise_error.rb +105 -0
- data/vendor/plugins/rspec/lib/spec/matchers/respond_to.rb +45 -0
- data/vendor/plugins/rspec/lib/spec/matchers/satisfy.rb +47 -0
- data/vendor/plugins/rspec/lib/spec/matchers/simple_matcher.rb +27 -0
- data/vendor/plugins/rspec/lib/spec/matchers/throw_symbol.rb +73 -0
- data/vendor/plugins/rspec/lib/spec/mocks.rb +211 -0
- data/vendor/plugins/rspec/lib/spec/mocks/argument_constraint_matchers.rb +27 -0
- data/vendor/plugins/rspec/lib/spec/mocks/argument_expectation.rb +183 -0
- data/vendor/plugins/rspec/lib/spec/mocks/error_generator.rb +84 -0
- data/vendor/plugins/rspec/lib/spec/mocks/errors.rb +10 -0
- data/vendor/plugins/rspec/lib/spec/mocks/extensions/object.rb +3 -0
- data/vendor/plugins/rspec/lib/spec/mocks/message_expectation.rb +254 -0
- data/vendor/plugins/rspec/lib/spec/mocks/methods.rb +39 -0
- data/vendor/plugins/rspec/lib/spec/mocks/mock.rb +37 -0
- data/vendor/plugins/rspec/lib/spec/mocks/order_group.rb +29 -0
- data/vendor/plugins/rspec/lib/spec/mocks/proxy.rb +170 -0
- data/vendor/plugins/rspec/lib/spec/mocks/space.rb +28 -0
- data/vendor/plugins/rspec/lib/spec/mocks/spec_methods.rb +37 -0
- data/vendor/plugins/rspec/lib/spec/rake/spectask.rb +224 -0
- data/vendor/plugins/rspec/lib/spec/rake/verify_rcov.rb +52 -0
- data/vendor/plugins/rspec/lib/spec/runner.rb +164 -0
- data/vendor/plugins/rspec/lib/spec/runner/backtrace_tweaker.rb +57 -0
- data/vendor/plugins/rspec/lib/spec/runner/behaviour_runner.rb +56 -0
- data/vendor/plugins/rspec/lib/spec/runner/command_line.rb +39 -0
- data/vendor/plugins/rspec/lib/spec/runner/drb_command_line.rb +20 -0
- data/vendor/plugins/rspec/lib/spec/runner/extensions/object.rb +32 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter.rb +9 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb +77 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb +128 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/failing_behaviours_formatter.rb +29 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/failing_examples_formatter.rb +22 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb +322 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/progress_bar_formatter.rb +31 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/rdoc_formatter.rb +24 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/snippet_extractor.rb +52 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/specdoc_formatter.rb +29 -0
- data/vendor/plugins/rspec/lib/spec/runner/heckle_runner.rb +72 -0
- data/vendor/plugins/rspec/lib/spec/runner/heckle_runner_unsupported.rb +10 -0
- data/vendor/plugins/rspec/lib/spec/runner/option_parser.rb +222 -0
- data/vendor/plugins/rspec/lib/spec/runner/options.rb +223 -0
- data/vendor/plugins/rspec/lib/spec/runner/reporter.rb +137 -0
- data/vendor/plugins/rspec/lib/spec/runner/spec_parser.rb +53 -0
- data/vendor/plugins/rspec/lib/spec/story.rb +10 -0
- data/vendor/plugins/rspec/lib/spec/story/documenter.rb +1 -0
- data/vendor/plugins/rspec/lib/spec/story/documenter/plain_text_documenter.rb +43 -0
- data/vendor/plugins/rspec/lib/spec/story/extensions.rb +1 -0
- data/vendor/plugins/rspec/lib/spec/story/extensions/main.rb +13 -0
- data/vendor/plugins/rspec/lib/spec/story/given_scenario.rb +14 -0
- data/vendor/plugins/rspec/lib/spec/story/reporter.rb +1 -0
- data/vendor/plugins/rspec/lib/spec/story/reporter/plain_text_reporter.rb +60 -0
- data/vendor/plugins/rspec/lib/spec/story/runner.rb +49 -0
- data/vendor/plugins/rspec/lib/spec/story/runner/scenario_collector.rb +18 -0
- data/vendor/plugins/rspec/lib/spec/story/runner/scenario_runner.rb +43 -0
- data/vendor/plugins/rspec/lib/spec/story/runner/story_runner.rb +65 -0
- data/vendor/plugins/rspec/lib/spec/story/scenario.rb +14 -0
- data/vendor/plugins/rspec/lib/spec/story/simple_step.rb +17 -0
- data/vendor/plugins/rspec/lib/spec/story/step_mother.rb +31 -0
- data/vendor/plugins/rspec/lib/spec/story/story.rb +22 -0
- data/vendor/plugins/rspec/lib/spec/story/world.rb +87 -0
- data/vendor/plugins/rspec/lib/spec/test.rb +9 -0
- data/vendor/plugins/rspec/lib/spec/test/unit/autorunner.rb +6 -0
- data/vendor/plugins/rspec/lib/spec/test/unit/example.rb +15 -0
- data/vendor/plugins/rspec/lib/spec/test/unit/example_suite.rb +11 -0
- data/vendor/plugins/rspec/lib/spec/test/unit/rspectestresult.rb +5 -0
- data/vendor/plugins/rspec/lib/spec/test/unit/ui/console/testrunner.rb +18 -0
- data/vendor/plugins/rspec/lib/spec/test/unit/ui/testrunnermediator.rb +10 -0
- data/vendor/plugins/rspec/lib/spec/test_case_adapter.rb +10 -0
- data/vendor/plugins/rspec/lib/spec/translator.rb +114 -0
- data/vendor/plugins/rspec/lib/spec/version.rb +23 -0
- data/vendor/plugins/rspec/plugins/mock_frameworks/flexmock.rb +23 -0
- data/vendor/plugins/rspec/plugins/mock_frameworks/mocha.rb +19 -0
- data/vendor/plugins/rspec/plugins/mock_frameworks/rr.rb +21 -0
- data/vendor/plugins/rspec/plugins/mock_frameworks/rspec.rb +18 -0
- data/vendor/plugins/rspec/rake_tasks/examples.rake +7 -0
- data/vendor/plugins/rspec/rake_tasks/examples_rdoc.rake +8 -0
- data/vendor/plugins/rspec/rake_tasks/examples_with_rcov.rake +9 -0
- data/vendor/plugins/rspec/rake_tasks/failing_examples_with_html.rake +9 -0
- data/vendor/plugins/rspec/rake_tasks/verify_rcov.rake +7 -0
- data/vendor/plugins/rspec/spec.opts +6 -0
- data/vendor/plugins/rspec/spec/README.jruby +14 -0
- data/vendor/plugins/rspec/spec/autotest/discover_spec.rb +19 -0
- data/vendor/plugins/rspec/spec/autotest/rspec_spec.rb +264 -0
- data/vendor/plugins/rspec/spec/autotest_helper.rb +5 -0
- data/vendor/plugins/rspec/spec/rspec_suite.rb +6 -0
- data/vendor/plugins/rspec/spec/spec/dsl/behaviour_description_spec.rb +97 -0
- data/vendor/plugins/rspec/spec/spec/dsl/behaviour_factory_spec.rb +22 -0
- data/vendor/plugins/rspec/spec/spec/dsl/configuration_spec.rb +61 -0
- data/vendor/plugins/rspec/spec/spec/dsl/example_class_definition_spec.rb +48 -0
- data/vendor/plugins/rspec/spec/spec/dsl/example_definition_class_spec.rb +23 -0
- data/vendor/plugins/rspec/spec/spec/dsl/example_definition_spec.rb +17 -0
- data/vendor/plugins/rspec/spec/spec/dsl/example_factory_spec.rb +69 -0
- data/vendor/plugins/rspec/spec/spec/dsl/example_instance_spec.rb +242 -0
- data/vendor/plugins/rspec/spec/spec/dsl/example_matcher_spec.rb +91 -0
- data/vendor/plugins/rspec/spec/spec/dsl/example_should_raise_spec.rb +164 -0
- data/vendor/plugins/rspec/spec/spec/dsl/example_spec.rb +399 -0
- data/vendor/plugins/rspec/spec/spec/dsl/example_suite_spec.rb +617 -0
- data/vendor/plugins/rspec/spec/spec/dsl/pending_module_spec.rb +31 -0
- data/vendor/plugins/rspec/spec/spec/dsl/predicate_matcher_spec.rb +21 -0
- data/vendor/plugins/rspec/spec/spec/dsl/shared_behaviour_spec.rb +248 -0
- data/vendor/plugins/rspec/spec/spec/expectations/differs/default_spec.rb +109 -0
- data/vendor/plugins/rspec/spec/spec/expectations/extensions/object_spec.rb +107 -0
- data/vendor/plugins/rspec/spec/spec/expectations/fail_with_spec.rb +71 -0
- data/vendor/plugins/rspec/spec/spec/extensions/main_spec.rb +33 -0
- data/vendor/plugins/rspec/spec/spec/matchers/be_close_spec.rb +39 -0
- data/vendor/plugins/rspec/spec/spec/matchers/be_spec.rb +209 -0
- data/vendor/plugins/rspec/spec/spec/matchers/change_spec.rb +232 -0
- data/vendor/plugins/rspec/spec/spec/matchers/description_generation_spec.rb +157 -0
- data/vendor/plugins/rspec/spec/spec/matchers/eql_spec.rb +28 -0
- data/vendor/plugins/rspec/spec/spec/matchers/equal_spec.rb +28 -0
- data/vendor/plugins/rspec/spec/spec/matchers/exist_spec.rb +75 -0
- data/vendor/plugins/rspec/spec/spec/matchers/handler_spec.rb +129 -0
- data/vendor/plugins/rspec/spec/spec/matchers/has_spec.rb +37 -0
- data/vendor/plugins/rspec/spec/spec/matchers/have_spec.rb +272 -0
- data/vendor/plugins/rspec/spec/spec/matchers/include_spec.rb +45 -0
- data/vendor/plugins/rspec/spec/spec/matchers/match_spec.rb +37 -0
- data/vendor/plugins/rspec/spec/spec/matchers/matcher_methods_spec.rb +78 -0
- data/vendor/plugins/rspec/spec/spec/matchers/mock_constraint_matchers_spec.rb +24 -0
- data/vendor/plugins/rspec/spec/spec/matchers/operator_matcher_spec.rb +158 -0
- data/vendor/plugins/rspec/spec/spec/matchers/raise_error_spec.rb +185 -0
- data/vendor/plugins/rspec/spec/spec/matchers/respond_to_spec.rb +54 -0
- data/vendor/plugins/rspec/spec/spec/matchers/satisfy_spec.rb +36 -0
- data/vendor/plugins/rspec/spec/spec/matchers/simple_matcher_spec.rb +26 -0
- data/vendor/plugins/rspec/spec/spec/matchers/throw_symbol_spec.rb +54 -0
- data/vendor/plugins/rspec/spec/spec/mocks/any_number_of_times_spec.rb +29 -0
- data/vendor/plugins/rspec/spec/spec/mocks/argument_expectation_spec.rb +23 -0
- data/vendor/plugins/rspec/spec/spec/mocks/at_least_spec.rb +97 -0
- data/vendor/plugins/rspec/spec/spec/mocks/at_most_spec.rb +93 -0
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_10260_spec.rb +8 -0
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_11545_spec.rb +31 -0
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_7611_spec.rb +19 -0
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_7805_spec.rb +22 -0
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_8165_spec.rb +31 -0
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_8302_spec.rb +26 -0
- data/vendor/plugins/rspec/spec/spec/mocks/failing_mock_argument_constraints_spec.rb +115 -0
- data/vendor/plugins/rspec/spec/spec/mocks/mock_ordering_spec.rb +84 -0
- data/vendor/plugins/rspec/spec/spec/mocks/mock_space_spec.rb +54 -0
- data/vendor/plugins/rspec/spec/spec/mocks/mock_spec.rb +450 -0
- data/vendor/plugins/rspec/spec/spec/mocks/multiple_return_value_spec.rb +113 -0
- data/vendor/plugins/rspec/spec/spec/mocks/null_object_mock_spec.rb +40 -0
- data/vendor/plugins/rspec/spec/spec/mocks/once_counts_spec.rb +53 -0
- data/vendor/plugins/rspec/spec/spec/mocks/options_hash_spec.rb +42 -0
- data/vendor/plugins/rspec/spec/spec/mocks/partial_mock_spec.rb +106 -0
- data/vendor/plugins/rspec/spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb +66 -0
- data/vendor/plugins/rspec/spec/spec/mocks/passing_mock_argument_constraints_spec.rb +154 -0
- data/vendor/plugins/rspec/spec/spec/mocks/precise_counts_spec.rb +52 -0
- data/vendor/plugins/rspec/spec/spec/mocks/record_messages_spec.rb +26 -0
- data/vendor/plugins/rspec/spec/spec/mocks/stub_spec.rb +215 -0
- data/vendor/plugins/rspec/spec/spec/mocks/twice_counts_spec.rb +67 -0
- data/vendor/plugins/rspec/spec/spec/package/bin_spec_spec.rb +12 -0
- data/vendor/plugins/rspec/spec/spec/runner/command_line_spec.rb +140 -0
- data/vendor/plugins/rspec/spec/spec/runner/drb_command_line_spec.rb +92 -0
- data/vendor/plugins/rspec/spec/spec/runner/empty_file.txt +0 -0
- data/vendor/plugins/rspec/spec/spec/runner/examples.txt +2 -0
- data/vendor/plugins/rspec/spec/spec/runner/execution_context_spec.rb +31 -0
- data/vendor/plugins/rspec/spec/spec/runner/failed.txt +3 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/failing_behaviours_formatter_spec.rb +41 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/failing_examples_formatter_spec.rb +30 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.4.html +365 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html +375 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5.html +371 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6.html +371 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb +54 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/progress_bar_formatter_dry_run_spec.rb +21 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/progress_bar_formatter_failure_dump_spec.rb +39 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +110 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/rdoc_formatter_dry_run_spec.rb +21 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/rdoc_formatter_spec.rb +48 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/snippet_extractor_spec.rb +11 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/specdoc_formatter_dry_run_spec.rb +21 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/specdoc_formatter_spec.rb +64 -0
- data/vendor/plugins/rspec/spec/spec/runner/heckle_runner_spec.rb +62 -0
- data/vendor/plugins/rspec/spec/spec/runner/heckler_spec.rb +13 -0
- data/vendor/plugins/rspec/spec/spec/runner/noisy_backtrace_tweaker_spec.rb +45 -0
- data/vendor/plugins/rspec/spec/spec/runner/object_ext_spec.rb +11 -0
- data/vendor/plugins/rspec/spec/spec/runner/option_parser_spec.rb +356 -0
- data/vendor/plugins/rspec/spec/spec/runner/options_spec.rb +255 -0
- data/vendor/plugins/rspec/spec/spec/runner/quiet_backtrace_tweaker_spec.rb +56 -0
- data/vendor/plugins/rspec/spec/spec/runner/reporter_spec.rb +216 -0
- data/vendor/plugins/rspec/spec/spec/runner/spec.opts +2 -0
- data/vendor/plugins/rspec/spec/spec/runner/spec_parser_spec.rb +124 -0
- data/vendor/plugins/rspec/spec/spec/runner/spec_spaced.opts +2 -0
- data/vendor/plugins/rspec/spec/spec/runner_spec.rb +11 -0
- data/vendor/plugins/rspec/spec/spec/spec_classes.rb +123 -0
- data/vendor/plugins/rspec/spec/spec/story/builders.rb +46 -0
- data/vendor/plugins/rspec/spec/spec/story/documenter/plain_text_documenter_spec.rb +100 -0
- data/vendor/plugins/rspec/spec/spec/story/extensions_spec.rb +14 -0
- data/vendor/plugins/rspec/spec/spec/story/given_scenario_spec.rb +27 -0
- data/vendor/plugins/rspec/spec/spec/story/reporter/plain_text_reporter_spec.rb +114 -0
- data/vendor/plugins/rspec/spec/spec/story/rspec_adapter.rb +49 -0
- data/vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb +27 -0
- data/vendor/plugins/rspec/spec/spec/story/runner/scenario_runner_spec.rb +145 -0
- data/vendor/plugins/rspec/spec/spec/story/runner/story_runner_spec.rb +247 -0
- data/vendor/plugins/rspec/spec/spec/story/runner_spec.rb +64 -0
- data/vendor/plugins/rspec/spec/spec/story/scenario_spec.rb +20 -0
- data/vendor/plugins/rspec/spec/spec/story/simple_step_spec.rb +37 -0
- data/vendor/plugins/rspec/spec/spec/story/step_mother_spec.rb +59 -0
- data/vendor/plugins/rspec/spec/spec/story/story_helper.rb +3 -0
- data/vendor/plugins/rspec/spec/spec/story/story_spec.rb +45 -0
- data/vendor/plugins/rspec/spec/spec/story/world_spec.rb +406 -0
- data/vendor/plugins/rspec/spec/spec/test/unit/autorunner_test.rb +12 -0
- data/vendor/plugins/rspec/spec/spec/test/unit/sample_spec_test.rb +28 -0
- data/vendor/plugins/rspec/spec/spec/test/unit/spec_helper.rb +4 -0
- data/vendor/plugins/rspec/spec/spec/test/unit/test_unit_and_rspec_spec.rb +28 -0
- data/vendor/plugins/rspec/spec/spec/translator_spec.rb +264 -0
- data/vendor/plugins/rspec/spec/spec_helper.rb +56 -0
- data/vendor/plugins/rspec_on_rails/MIT-LICENSE +31 -0
- data/vendor/plugins/rspec_on_rails/README +1 -0
- data/vendor/plugins/rspec_on_rails/Rakefile +9 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec/CHANGES +1 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec/rspec_generator.rb +34 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/all_stories.rb +4 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/previous_failures.txt +0 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/script/spec +4 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/script/spec_server +103 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/spec.opts +6 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/spec_helper.rb +23 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/stories_helper.rb +3 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_controller/USAGE +33 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_controller/rspec_controller_generator.rb +49 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/controller_spec.rb +23 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/helper_spec.rb +11 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/view_spec.rb +12 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_model/USAGE +18 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_model/rspec_model_generator.rb +30 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_model/templates/model_spec.rb +11 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/rspec_scaffold_generator.rb +165 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/controller_spec.rb +355 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/edit_erb_spec.rb +25 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/helper_spec.rb +4 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/index_erb_spec.rb +22 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/new_erb_spec.rb +26 -0
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/show_erb_spec.rb +22 -0
- data/vendor/plugins/rspec_on_rails/init.rb +9 -0
- data/vendor/plugins/rspec_on_rails/lib/autotest/rails_rspec.rb +81 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/dsl.rb +2 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/dsl/configuration.rb +23 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/matchers.rb +3 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/matchers/have.rb +19 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails.rb +57 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/dsl.rb +40 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/assigns_hash_proxy.rb +42 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour.rb +7 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/controller_example.rb +251 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/functional_example.rb +67 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/helper_example.rb +82 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/model_example.rb +14 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/rails_example.rb +93 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/render_observer.rb +90 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/view_example.rb +181 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/ivar_proxy.rb +62 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions.rb +7 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/base.rb +11 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/rescue.rb +21 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/test_response.rb +11 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_view/base.rb +27 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/active_record/base.rb +29 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/object.rb +5 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers.rb +29 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/assert_select.rb +130 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/have_text.rb +55 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/redirect_to.rb +114 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/render_template.rb +66 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/story_adapter.rb +47 -0
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb +26 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb +39 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/autotest/rails_rspec_spec.rb +8 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/dsl/assigns_hash_proxy_spec.rb +55 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/dsl/behaviour_factory_spec.rb +83 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/dsl/configuration_spec.rb +56 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/dsl/controller_isolation_spec.rb +43 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/dsl/controller_spec_spec.rb +166 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/dsl/helper_spec_spec.rb +106 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/dsl/ivar_proxy_spec.rb +64 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/dsl/model_spec_spec.rb +14 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/dsl/shared_behaviour_spec.rb +16 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/dsl/test_unit_assertion_accessibility_spec.rb +33 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/dsl/view_spec_spec.rb +245 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/extensions/action_controller_rescue_action_spec.rb +54 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/extensions/action_view_base_spec.rb +34 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/extensions/active_record_spec.rb +17 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/matchers/assert_select_spec.rb +783 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/matchers/description_generation_spec.rb +40 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/matchers/errors_on_spec.rb +13 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/matchers/redirect_to_spec.rb +203 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/matchers/render_spec.rb +131 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/mocks/mock_model_spec.rb +65 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/sample_spec.rb +7 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/spec_server_spec.rb +47 -0
- data/vendor/plugins/rspec_on_rails/spec/rails/spec_spec.rb +11 -0
- data/vendor/plugins/rspec_on_rails/spec/rails_suite.rb +7 -0
- data/vendor/plugins/rspec_on_rails/spec/spec_helper.rb +48 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/controllers/action_view_base_spec_controller.rb +2 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/controllers/controller_spec_controller.rb +48 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/controllers/redirect_spec_controller.rb +59 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/controllers/render_spec_controller.rb +22 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/controllers/rjs_spec_controller.rb +58 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/helpers/explicit_helper.rb +10 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/helpers/more_explicit_helper.rb +5 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/helpers/plugin_application_helper.rb +6 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/helpers/view_spec_helper.rb +13 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/_partial.rhtml +0 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_setting_flash_after_session_reset.rhtml +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_setting_flash_before_session_reset.rhtml +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_setting_the_assigns_hash.rhtml +0 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_with_errors_in_template.rhtml +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/controller_spec/action_with_template.rhtml +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/render_spec/_a_partial.rhtml +0 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/render_spec/some_action.js.rjs +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/render_spec/some_action.rhtml +0 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/render_spec/some_action.rjs +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/_replacement_partial.rhtml +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/hide_div.rjs +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/hide_page_element.rjs +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/insert_html.rjs +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/replace.rjs +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/replace_html.rjs +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/replace_html_with_partial.rjs +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/visual_effect.rjs +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/rjs_spec/visual_toggle_effect.rjs +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/tag_spec/no_tags.rhtml +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/tag_spec/single_div_with_no_attributes.rhtml +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/tag_spec/single_div_with_one_attribute.rhtml +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial.rhtml +2 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial_used_twice.rhtml +0 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial_with_local_variable.rhtml +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_partial_with_sub_partial.rhtml +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/_spacer.rhtml +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/accessor.rhtml +3 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/entry_form.rhtml +2 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/explicit_helper.rhtml +2 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/foo/show.rhtml +1 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/implicit_helper.rhtml +2 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/multiple_helpers.rhtml +3 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/template_with_partial.rhtml +5 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/template_with_partial_using_collection.rhtml +3 -0
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/template_with_partial_with_array.rhtml +1 -0
- data/vendor/plugins/rspec_on_rails/tasks/rspec.rake +133 -0
- metadata +875 -0
@@ -0,0 +1,158 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper.rb'
|
2
|
+
|
3
|
+
require 'spec/expectations/differs/default'
|
4
|
+
|
5
|
+
describe "should ==" do
|
6
|
+
|
7
|
+
it "should delegate message to target" do
|
8
|
+
subject = "apple"
|
9
|
+
subject.should_receive(:==).with("apple").and_return(true)
|
10
|
+
subject.should == "apple"
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should fail when target.==(actual) returns false" do
|
14
|
+
subject = "apple"
|
15
|
+
Spec::Expectations.should_receive(:fail_with).with(%[expected: "orange",\n got: "apple" (using ==)], "orange", "apple")
|
16
|
+
subject.should == "orange"
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "should_not ==" do
|
22
|
+
|
23
|
+
it "should delegate message to target" do
|
24
|
+
subject = "orange"
|
25
|
+
subject.should_receive(:==).with("apple").and_return(false)
|
26
|
+
subject.should_not == "apple"
|
27
|
+
end
|
28
|
+
|
29
|
+
it "should fail when target.==(actual) returns false" do
|
30
|
+
subject = "apple"
|
31
|
+
Spec::Expectations.should_receive(:fail_with).with(%[expected not: == "apple",\n got: "apple"], "apple", "apple")
|
32
|
+
subject.should_not == "apple"
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
describe "should ===" do
|
38
|
+
|
39
|
+
it "should delegate message to target" do
|
40
|
+
subject = "apple"
|
41
|
+
subject.should_receive(:===).with("apple").and_return(true)
|
42
|
+
subject.should === "apple"
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should fail when target.===(actual) returns false" do
|
46
|
+
subject = "apple"
|
47
|
+
subject.should_receive(:===).with("orange").and_return(false)
|
48
|
+
Spec::Expectations.should_receive(:fail_with).with(%[expected: "orange",\n got: "apple" (using ===)], "orange", "apple")
|
49
|
+
subject.should === "orange"
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
|
54
|
+
describe "should_not ===" do
|
55
|
+
|
56
|
+
it "should delegate message to target" do
|
57
|
+
subject = "orange"
|
58
|
+
subject.should_receive(:===).with("apple").and_return(false)
|
59
|
+
subject.should_not === "apple"
|
60
|
+
end
|
61
|
+
|
62
|
+
it "should fail when target.===(actual) returns false" do
|
63
|
+
subject = "apple"
|
64
|
+
subject.should_receive(:===).with("apple").and_return(true)
|
65
|
+
Spec::Expectations.should_receive(:fail_with).with(%[expected not: === "apple",\n got: "apple"], "apple", "apple")
|
66
|
+
subject.should_not === "apple"
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
70
|
+
|
71
|
+
describe "should =~" do
|
72
|
+
|
73
|
+
it "should delegate message to target" do
|
74
|
+
subject = "foo"
|
75
|
+
subject.should_receive(:=~).with(/oo/).and_return(true)
|
76
|
+
subject.should =~ /oo/
|
77
|
+
end
|
78
|
+
|
79
|
+
it "should fail when target.=~(actual) returns false" do
|
80
|
+
subject = "fu"
|
81
|
+
subject.should_receive(:=~).with(/oo/).and_return(false)
|
82
|
+
Spec::Expectations.should_receive(:fail_with).with(%[expected: /oo/,\n got: "fu" (using =~)], /oo/, "fu")
|
83
|
+
subject.should =~ /oo/
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
describe "should_not =~" do
|
89
|
+
|
90
|
+
it "should delegate message to target" do
|
91
|
+
subject = "fu"
|
92
|
+
subject.should_receive(:=~).with(/oo/).and_return(false)
|
93
|
+
subject.should_not =~ /oo/
|
94
|
+
end
|
95
|
+
|
96
|
+
it "should fail when target.=~(actual) returns false" do
|
97
|
+
subject = "foo"
|
98
|
+
subject.should_receive(:=~).with(/oo/).and_return(true)
|
99
|
+
Spec::Expectations.should_receive(:fail_with).with(%[expected not: =~ /oo/,\n got: "foo"], /oo/, "foo")
|
100
|
+
subject.should_not =~ /oo/
|
101
|
+
end
|
102
|
+
|
103
|
+
end
|
104
|
+
|
105
|
+
describe "should >" do
|
106
|
+
|
107
|
+
it "should pass if > passes" do
|
108
|
+
4.should > 3
|
109
|
+
end
|
110
|
+
|
111
|
+
it "should fail if > fails" do
|
112
|
+
Spec::Expectations.should_receive(:fail_with).with(%[expected: > 5,\n got: 4], 5, 4)
|
113
|
+
4.should > 5
|
114
|
+
end
|
115
|
+
|
116
|
+
end
|
117
|
+
|
118
|
+
describe "should >=" do
|
119
|
+
|
120
|
+
it "should pass if >= passes" do
|
121
|
+
4.should > 3
|
122
|
+
4.should >= 4
|
123
|
+
end
|
124
|
+
|
125
|
+
it "should fail if > fails" do
|
126
|
+
Spec::Expectations.should_receive(:fail_with).with(%[expected: >= 5,\n got: 4], 5, 4)
|
127
|
+
4.should >= 5
|
128
|
+
end
|
129
|
+
|
130
|
+
end
|
131
|
+
|
132
|
+
describe "should <" do
|
133
|
+
|
134
|
+
it "should pass if < passes" do
|
135
|
+
4.should < 5
|
136
|
+
end
|
137
|
+
|
138
|
+
it "should fail if > fails" do
|
139
|
+
Spec::Expectations.should_receive(:fail_with).with(%[expected: < 3,\n got: 4], 3, 4)
|
140
|
+
4.should < 3
|
141
|
+
end
|
142
|
+
|
143
|
+
end
|
144
|
+
|
145
|
+
describe "should <=" do
|
146
|
+
|
147
|
+
it "should pass if <= passes" do
|
148
|
+
4.should <= 5
|
149
|
+
4.should <= 4
|
150
|
+
end
|
151
|
+
|
152
|
+
it "should fail if > fails" do
|
153
|
+
Spec::Expectations.should_receive(:fail_with).with(%[expected: <= 3,\n got: 4], 3, 4)
|
154
|
+
4.should <= 3
|
155
|
+
end
|
156
|
+
|
157
|
+
end
|
158
|
+
|
@@ -0,0 +1,185 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper.rb'
|
2
|
+
|
3
|
+
describe "should raise_error" do
|
4
|
+
it "should pass if anything is raised" do
|
5
|
+
lambda {raise}.should raise_error
|
6
|
+
end
|
7
|
+
|
8
|
+
it "should fail if nothing is raised" do
|
9
|
+
lambda {
|
10
|
+
lambda {}.should raise_error
|
11
|
+
}.should fail_with("expected Exception but nothing was raised")
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe "should_not raise_error" do
|
16
|
+
it "should pass if nothing is raised" do
|
17
|
+
lambda {}.should_not raise_error
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should fail if anything is raised" do
|
21
|
+
lambda {
|
22
|
+
lambda {raise}.should_not raise_error
|
23
|
+
}.should fail_with("expected no Exception, got RuntimeError")
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe "should raise_error(message)" do
|
28
|
+
it "should pass if RuntimeError is raised with the right message" do
|
29
|
+
lambda {raise 'blah'}.should raise_error('blah')
|
30
|
+
end
|
31
|
+
it "should pass if any other error is raised with the right message" do
|
32
|
+
lambda {raise NameError.new('blah')}.should raise_error('blah')
|
33
|
+
end
|
34
|
+
it "should fail if RuntimeError error is raised with the wrong message" do
|
35
|
+
lambda do
|
36
|
+
lambda {raise 'blarg'}.should raise_error('blah')
|
37
|
+
end.should fail_with("expected Exception with \"blah\", got #<RuntimeError: blarg>")
|
38
|
+
end
|
39
|
+
it "should fail if any other error is raised with the wrong message" do
|
40
|
+
lambda do
|
41
|
+
lambda {raise NameError.new('blarg')}.should raise_error('blah')
|
42
|
+
end.should fail_with("expected Exception with \"blah\", got #<NameError: blarg>")
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe "should_not raise_error(message)" do
|
47
|
+
it "should pass if RuntimeError error is raised with the different message" do
|
48
|
+
lambda {raise 'blarg'}.should_not raise_error('blah')
|
49
|
+
end
|
50
|
+
it "should pass if any other error is raised with the wrong message" do
|
51
|
+
lambda {raise NameError.new('blarg')}.should_not raise_error('blah')
|
52
|
+
end
|
53
|
+
it "should fail if RuntimeError is raised with message" do
|
54
|
+
lambda do
|
55
|
+
lambda {raise 'blah'}.should_not raise_error('blah')
|
56
|
+
end.should fail_with(%Q|expected no Exception with "blah", got #<RuntimeError: blah>|)
|
57
|
+
end
|
58
|
+
it "should fail if any other error is raised with message" do
|
59
|
+
lambda do
|
60
|
+
lambda {raise NameError.new('blah')}.should_not raise_error('blah')
|
61
|
+
end.should fail_with(%Q|expected no Exception with "blah", got #<NameError: blah>|)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe "should raise_error(NamedError)" do
|
66
|
+
it "should pass if named error is raised" do
|
67
|
+
lambda { non_existent_method }.should raise_error(NameError)
|
68
|
+
end
|
69
|
+
|
70
|
+
it "should fail if nothing is raised" do
|
71
|
+
lambda {
|
72
|
+
lambda { }.should raise_error(NameError)
|
73
|
+
}.should fail_with("expected NameError but nothing was raised")
|
74
|
+
end
|
75
|
+
|
76
|
+
it "should fail if another error is raised" do
|
77
|
+
lambda {
|
78
|
+
lambda { raise }.should raise_error(NameError)
|
79
|
+
}.should fail_with("expected NameError, got RuntimeError")
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
describe "should_not raise_error(NamedError)" do
|
84
|
+
it "should pass if nothing is raised" do
|
85
|
+
lambda { }.should_not raise_error(NameError)
|
86
|
+
end
|
87
|
+
|
88
|
+
it "should pass if another error is raised" do
|
89
|
+
lambda { raise }.should_not raise_error(NameError)
|
90
|
+
end
|
91
|
+
|
92
|
+
it "should fail if named error is raised" do
|
93
|
+
lambda {
|
94
|
+
lambda { non_existent_method }.should_not raise_error(NameError)
|
95
|
+
}.should fail_with(/expected no NameError, got #<NameError: undefined/)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
describe "should raise_error(NamedError, error_message) with String" do
|
100
|
+
it "should pass if named error is raised with same message" do
|
101
|
+
lambda { raise "example message" }.should raise_error(RuntimeError, "example message")
|
102
|
+
end
|
103
|
+
|
104
|
+
it "should fail if nothing is raised" do
|
105
|
+
lambda {
|
106
|
+
lambda {}.should raise_error(RuntimeError, "example message")
|
107
|
+
}.should fail_with("expected RuntimeError with \"example message\" but nothing was raised")
|
108
|
+
end
|
109
|
+
|
110
|
+
it "should fail if incorrect error is raised" do
|
111
|
+
lambda {
|
112
|
+
lambda { raise }.should raise_error(NameError, "example message")
|
113
|
+
}.should fail_with("expected NameError with \"example message\", got RuntimeError")
|
114
|
+
end
|
115
|
+
|
116
|
+
it "should fail if correct error is raised with incorrect message" do
|
117
|
+
lambda {
|
118
|
+
lambda { raise RuntimeError.new("not the example message") }.should raise_error(RuntimeError, "example message")
|
119
|
+
}.should fail_with(/expected RuntimeError with \"example message\", got #<RuntimeError: not the example message/)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
describe "should_not raise_error(NamedError, error_message) with String" do
|
124
|
+
it "should pass if nothing is raised" do
|
125
|
+
lambda {}.should_not raise_error(RuntimeError, "example message")
|
126
|
+
end
|
127
|
+
|
128
|
+
it "should pass if a different error is raised" do
|
129
|
+
lambda { raise }.should_not raise_error(NameError, "example message")
|
130
|
+
end
|
131
|
+
|
132
|
+
it "should pass if same error is raised with different message" do
|
133
|
+
lambda { raise RuntimeError.new("not the example message") }.should_not raise_error(RuntimeError, "example message")
|
134
|
+
end
|
135
|
+
|
136
|
+
it "should fail if named error is raised with same message" do
|
137
|
+
lambda {
|
138
|
+
lambda { raise "example message" }.should_not raise_error(RuntimeError, "example message")
|
139
|
+
}.should fail_with("expected no RuntimeError with \"example message\", got #<RuntimeError: example message>")
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
describe "should raise_error(NamedError, error_message) with Regexp" do
|
144
|
+
it "should pass if named error is raised with matching message" do
|
145
|
+
lambda { raise "example message" }.should raise_error(RuntimeError, /ample mess/)
|
146
|
+
end
|
147
|
+
|
148
|
+
it "should fail if nothing is raised" do
|
149
|
+
lambda {
|
150
|
+
lambda {}.should raise_error(RuntimeError, /ample mess/)
|
151
|
+
}.should fail_with("expected RuntimeError with message matching /ample mess/ but nothing was raised")
|
152
|
+
end
|
153
|
+
|
154
|
+
it "should fail if incorrect error is raised" do
|
155
|
+
lambda {
|
156
|
+
lambda { raise }.should raise_error(NameError, /ample mess/)
|
157
|
+
}.should fail_with("expected NameError with message matching /ample mess/, got RuntimeError")
|
158
|
+
end
|
159
|
+
|
160
|
+
it "should fail if correct error is raised with incorrect message" do
|
161
|
+
lambda {
|
162
|
+
lambda { raise RuntimeError.new("not the example message") }.should raise_error(RuntimeError, /less than ample mess/)
|
163
|
+
}.should fail_with("expected RuntimeError with message matching /less than ample mess/, got #<RuntimeError: not the example message>")
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
describe "should_not raise_error(NamedError, error_message) with Regexp" do
|
168
|
+
it "should pass if nothing is raised" do
|
169
|
+
lambda {}.should_not raise_error(RuntimeError, /ample mess/)
|
170
|
+
end
|
171
|
+
|
172
|
+
it "should pass if a different error is raised" do
|
173
|
+
lambda { raise }.should_not raise_error(NameError, /ample mess/)
|
174
|
+
end
|
175
|
+
|
176
|
+
it "should pass if same error is raised with non-matching message" do
|
177
|
+
lambda { raise RuntimeError.new("non matching message") }.should_not raise_error(RuntimeError, /ample mess/)
|
178
|
+
end
|
179
|
+
|
180
|
+
it "should fail if named error is raised with matching message" do
|
181
|
+
lambda {
|
182
|
+
lambda { raise "example message" }.should_not raise_error(RuntimeError, /ample mess/)
|
183
|
+
}.should fail_with("expected no RuntimeError with message matching /ample mess/, got #<RuntimeError: example message>")
|
184
|
+
end
|
185
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper.rb'
|
2
|
+
|
3
|
+
describe "should respond_to(:sym)" do
|
4
|
+
|
5
|
+
it "should pass if target responds to :sym" do
|
6
|
+
Object.new.should respond_to(:methods)
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should fail target does not respond to :sym" do
|
10
|
+
lambda {
|
11
|
+
Object.new.should respond_to(:some_method)
|
12
|
+
}.should fail_with("expected target to respond to :some_method")
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
describe "should respond_to(message1, message2)" do
|
18
|
+
|
19
|
+
it "should pass if target responds to both messages" do
|
20
|
+
Object.new.should respond_to('methods', 'inspect')
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should fail target does not respond to first message" do
|
24
|
+
lambda {
|
25
|
+
Object.new.should respond_to('method_one', 'inspect')
|
26
|
+
}.should fail_with('expected target to respond to "method_one"')
|
27
|
+
end
|
28
|
+
|
29
|
+
it "should fail target does not respond to second message" do
|
30
|
+
lambda {
|
31
|
+
Object.new.should respond_to('inspect', 'method_one')
|
32
|
+
}.should fail_with('expected target to respond to "method_one"')
|
33
|
+
end
|
34
|
+
|
35
|
+
it "should fail target does not respond to either message" do
|
36
|
+
lambda {
|
37
|
+
Object.new.should respond_to('method_one', 'method_two')
|
38
|
+
}.should fail_with('expected target to respond to "method_one", "method_two"')
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
describe "should_not respond_to(:sym)" do
|
43
|
+
|
44
|
+
it "should pass if target does not respond to :sym" do
|
45
|
+
Object.new.should_not respond_to(:some_method)
|
46
|
+
end
|
47
|
+
|
48
|
+
it "should fail target responds to :sym" do
|
49
|
+
lambda {
|
50
|
+
Object.new.should_not respond_to(:methods)
|
51
|
+
}.should fail_with("expected target not to respond to :methods")
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper.rb'
|
2
|
+
|
3
|
+
describe "should satisfy { block }" do
|
4
|
+
it "should pass if block returns true" do
|
5
|
+
true.should satisfy { |val| val }
|
6
|
+
true.should satisfy do |val|
|
7
|
+
val
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should fail if block returns false" do
|
12
|
+
lambda {
|
13
|
+
false.should satisfy { |val| val }
|
14
|
+
}.should fail_with("expected false to satisfy block")
|
15
|
+
lambda do
|
16
|
+
false.should satisfy do |val|
|
17
|
+
val
|
18
|
+
end
|
19
|
+
end.should fail_with("expected false to satisfy block")
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe "should_not satisfy { block }" do
|
24
|
+
it "should pass if block returns false" do
|
25
|
+
false.should_not satisfy { |val| val }
|
26
|
+
false.should_not satisfy do |val|
|
27
|
+
val
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
it "should fail if block returns true" do
|
32
|
+
lambda {
|
33
|
+
true.should_not satisfy { |val| val }
|
34
|
+
}.should fail_with("expected true not to satisfy block")
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
module Spec
|
4
|
+
module Matchers
|
5
|
+
describe SimpleMatcher do
|
6
|
+
it "should match pass match arg to block" do
|
7
|
+
actual = nil
|
8
|
+
matcher = simple_matcher("message") do |given| actual = given end
|
9
|
+
matcher.matches?("foo")
|
10
|
+
actual.should == "foo"
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should provide a stock failure message" do
|
14
|
+
matcher = simple_matcher("thing") do end
|
15
|
+
matcher.matches?("other")
|
16
|
+
matcher.failure_message.should =~ /expected \"thing\" but got \"other\"/
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should provide a stock negative failure message" do
|
20
|
+
matcher = simple_matcher("thing") do end
|
21
|
+
matcher.matches?("other")
|
22
|
+
matcher.negative_failure_message.should =~ /expected not to get \"thing\", but got \"other\"/
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|