picolena 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +11 -4
- data/Manifest.txt +1 -0
- data/README.txt +2 -2
- data/bin/picolena +1 -1
- data/config/hoe.rb +10 -10
- data/lib/picolena/USAGE +1 -1
- data/lib/picolena/config/basic.rb +11 -11
- data/lib/picolena/picolena_generator.rb +15 -14
- data/lib/picolena/templates/app/controllers/application.rb +5 -5
- data/lib/picolena/templates/app/controllers/documents_controller.rb +17 -9
- data/lib/picolena/templates/app/helpers/documents_helper.rb +15 -14
- data/lib/picolena/templates/app/models/document.rb +28 -37
- data/lib/picolena/templates/app/models/finder.rb +12 -37
- data/lib/picolena/templates/app/models/indexer.rb +58 -37
- data/lib/picolena/templates/app/models/plain_text_extractor.rb +16 -16
- data/lib/picolena/templates/app/models/query.rb +5 -5
- data/lib/picolena/templates/app/views/documents/show.html.haml +3 -3
- data/lib/picolena/templates/app/views/layouts/application.html.haml +2 -2
- data/lib/picolena/templates/config/environment.rb +1 -1
- data/lib/picolena/templates/config/initializers/002_load_indexed_dirs.rb +8 -8
- data/lib/picolena/templates/config/initializers/003_load_white_list_IPs.rb +8 -8
- data/lib/picolena/templates/config/initializers/005_load_custom_title_and_names_and_links.rb +5 -5
- data/lib/picolena/templates/config/initializers/006_load_icons.rb +9 -7
- data/lib/picolena/templates/lang/ui/es.yml +1 -1
- data/lib/picolena/templates/lib/core_exts.rb +7 -7
- data/lib/picolena/templates/lib/plain_text_extractor_DSL.rb +10 -10
- data/lib/picolena/templates/lib/plain_text_extractors/ms.excel.rb +1 -1
- data/lib/picolena/templates/lib/plain_text_extractors/plain_text.rb +2 -2
- data/lib/picolena/templates/lib/tasks/index.rake +8 -3
- data/lib/picolena/templates/lib/tasks/install_dependencies.rake +2 -2
- data/lib/picolena/templates/lib/tasks/log.rake +1 -1
- data/lib/picolena/templates/public/.htaccess +3 -3
- data/lib/picolena/templates/public/images/flags/sv.png +0 -0
- data/lib/picolena/templates/public/stylesheets/style.css +2 -2
- data/lib/picolena/templates/script/spec_server +1 -1
- data/lib/picolena/templates/spec/controllers/application_controller_spec.rb +2 -2
- data/lib/picolena/templates/spec/controllers/documents_controller_spec.rb +17 -17
- data/lib/picolena/templates/spec/helpers/application_helper_spec.rb +2 -2
- data/lib/picolena/templates/spec/helpers/documents_helper_spec.rb +3 -3
- data/lib/picolena/templates/spec/models/basic_finder_spec.rb +14 -14
- data/lib/picolena/templates/spec/models/document_spec.rb +7 -15
- data/lib/picolena/templates/spec/models/finder_spec.rb +45 -38
- data/lib/picolena/templates/spec/models/host_indexing_system_spec.rb +5 -5
- data/lib/picolena/templates/spec/models/index_directories_spec.rb +2 -2
- data/lib/picolena/templates/spec/models/plain_text_extractor_spec.rb +6 -6
- data/lib/picolena/templates/spec/models/query_spec.rb +7 -7
- data/lib/picolena/templates/spec/rcov.opts +1 -1
- data/lib/picolena/templates/spec/test_dirs/indexed/basic/myfirstjavaprog.java +1 -1
- data/lib/picolena/templates/spec/test_dirs/indexed/basic/queens.for +1 -1
- data/lib/picolena/templates/spec/test_dirs/indexed/lang/hugo +74 -74
- data/lib/picolena/templates/spec/test_dirs/indexed/lang/lorca +56 -56
- data/lib/picolena/templates/spec/test_dirs/indexed/others/7.html +4 -4
- data/lib/picolena/templates/spec/test_dirs/indexed/others/ccmatrix1.cpp +6 -6
- data/lib/picolena/templates/spec/test_dirs/indexed/others/lemonde.htm +326 -326
- data/lib/picolena/templates/spec/test_dirs/indexed/others/nested/ReadMe.rtf +62 -62
- data/lib/picolena/templates/spec/test_dirs/indexed/others/xor.vee +0 -1
- data/lib/picolena/templates/spec/test_dirs/indexed/others/zafh.net.html +1 -1
- data/lib/picolena/version.rb +1 -1
- data/lib/rubigen_ext.rb +1 -1
- data/rails_plugins/globalite/CHANGELOG +1 -1
- data/rails_plugins/globalite/README +19 -19
- data/rails_plugins/globalite/lang/rails/de-DE.yml +6 -6
- data/rails_plugins/globalite/lang/rails/en-UK.yml +10 -10
- data/rails_plugins/globalite/lang/rails/en-US.yml +10 -10
- data/rails_plugins/globalite/lang/rails/es-ES.yml +11 -11
- data/rails_plugins/globalite/lang/rails/fr-FR.yml +10 -10
- data/rails_plugins/globalite/lang/rails/it.yml +10 -10
- data/rails_plugins/globalite/lang/rails/pt-BR.yml +6 -6
- data/rails_plugins/globalite/lang/rails/pt-PT.yml +6 -6
- data/rails_plugins/globalite/lib/globalite/l10n.rb +25 -25
- data/rails_plugins/globalite/lib/globalite/locale.rb +9 -9
- data/rails_plugins/globalite/lib/rails/core_ext.rb +4 -4
- data/rails_plugins/globalite/lib/rails/localization.rb +3 -3
- data/rails_plugins/globalite/lib/rails/localized_action_view.rb +17 -17
- data/rails_plugins/globalite/lib/rails/localized_active_record.rb +4 -4
- data/rails_plugins/globalite/rdoc/classes/ActionView/Helpers/DateHelper.html +19 -19
- data/rails_plugins/globalite/rdoc/classes/ActionView/Helpers/FormOptionsHelper.html +9 -9
- data/rails_plugins/globalite/rdoc/classes/ActionView/Helpers/NumberHelper.html +8 -8
- data/rails_plugins/globalite/rdoc/classes/ActionView/Helpers.html +5 -5
- data/rails_plugins/globalite/rdoc/classes/ActionView.html +5 -5
- data/rails_plugins/globalite/rdoc/classes/ActiveRecord/Errors.html +6 -6
- data/rails_plugins/globalite/rdoc/classes/ActiveRecord.html +5 -5
- data/rails_plugins/globalite/rdoc/classes/Array.html +6 -6
- data/rails_plugins/globalite/rdoc/classes/Date.html +8 -8
- data/rails_plugins/globalite/rdoc/classes/Globalite/L10n.html +49 -49
- data/rails_plugins/globalite/rdoc/classes/Globalite.html +6 -6
- data/rails_plugins/globalite/rdoc/classes/Kernel.html +6 -6
- data/rails_plugins/globalite/rdoc/classes/Locale.html +11 -11
- data/rails_plugins/globalite/rdoc/classes/Time.html +8 -8
- data/rails_plugins/globalite/rdoc/files/README.html +5 -5
- data/rails_plugins/globalite/rdoc/files/lib/globalite/l10n_rb.html +5 -5
- data/rails_plugins/globalite/rdoc/files/lib/globalite/locale_rb.html +5 -5
- data/rails_plugins/globalite/rdoc/files/lib/globalite_rb.html +5 -5
- data/rails_plugins/globalite/rdoc/files/lib/rails/core_ext_rb.html +5 -5
- data/rails_plugins/globalite/rdoc/files/lib/rails/localization_rb.html +5 -5
- data/rails_plugins/globalite/rdoc/files/lib/rails/localized_action_view_rb.html +5 -5
- data/rails_plugins/globalite/rdoc/files/lib/rails/localized_active_record_rb.html +5 -5
- data/rails_plugins/globalite/rdoc/fr_class_index.html +1 -1
- data/rails_plugins/globalite/rdoc/fr_file_index.html +1 -1
- data/rails_plugins/globalite/rdoc/fr_method_index.html +1 -1
- data/rails_plugins/globalite/rdoc/index.html +1 -1
- data/rails_plugins/globalite/spec/core_localization_spec.rb +18 -18
- data/rails_plugins/globalite/spec/l10n_spec.rb +25 -25
- data/rails_plugins/globalite/tasks/globalite_tasks.rake +6 -6
- data/rails_plugins/rspec/CHANGES +16 -16
- data/rails_plugins/rspec/README +2 -2
- data/rails_plugins/rspec/Rakefile +1 -1
- data/rails_plugins/rspec/UPGRADE +1 -1
- data/rails_plugins/rspec/autotest/discover.rb +1 -1
- data/rails_plugins/rspec/examples/pure/autogenerated_docstrings_example.rb +5 -5
- data/rails_plugins/rspec/examples/pure/before_and_after_example.rb +2 -2
- data/rails_plugins/rspec/examples/pure/behave_as_example.rb +5 -5
- data/rails_plugins/rspec/examples/pure/custom_expectation_matchers.rb +7 -7
- data/rails_plugins/rspec/examples/pure/file_accessor.rb +1 -1
- data/rails_plugins/rspec/examples/pure/file_accessor_spec.rb +2 -2
- data/rails_plugins/rspec/examples/pure/helper_method_example.rb +1 -1
- data/rails_plugins/rspec/examples/pure/legacy_spec.rb +2 -2
- data/rails_plugins/rspec/examples/pure/predicate_example.rb +2 -2
- data/rails_plugins/rspec/examples/pure/shared_example_group_example.rb +11 -11
- data/rails_plugins/rspec/examples/pure/shared_stack_examples.rb +4 -4
- data/rails_plugins/rspec/examples/pure/stack.rb +6 -6
- data/rails_plugins/rspec/examples/pure/stack_spec.rb +7 -7
- data/rails_plugins/rspec/examples/pure/stack_spec_with_nested_example_groups.rb +10 -10
- data/rails_plugins/rspec/examples/pure/stubbing_example.rb +4 -4
- data/rails_plugins/rspec/examples/stories/adder.rb +2 -2
- data/rails_plugins/rspec/examples/stories/addition +8 -8
- data/rails_plugins/rspec/examples/stories/calculator.rb +5 -5
- data/rails_plugins/rspec/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb +7 -7
- data/rails_plugins/rspec/examples/stories/game-of-life/behaviour/examples/grid_behaviour.rb +13 -13
- data/rails_plugins/rspec/examples/stories/game-of-life/behaviour/stories/create_a_cell.rb +5 -5
- data/rails_plugins/rspec/examples/stories/game-of-life/behaviour/stories/kill_a_cell.rb +2 -2
- data/rails_plugins/rspec/examples/stories/game-of-life/life/game.rb +3 -3
- data/rails_plugins/rspec/examples/stories/game-of-life/life/grid.rb +10 -10
- data/rails_plugins/rspec/failing_examples/failing_autogenerated_docstrings_example.rb +5 -5
- data/rails_plugins/rspec/failing_examples/failure_in_setup.rb +3 -3
- data/rails_plugins/rspec/failing_examples/failure_in_teardown.rb +3 -3
- data/rails_plugins/rspec/failing_examples/mocking_example.rb +1 -1
- data/rails_plugins/rspec/failing_examples/raising_example.rb +11 -11
- data/rails_plugins/rspec/failing_examples/team_spec.rb +5 -5
- data/rails_plugins/rspec/lib/autotest/rspec.rb +5 -5
- data/rails_plugins/rspec/lib/spec/example/configuration.rb +4 -4
- data/rails_plugins/rspec/lib/spec/example/example_group_factory.rb +3 -3
- data/rails_plugins/rspec/lib/spec/example/example_group_methods.rb +1 -1
- data/rails_plugins/rspec/lib/spec/example/example_matcher.rb +2 -2
- data/rails_plugins/rspec/lib/spec/example/example_methods.rb +4 -4
- data/rails_plugins/rspec/lib/spec/example/pending.rb +1 -1
- data/rails_plugins/rspec/lib/spec/expectations/differs/default.rb +5 -5
- data/rails_plugins/rspec/lib/spec/expectations/errors.rb +1 -1
- data/rails_plugins/rspec/lib/spec/expectations/handler.rb +5 -5
- data/rails_plugins/rspec/lib/spec/expectations.rb +1 -1
- data/rails_plugins/rspec/lib/spec/extensions/main.rb +8 -8
- data/rails_plugins/rspec/lib/spec/interop/test/unit/ui/console/testrunner.rb +2 -2
- data/rails_plugins/rspec/lib/spec/matchers/be.rb +18 -18
- data/rails_plugins/rspec/lib/spec/matchers/be_close.rb +4 -4
- data/rails_plugins/rspec/lib/spec/matchers/change.rb +20 -20
- data/rails_plugins/rspec/lib/spec/matchers/eql.rb +4 -4
- data/rails_plugins/rspec/lib/spec/matchers/equal.rb +4 -4
- data/rails_plugins/rspec/lib/spec/matchers/has.rb +8 -8
- data/rails_plugins/rspec/lib/spec/matchers/have.rb +9 -9
- data/rails_plugins/rspec/lib/spec/matchers/include.rb +7 -7
- data/rails_plugins/rspec/lib/spec/matchers/match.rb +6 -6
- data/rails_plugins/rspec/lib/spec/matchers/operator_matcher.rb +1 -1
- data/rails_plugins/rspec/lib/spec/matchers/raise_error.rb +6 -6
- data/rails_plugins/rspec/lib/spec/matchers/respond_to.rb +7 -7
- data/rails_plugins/rspec/lib/spec/matchers/satisfy.rb +4 -4
- data/rails_plugins/rspec/lib/spec/matchers/simple_matcher.rb +3 -3
- data/rails_plugins/rspec/lib/spec/matchers/throw_symbol.rb +8 -8
- data/rails_plugins/rspec/lib/spec/matchers.rb +2 -2
- data/rails_plugins/rspec/lib/spec/mocks/argument_constraint_matchers.rb +3 -3
- data/rails_plugins/rspec/lib/spec/mocks/argument_expectation.rb +32 -32
- data/rails_plugins/rspec/lib/spec/mocks/error_generator.rb +13 -13
- data/rails_plugins/rspec/lib/spec/mocks/errors.rb +1 -1
- data/rails_plugins/rspec/lib/spec/mocks/message_expectation.rb +38 -38
- data/rails_plugins/rspec/lib/spec/mocks/methods.rb +3 -3
- data/rails_plugins/rspec/lib/spec/mocks/mock.rb +5 -5
- data/rails_plugins/rspec/lib/spec/mocks/order_group.rb +5 -5
- data/rails_plugins/rspec/lib/spec/mocks/proxy.rb +4 -4
- data/rails_plugins/rspec/lib/spec/mocks/space.rb +3 -3
- data/rails_plugins/rspec/lib/spec/mocks/spec_methods.rb +1 -1
- data/rails_plugins/rspec/lib/spec/mocks.rb +13 -13
- data/rails_plugins/rspec/lib/spec/rake/spectask.rb +4 -4
- data/rails_plugins/rspec/lib/spec/rake/verify_rcov.rb +9 -9
- data/rails_plugins/rspec/lib/spec/runner/backtrace_tweaker.rb +2 -2
- data/rails_plugins/rspec/lib/spec/runner/formatter/base_formatter.rb +7 -7
- data/rails_plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb +13 -13
- data/rails_plugins/rspec/lib/spec/runner/formatter/failing_examples_formatter.rb +1 -1
- data/rails_plugins/rspec/lib/spec/runner/formatter/html_formatter.rb +8 -8
- data/rails_plugins/rspec/lib/spec/runner/formatter/profile_formatter.rb +7 -7
- data/rails_plugins/rspec/lib/spec/runner/formatter/progress_bar_formatter.rb +2 -2
- data/rails_plugins/rspec/lib/spec/runner/formatter/snippet_extractor.rb +5 -5
- data/rails_plugins/rspec/lib/spec/runner/formatter/specdoc_formatter.rb +4 -4
- data/rails_plugins/rspec/lib/spec/runner/formatter/story/html_formatter.rb +6 -6
- data/rails_plugins/rspec/lib/spec/runner/formatter/story/plain_text_formatter.rb +12 -12
- data/rails_plugins/rspec/lib/spec/runner/heckle_runner.rb +6 -6
- data/rails_plugins/rspec/lib/spec/runner/option_parser.rb +5 -5
- data/rails_plugins/rspec/lib/spec/runner/options.rb +8 -8
- data/rails_plugins/rspec/lib/spec/runner/reporter.rb +14 -14
- data/rails_plugins/rspec/lib/spec/runner.rb +41 -41
- data/rails_plugins/rspec/lib/spec/story/extensions/main.rb +6 -6
- data/rails_plugins/rspec/lib/spec/story/extensions/regexp.rb +1 -1
- data/rails_plugins/rspec/lib/spec/story/extensions/string.rb +1 -1
- data/rails_plugins/rspec/lib/spec/story/given_scenario.rb +1 -1
- data/rails_plugins/rspec/lib/spec/story/runner/plain_text_story_runner.rb +6 -6
- data/rails_plugins/rspec/lib/spec/story/runner/scenario_collector.rb +2 -2
- data/rails_plugins/rspec/lib/spec/story/runner/scenario_runner.rb +5 -5
- data/rails_plugins/rspec/lib/spec/story/runner/story_mediator.rb +20 -20
- data/rails_plugins/rspec/lib/spec/story/runner/story_parser.rb +29 -29
- data/rails_plugins/rspec/lib/spec/story/runner/story_runner.rb +8 -8
- data/rails_plugins/rspec/lib/spec/story/runner.rb +7 -7
- data/rails_plugins/rspec/lib/spec/story/scenario.rb +1 -1
- data/rails_plugins/rspec/lib/spec/story/step.rb +5 -5
- data/rails_plugins/rspec/lib/spec/story/step_group.rb +12 -12
- data/rails_plugins/rspec/lib/spec/story/step_mother.rb +6 -6
- data/rails_plugins/rspec/lib/spec/story/story.rb +5 -5
- data/rails_plugins/rspec/lib/spec/story/world.rb +16 -16
- data/rails_plugins/rspec/lib/spec/translator.rb +21 -21
- data/rails_plugins/rspec/lib/spec/version.rb +2 -2
- data/rails_plugins/rspec/lib/spec.rb +1 -1
- data/rails_plugins/rspec/pre_commit/lib/pre_commit/pre_commit.rb +1 -1
- data/rails_plugins/rspec/pre_commit/lib/pre_commit/rspec.rb +6 -6
- data/rails_plugins/rspec/pre_commit/lib/pre_commit/rspec_on_rails.rb +6 -6
- data/rails_plugins/rspec/pre_commit/spec/pre_commit/pre_commit_spec.rb +1 -1
- data/rails_plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb +1 -1
- data/rails_plugins/rspec/report.html +3 -3
- data/rails_plugins/rspec/spec/autotest/discover_spec.rb +2 -2
- data/rails_plugins/rspec/spec/autotest/rspec_spec.rb +30 -30
- data/rails_plugins/rspec/spec/autotest_matchers.rb +7 -7
- data/rails_plugins/rspec/spec/spec/example/configuration_spec.rb +5 -5
- data/rails_plugins/rspec/spec/spec/example/example_group_factory_spec.rb +5 -5
- data/rails_plugins/rspec/spec/spec/example/example_group_methods_spec.rb +3 -3
- data/rails_plugins/rspec/spec/spec/example/example_group_spec.rb +2 -2
- data/rails_plugins/rspec/spec/spec/example/example_matcher_spec.rb +10 -10
- data/rails_plugins/rspec/spec/spec/example/example_runner_spec.rb +29 -29
- data/rails_plugins/rspec/spec/spec/example/example_spec.rb +6 -6
- data/rails_plugins/rspec/spec/spec/example/nested_example_group_spec.rb +2 -2
- data/rails_plugins/rspec/spec/spec/example/pending_module_spec.rb +3 -3
- data/rails_plugins/rspec/spec/spec/example/predicate_matcher_spec.rb +1 -1
- data/rails_plugins/rspec/spec/spec/example/shared_example_group_spec.rb +4 -4
- data/rails_plugins/rspec/spec/spec/expectations/extensions/object_spec.rb +12 -12
- data/rails_plugins/rspec/spec/spec/expectations/fail_with_spec.rb +8 -8
- data/rails_plugins/rspec/spec/spec/extensions/main_spec.rb +6 -6
- data/rails_plugins/rspec/spec/spec/interop/test/unit/spec_spec.rb +2 -2
- data/rails_plugins/rspec/spec/spec/interop/test/unit/test_unit_spec_helper.rb +2 -2
- data/rails_plugins/rspec/spec/spec/interop/test/unit/testcase_spec.rb +2 -2
- data/rails_plugins/rspec/spec/spec/matchers/be_spec.rb +5 -5
- data/rails_plugins/rspec/spec/spec/matchers/change_spec.rb +14 -14
- data/rails_plugins/rspec/spec/spec/matchers/description_generation_spec.rb +25 -25
- data/rails_plugins/rspec/spec/spec/matchers/exist_spec.rb +5 -5
- data/rails_plugins/rspec/spec/spec/matchers/handler_spec.rb +16 -16
- data/rails_plugins/rspec/spec/spec/matchers/have_spec.rb +13 -13
- data/rails_plugins/rspec/spec/spec/matchers/match_spec.rb +1 -1
- data/rails_plugins/rspec/spec/spec/matchers/matcher_methods_spec.rb +1 -1
- data/rails_plugins/rspec/spec/spec/matchers/operator_matcher_spec.rb +17 -17
- data/rails_plugins/rspec/spec/spec/matchers/raise_error_spec.rb +20 -20
- data/rails_plugins/rspec/spec/spec/matchers/respond_to_spec.rb +10 -10
- data/rails_plugins/rspec/spec/spec/matchers/simple_matcher_spec.rb +3 -3
- data/rails_plugins/rspec/spec/spec/matchers/throw_symbol_spec.rb +2 -2
- data/rails_plugins/rspec/spec/spec/mocks/any_number_of_times_spec.rb +2 -2
- data/rails_plugins/rspec/spec/spec/mocks/bug_report_10263.rb +3 -3
- data/rails_plugins/rspec/spec/spec/mocks/bug_report_11545_spec.rb +4 -4
- data/rails_plugins/rspec/spec/spec/mocks/bug_report_15719_spec.rb +1 -1
- data/rails_plugins/rspec/spec/spec/mocks/bug_report_7611_spec.rb +1 -1
- data/rails_plugins/rspec/spec/spec/mocks/bug_report_8302_spec.rb +1 -1
- data/rails_plugins/rspec/spec/spec/mocks/failing_mock_argument_constraints_spec.rb +12 -12
- data/rails_plugins/rspec/spec/spec/mocks/mock_ordering_spec.rb +3 -3
- data/rails_plugins/rspec/spec/spec/mocks/mock_space_spec.rb +1 -1
- data/rails_plugins/rspec/spec/spec/mocks/mock_spec.rb +56 -56
- data/rails_plugins/rspec/spec/spec/mocks/multiple_return_value_spec.rb +3 -3
- data/rails_plugins/rspec/spec/spec/mocks/once_counts_spec.rb +1 -1
- data/rails_plugins/rspec/spec/spec/mocks/options_hash_spec.rb +1 -1
- data/rails_plugins/rspec/spec/spec/mocks/partial_mock_spec.rb +16 -16
- data/rails_plugins/rspec/spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb +10 -10
- data/rails_plugins/rspec/spec/spec/mocks/passing_mock_argument_constraints_spec.rb +13 -13
- data/rails_plugins/rspec/spec/spec/mocks/stub_spec.rb +7 -7
- data/rails_plugins/rspec/spec/spec/mocks/twice_counts_spec.rb +6 -6
- data/rails_plugins/rspec/spec/spec/package/bin_spec_spec.rb +1 -1
- data/rails_plugins/rspec/spec/spec/runner/class_and_argument_parser_spec.rb +2 -2
- data/rails_plugins/rspec/spec/spec/runner/command_line_spec.rb +1 -1
- data/rails_plugins/rspec/spec/spec/runner/drb_command_line_spec.rb +2 -2
- data/rails_plugins/rspec/spec/spec/runner/execution_context_spec.rb +2 -2
- data/rails_plugins/rspec/spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb +2 -2
- data/rails_plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.4.html +1 -1
- data/rails_plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html +2 -2
- data/rails_plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5.html +1 -1
- data/rails_plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html +1 -1
- data/rails_plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6.html +3 -3
- data/rails_plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb +1 -1
- data/rails_plugins/rspec/spec/spec/runner/formatter/profile_formatter_spec.rb +9 -9
- data/rails_plugins/rspec/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +4 -4
- data/rails_plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb +1 -1
- data/rails_plugins/rspec/spec/spec/runner/formatter/story/html_formatter_spec.rb +5 -5
- data/rails_plugins/rspec/spec/spec/runner/formatter/text_mate_formatted-1.8.4.html +13 -13
- data/rails_plugins/rspec/spec/spec/runner/formatter/text_mate_formatted-1.8.6.html +2 -2
- data/rails_plugins/rspec/spec/spec/runner/heckle_runner_spec.rb +1 -1
- data/rails_plugins/rspec/spec/spec/runner/noisy_backtrace_tweaker_spec.rb +3 -3
- data/rails_plugins/rspec/spec/spec/runner/option_parser_spec.rb +9 -9
- data/rails_plugins/rspec/spec/spec/runner/options_spec.rb +13 -13
- data/rails_plugins/rspec/spec/spec/runner/quiet_backtrace_tweaker_spec.rb +1 -1
- data/rails_plugins/rspec/spec/spec/spec_classes.rb +8 -8
- data/rails_plugins/rspec/spec/spec/story/builders.rb +7 -7
- data/rails_plugins/rspec/spec/spec/story/extensions/main_spec.rb +6 -6
- data/rails_plugins/rspec/spec/spec/story/given_scenario_spec.rb +3 -3
- data/rails_plugins/rspec/spec/spec/story/runner/plain_text_story_runner_spec.rb +12 -12
- data/rails_plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb +2 -2
- data/rails_plugins/rspec/spec/spec/story/runner/scenario_runner_spec.rb +21 -21
- data/rails_plugins/rspec/spec/spec/story/runner/story_mediator_spec.rb +22 -22
- data/rails_plugins/rspec/spec/spec/story/runner/story_parser_spec.rb +55 -55
- data/rails_plugins/rspec/spec/spec/story/runner/story_runner_spec.rb +44 -44
- data/rails_plugins/rspec/spec/spec/story/runner_spec.rb +18 -18
- data/rails_plugins/rspec/spec/spec/story/scenario_spec.rb +2 -2
- data/rails_plugins/rspec/spec/spec/story/step_group_spec.rb +20 -20
- data/rails_plugins/rspec/spec/spec/story/step_mother_spec.rb +14 -14
- data/rails_plugins/rspec/spec/spec/story/step_spec.rb +33 -33
- data/rails_plugins/rspec/spec/spec/story/story_spec.rb +12 -12
- data/rails_plugins/rspec/spec/spec/translator_spec.rb +12 -12
- data/rails_plugins/rspec/spec/spec_helper.rb +5 -5
- data/rails_plugins/rspec/stories/resources/helpers/story_helper.rb +1 -1
- data/rails_plugins/rspec/stories/resources/steps/running_rspec.rb +4 -4
- data/rails_plugins/rspec/stories/resources/test/spec_and_test_together.rb +2 -2
- data/rails_plugins/rspec/stories/resources/test/test_case_with_should_methods.rb +1 -1
- data/rails_plugins/rspec/story_server/prototype/javascripts/builder.js +14 -14
- data/rails_plugins/rspec/story_server/prototype/javascripts/controls.js +61 -61
- data/rails_plugins/rspec/story_server/prototype/javascripts/dragdrop.js +144 -144
- data/rails_plugins/rspec/story_server/prototype/javascripts/effects.js +127 -127
- data/rails_plugins/rspec/story_server/prototype/javascripts/rspec.js +15 -15
- data/rails_plugins/rspec/story_server/prototype/javascripts/scriptaculous.js +7 -7
- data/rails_plugins/rspec/story_server/prototype/javascripts/slider.js +37 -37
- data/rails_plugins/rspec/story_server/prototype/javascripts/sound.js +4 -4
- data/rails_plugins/rspec/story_server/prototype/javascripts/unittest.js +66 -66
- data/rails_plugins/rspec/story_server/prototype/stories.html +9 -9
- data/rails_plugins/rspec_on_rails/MIT-LICENSE +11 -11
- data/rails_plugins/rspec_on_rails/generators/rspec/templates/rcov.opts +1 -1
- data/rails_plugins/rspec_on_rails/generators/rspec/templates/script/spec_server +1 -1
- data/rails_plugins/rspec_on_rails/generators/rspec_controller/USAGE +1 -1
- data/rails_plugins/rspec_on_rails/generators/rspec_controller/templates/helper_spec.rb +2 -2
- data/rails_plugins/rspec_on_rails/generators/rspec_controller/templates/view_spec.rb +1 -1
- data/rails_plugins/rspec_on_rails/generators/rspec_scaffold/rspec_scaffold_generator.rb +12 -12
- data/rails_plugins/rspec_on_rails/generators/rspec_scaffold/templates/controller_spec.rb +35 -35
- data/rails_plugins/rspec_on_rails/generators/rspec_scaffold/templates/edit_erb_spec.rb +2 -2
- data/rails_plugins/rspec_on_rails/generators/rspec_scaffold/templates/helper_spec.rb +2 -2
- data/rails_plugins/rspec_on_rails/generators/rspec_scaffold/templates/index_erb_spec.rb +1 -1
- data/rails_plugins/rspec_on_rails/generators/rspec_scaffold/templates/new_erb_spec.rb +2 -2
- data/rails_plugins/rspec_on_rails/generators/rspec_scaffold/templates/routing_spec.rb +11 -11
- data/rails_plugins/rspec_on_rails/generators/rspec_scaffold/templates/show_erb_spec.rb +1 -1
- data/rails_plugins/rspec_on_rails/lib/autotest/rails_rspec.rb +3 -3
- data/rails_plugins/rspec_on_rails/lib/spec/rails/example/controller_example_group.rb +4 -4
- data/rails_plugins/rspec_on_rails/lib/spec/rails/example/rails_example_group.rb +1 -1
- data/rails_plugins/rspec_on_rails/lib/spec/rails/example/render_observer.rb +4 -4
- data/rails_plugins/rspec_on_rails/lib/spec/rails/example/view_example_group.rb +1 -1
- data/rails_plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/base.rb +1 -1
- data/rails_plugins/rspec_on_rails/lib/spec/rails/extensions/spec/matchers/have.rb +1 -1
- data/rails_plugins/rspec_on_rails/lib/spec/rails/matchers/assert_select.rb +10 -10
- data/rails_plugins/rspec_on_rails/lib/spec/rails/matchers/have_text.rb +6 -6
- data/rails_plugins/rspec_on_rails/lib/spec/rails/matchers/render_template.rb +7 -7
- data/rails_plugins/rspec_on_rails/lib/spec/rails/story_adapter.rb +1 -1
- data/rails_plugins/rspec_on_rails/lib/spec/rails.rb +8 -8
- data/rails_plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb +6 -6
- data/rails_plugins/rspec_on_rails/spec/rails/example/controller_isolation_spec.rb +1 -1
- data/rails_plugins/rspec_on_rails/spec/rails/example/controller_spec_spec.rb +22 -22
- data/rails_plugins/rspec_on_rails/spec/rails/example/helper_spec_spec.rb +1 -1
- data/rails_plugins/rspec_on_rails/spec/rails/example/ivar_proxy_spec.rb +3 -3
- data/rails_plugins/rspec_on_rails/spec/rails/example/shared_behaviour_spec.rb +2 -2
- data/rails_plugins/rspec_on_rails/spec/rails/example/view_spec_spec.rb +8 -8
- data/rails_plugins/rspec_on_rails/spec/rails/extensions/action_view_base_spec.rb +7 -7
- data/rails_plugins/rspec_on_rails/spec/rails/extensions/active_record_spec.rb +1 -1
- data/rails_plugins/rspec_on_rails/spec/rails/matchers/assert_select_spec.rb +37 -37
- data/rails_plugins/rspec_on_rails/spec/rails/matchers/description_generation_spec.rb +1 -1
- data/rails_plugins/rspec_on_rails/spec/rails/matchers/have_text_spec.rb +4 -4
- data/rails_plugins/rspec_on_rails/spec/rails/matchers/redirect_to_spec.rb +26 -26
- data/rails_plugins/rspec_on_rails/spec/rails/matchers/render_spec.rb +18 -18
- data/rails_plugins/rspec_on_rails/spec/rails/mocks/mock_model_spec.rb +2 -2
- data/rails_plugins/rspec_on_rails/spec/spec_helper.rb +1 -1
- data/rails_plugins/rspec_on_rails/spec_resources/controllers/controller_spec_controller.rb +9 -9
- data/rails_plugins/rspec_on_rails/spec_resources/controllers/redirect_spec_controller.rb +7 -7
- data/rails_plugins/rspec_on_rails/spec_resources/controllers/render_spec_controller.rb +5 -5
- data/rails_plugins/rspec_on_rails/spec_resources/controllers/rjs_spec_controller.rb +10 -10
- data/rails_plugins/rspec_on_rails/spec_resources/helpers/explicit_helper.rb +1 -1
- data/rails_plugins/rspec_on_rails/stories/transactions_should_rollback.rb +1 -1
- data/rails_plugins/rspec_on_rails/tasks/rspec.rake +4 -4
- data/script/txt2html +1 -1
- data/setup.rb +4 -4
- data/tasks/hack.rake +3 -3
- data/website/index.html +2 -2
- data/website/index.txt +1 -1
- data/website/index_devjavu +3 -3
- data/website/javascripts/rounded_corners_lite.inc.js +1 -1
- data/website/stylesheets/screen.css +2 -2
- data.tar.gz.sig +0 -0
- metadata +2 -1
- metadata.gz.sig +2 -1
@@ -4,7 +4,7 @@ describe "should raise_error" do
|
|
4
4
|
it "should pass if anything is raised" do
|
5
5
|
lambda {raise}.should raise_error
|
6
6
|
end
|
7
|
-
|
7
|
+
|
8
8
|
it "should fail if nothing is raised" do
|
9
9
|
lambda {
|
10
10
|
lambda {}.should raise_error
|
@@ -16,7 +16,7 @@ describe "should_not raise_error" do
|
|
16
16
|
it "should pass if nothing is raised" do
|
17
17
|
lambda {}.should_not raise_error
|
18
18
|
end
|
19
|
-
|
19
|
+
|
20
20
|
it "should fail if anything is raised" do
|
21
21
|
lambda {
|
22
22
|
lambda {raise}.should_not raise_error
|
@@ -66,19 +66,19 @@ describe "should raise_error(NamedError)" do
|
|
66
66
|
it "should pass if named error is raised" do
|
67
67
|
lambda { non_existent_method }.should raise_error(NameError)
|
68
68
|
end
|
69
|
-
|
69
|
+
|
70
70
|
it "should fail if nothing is raised" do
|
71
71
|
lambda {
|
72
72
|
lambda { }.should raise_error(NameError)
|
73
73
|
}.should fail_with("expected NameError but nothing was raised")
|
74
74
|
end
|
75
|
-
|
75
|
+
|
76
76
|
it "should fail if another error is raised (NameError)" do
|
77
77
|
lambda {
|
78
78
|
lambda { raise }.should raise_error(NameError)
|
79
79
|
}.should fail_with("expected NameError, got RuntimeError")
|
80
80
|
end
|
81
|
-
|
81
|
+
|
82
82
|
it "should fail if another error is raised (NameError)" do
|
83
83
|
lambda {
|
84
84
|
lambda { load "non/existent/file" }.should raise_error(NameError)
|
@@ -90,35 +90,35 @@ describe "should_not raise_error(NamedError)" do
|
|
90
90
|
it "should pass if nothing is raised" do
|
91
91
|
lambda { }.should_not raise_error(NameError)
|
92
92
|
end
|
93
|
-
|
93
|
+
|
94
94
|
it "should pass if another error is raised" do
|
95
95
|
lambda { raise }.should_not raise_error(NameError)
|
96
96
|
end
|
97
|
-
|
97
|
+
|
98
98
|
it "should fail if named error is raised" do
|
99
99
|
lambda {
|
100
100
|
lambda { non_existent_method }.should_not raise_error(NameError)
|
101
101
|
}.should fail_with(/expected no NameError, got #<NameError: undefined/)
|
102
|
-
end
|
102
|
+
end
|
103
103
|
end
|
104
104
|
|
105
105
|
describe "should raise_error(NamedError, error_message) with String" do
|
106
106
|
it "should pass if named error is raised with same message" do
|
107
107
|
lambda { raise "example message" }.should raise_error(RuntimeError, "example message")
|
108
108
|
end
|
109
|
-
|
109
|
+
|
110
110
|
it "should fail if nothing is raised" do
|
111
111
|
lambda {
|
112
112
|
lambda {}.should raise_error(RuntimeError, "example message")
|
113
113
|
}.should fail_with("expected RuntimeError with \"example message\" but nothing was raised")
|
114
114
|
end
|
115
|
-
|
115
|
+
|
116
116
|
it "should fail if incorrect error is raised" do
|
117
117
|
lambda {
|
118
118
|
lambda { raise }.should raise_error(NameError, "example message")
|
119
119
|
}.should fail_with("expected NameError with \"example message\", got RuntimeError")
|
120
120
|
end
|
121
|
-
|
121
|
+
|
122
122
|
it "should fail if correct error is raised with incorrect message" do
|
123
123
|
lambda {
|
124
124
|
lambda { raise RuntimeError.new("not the example message") }.should raise_error(RuntimeError, "example message")
|
@@ -130,15 +130,15 @@ describe "should_not raise_error(NamedError, error_message) with String" do
|
|
130
130
|
it "should pass if nothing is raised" do
|
131
131
|
lambda {}.should_not raise_error(RuntimeError, "example message")
|
132
132
|
end
|
133
|
-
|
133
|
+
|
134
134
|
it "should pass if a different error is raised" do
|
135
135
|
lambda { raise }.should_not raise_error(NameError, "example message")
|
136
136
|
end
|
137
|
-
|
137
|
+
|
138
138
|
it "should pass if same error is raised with different message" do
|
139
139
|
lambda { raise RuntimeError.new("not the example message") }.should_not raise_error(RuntimeError, "example message")
|
140
140
|
end
|
141
|
-
|
141
|
+
|
142
142
|
it "should fail if named error is raised with same message" do
|
143
143
|
lambda {
|
144
144
|
lambda { raise "example message" }.should_not raise_error(RuntimeError, "example message")
|
@@ -150,19 +150,19 @@ describe "should raise_error(NamedError, error_message) with Regexp" do
|
|
150
150
|
it "should pass if named error is raised with matching message" do
|
151
151
|
lambda { raise "example message" }.should raise_error(RuntimeError, /ample mess/)
|
152
152
|
end
|
153
|
-
|
153
|
+
|
154
154
|
it "should fail if nothing is raised" do
|
155
155
|
lambda {
|
156
156
|
lambda {}.should raise_error(RuntimeError, /ample mess/)
|
157
157
|
}.should fail_with("expected RuntimeError with message matching /ample mess/ but nothing was raised")
|
158
158
|
end
|
159
|
-
|
159
|
+
|
160
160
|
it "should fail if incorrect error is raised" do
|
161
161
|
lambda {
|
162
162
|
lambda { raise }.should raise_error(NameError, /ample mess/)
|
163
163
|
}.should fail_with("expected NameError with message matching /ample mess/, got RuntimeError")
|
164
164
|
end
|
165
|
-
|
165
|
+
|
166
166
|
it "should fail if correct error is raised with incorrect message" do
|
167
167
|
lambda {
|
168
168
|
lambda { raise RuntimeError.new("not the example message") }.should raise_error(RuntimeError, /less than ample mess/)
|
@@ -174,15 +174,15 @@ describe "should_not raise_error(NamedError, error_message) with Regexp" do
|
|
174
174
|
it "should pass if nothing is raised" do
|
175
175
|
lambda {}.should_not raise_error(RuntimeError, /ample mess/)
|
176
176
|
end
|
177
|
-
|
177
|
+
|
178
178
|
it "should pass if a different error is raised" do
|
179
179
|
lambda { raise }.should_not raise_error(NameError, /ample mess/)
|
180
180
|
end
|
181
|
-
|
181
|
+
|
182
182
|
it "should pass if same error is raised with non-matching message" do
|
183
183
|
lambda { raise RuntimeError.new("non matching message") }.should_not raise_error(RuntimeError, /ample mess/)
|
184
184
|
end
|
185
|
-
|
185
|
+
|
186
186
|
it "should fail if named error is raised with matching message" do
|
187
187
|
lambda {
|
188
188
|
lambda { raise "example message" }.should_not raise_error(RuntimeError, /ample mess/)
|
@@ -1,37 +1,37 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/../../spec_helper.rb'
|
2
2
|
|
3
3
|
describe "should respond_to(:sym)" do
|
4
|
-
|
4
|
+
|
5
5
|
it "should pass if target responds to :sym" do
|
6
6
|
Object.new.should respond_to(:methods)
|
7
7
|
end
|
8
|
-
|
8
|
+
|
9
9
|
it "should fail target does not respond to :sym" do
|
10
10
|
lambda {
|
11
11
|
Object.new.should respond_to(:some_method)
|
12
12
|
}.should fail_with("expected target to respond to :some_method")
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
15
|
end
|
16
16
|
|
17
17
|
describe "should respond_to(message1, message2)" do
|
18
|
-
|
18
|
+
|
19
19
|
it "should pass if target responds to both messages" do
|
20
20
|
Object.new.should respond_to('methods', 'inspect')
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
it "should fail target does not respond to first message" do
|
24
24
|
lambda {
|
25
25
|
Object.new.should respond_to('method_one', 'inspect')
|
26
26
|
}.should fail_with('expected target to respond to "method_one"')
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
it "should fail target does not respond to second message" do
|
30
30
|
lambda {
|
31
31
|
Object.new.should respond_to('inspect', 'method_one')
|
32
32
|
}.should fail_with('expected target to respond to "method_one"')
|
33
33
|
end
|
34
|
-
|
34
|
+
|
35
35
|
it "should fail target does not respond to either message" do
|
36
36
|
lambda {
|
37
37
|
Object.new.should respond_to('method_one', 'method_two')
|
@@ -40,15 +40,15 @@ describe "should respond_to(message1, message2)" do
|
|
40
40
|
end
|
41
41
|
|
42
42
|
describe "should_not respond_to(:sym)" do
|
43
|
-
|
43
|
+
|
44
44
|
it "should pass if target does not respond to :sym" do
|
45
45
|
Object.new.should_not respond_to(:some_method)
|
46
46
|
end
|
47
|
-
|
47
|
+
|
48
48
|
it "should fail target responds to :sym" do
|
49
49
|
lambda {
|
50
50
|
Object.new.should_not respond_to(:methods)
|
51
51
|
}.should fail_with("expected target not to respond to :methods")
|
52
52
|
end
|
53
|
-
|
53
|
+
|
54
54
|
end
|
@@ -9,19 +9,19 @@ module Spec
|
|
9
9
|
matcher.matches?("foo")
|
10
10
|
actual.should == "foo"
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
13
|
it "should provide a stock failure message" do
|
14
14
|
matcher = simple_matcher("thing") do end
|
15
15
|
matcher.matches?("other")
|
16
16
|
matcher.failure_message.should =~ /expected \"thing\" but got \"other\"/
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
it "should provide a stock negative failure message" do
|
20
20
|
matcher = simple_matcher("thing") do end
|
21
21
|
matcher.matches?("other")
|
22
22
|
matcher.negative_failure_message.should =~ /expected not to get \"thing\", but got \"other\"/
|
23
23
|
end
|
24
|
-
|
24
|
+
|
25
25
|
it "should provide a description" do
|
26
26
|
matcher = simple_matcher("thing") do end
|
27
27
|
matcher.description.should =="thing"
|
@@ -20,10 +20,10 @@ module Spec
|
|
20
20
|
@matcher.negative_failure_message.should == "expected no Symbol, got :sym"
|
21
21
|
end
|
22
22
|
end
|
23
|
-
|
23
|
+
|
24
24
|
describe ThrowSymbol, "(constructed with a Symbol)" do
|
25
25
|
before(:each) { @matcher = ThrowSymbol.new(:sym) }
|
26
|
-
|
26
|
+
|
27
27
|
it "should match if correct Symbol is thrown" do
|
28
28
|
@matcher.matches?(lambda{ throw :sym }).should be_true
|
29
29
|
end
|
@@ -2,7 +2,7 @@ require File.dirname(__FILE__) + '/../../spec_helper.rb'
|
|
2
2
|
|
3
3
|
module Spec
|
4
4
|
module Mocks
|
5
|
-
|
5
|
+
|
6
6
|
describe "AnyNumberOfTimes" do
|
7
7
|
before(:each) do
|
8
8
|
@mock = Mock.new("test mock")
|
@@ -19,7 +19,7 @@ module Spec
|
|
19
19
|
@mock.should_receive(:random_call).any_number_of_times
|
20
20
|
@mock.random_call
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
it "should pass if any number of times method is not called" do
|
24
24
|
@mock.should_receive(:random_call).any_number_of_times
|
25
25
|
end
|
@@ -2,14 +2,14 @@ describe "Mock" do
|
|
2
2
|
before do
|
3
3
|
@mock = mock("test mock")
|
4
4
|
end
|
5
|
-
|
5
|
+
|
6
6
|
specify "when one example has an expectation (non-mock) inside the block passed to the mock" do
|
7
7
|
@mock.should_receive(:msg) do |b|
|
8
8
|
b.should be_true #this call exposes the problem
|
9
9
|
end
|
10
10
|
@mock.msg(false) rescue nil
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
13
|
specify "then the next example should behave as expected instead of saying" do
|
14
14
|
@mock.should_receive(:foobar)
|
15
15
|
@mock.foobar
|
@@ -19,6 +19,6 @@ describe "Mock" do
|
|
19
19
|
rescue Exception => e
|
20
20
|
e.message.should == "Mock 'test mock' received unexpected message :foobar with (no args)"
|
21
21
|
end
|
22
|
-
end
|
22
|
+
end
|
23
23
|
end
|
24
24
|
|
@@ -4,17 +4,17 @@ class LiarLiarPantsOnFire
|
|
4
4
|
def respond_to?(sym)
|
5
5
|
true
|
6
6
|
end
|
7
|
-
|
7
|
+
|
8
8
|
def self.respond_to?(sym)
|
9
9
|
true
|
10
10
|
end
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
13
|
describe 'should_receive' do
|
14
14
|
before(:each) do
|
15
15
|
@liar = LiarLiarPantsOnFire.new
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
it "should work when object lies about responding to a method" do
|
19
19
|
@liar.should_receive(:something)
|
20
20
|
@liar.something
|
@@ -24,7 +24,7 @@ describe 'should_receive' do
|
|
24
24
|
LiarLiarPantsOnFire.should_receive(:something)
|
25
25
|
LiarLiarPantsOnFire.something
|
26
26
|
end
|
27
|
-
|
27
|
+
|
28
28
|
it 'should cleanup after itself' do
|
29
29
|
LiarLiarPantsOnFire.metaclass.instance_methods.should_not include("something")
|
30
30
|
end
|
@@ -7,7 +7,7 @@ module Spec
|
|
7
7
|
@mock = mock("test mock")
|
8
8
|
@reporter = Mock.new("reporter", :null_object => true)
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
after(:each) do
|
12
12
|
@mock.rspec_reset
|
13
13
|
end
|
@@ -25,14 +25,14 @@ module Spec
|
|
25
25
|
@mock.random_call("1")
|
26
26
|
end.should raise_error(MockExpectationError)
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
it "should reject non string" do
|
30
30
|
@mock.should_receive(:random_call).with(an_instance_of(String))
|
31
31
|
lambda do
|
32
32
|
@mock.random_call(123)
|
33
33
|
end.should raise_error(MockExpectationError)
|
34
34
|
end
|
35
|
-
|
35
|
+
|
36
36
|
it "should reject goose when expecting a duck" do
|
37
37
|
@mock.should_receive(:random_call).with(duck_type(:abs, :div))
|
38
38
|
lambda { @mock.random_call("I don't respond to :abs or :div") }.should raise_error(MockExpectationError)
|
@@ -42,33 +42,33 @@ module Spec
|
|
42
42
|
@mock.should_receive(:random_call).with(/bcd/)
|
43
43
|
lambda { @mock.random_call("abc") }.should raise_error(MockExpectationError)
|
44
44
|
end
|
45
|
-
|
45
|
+
|
46
46
|
it "should fail if regexp does not match submitted regexp" do
|
47
47
|
@mock.should_receive(:random_call).with(/bcd/)
|
48
48
|
lambda { @mock.random_call(/bcde/) }.should raise_error(MockExpectationError)
|
49
49
|
end
|
50
|
-
|
50
|
+
|
51
51
|
it "should fail for a hash w/ wrong values" do
|
52
52
|
@mock.should_receive(:random_call).with(:a => "b", :c => "d")
|
53
53
|
lambda do
|
54
54
|
@mock.random_call(:a => "b", :c => "e")
|
55
55
|
end.should raise_error(MockExpectationError, /Mock 'test mock' expected :random_call with \(\{(:a=>\"b\", :c=>\"d\"|:c=>\"d\", :a=>\"b\")\}\) but received it with \(\{(:a=>\"b\", :c=>\"e\"|:c=>\"e\", :a=>\"b\")\}\)/)
|
56
56
|
end
|
57
|
-
|
57
|
+
|
58
58
|
it "should fail for a hash w/ wrong keys" do
|
59
59
|
@mock.should_receive(:random_call).with(:a => "b", :c => "d")
|
60
60
|
lambda do
|
61
61
|
@mock.random_call("a" => "b", "c" => "d")
|
62
62
|
end.should raise_error(MockExpectationError, /Mock 'test mock' expected :random_call with \(\{(:a=>\"b\", :c=>\"d\"|:c=>\"d\", :a=>\"b\")\}\) but received it with \(\{(\"a\"=>\"b\", \"c\"=>\"d\"|\"c\"=>\"d\", \"a\"=>\"b\")\}\)/)
|
63
63
|
end
|
64
|
-
|
64
|
+
|
65
65
|
it "should match against a Matcher" do
|
66
66
|
lambda do
|
67
67
|
@mock.should_receive(:msg).with(equal(3))
|
68
68
|
@mock.msg(37)
|
69
69
|
end.should raise_error(MockExpectationError, "Mock 'test mock' expected :msg with (equal 3) but received it with (37)")
|
70
70
|
end
|
71
|
-
|
71
|
+
|
72
72
|
it "should fail no_args with one arg" do
|
73
73
|
lambda do
|
74
74
|
@mock.should_receive(:msg).with(no_args)
|
@@ -76,7 +76,7 @@ module Spec
|
|
76
76
|
end.should raise_error(MockExpectationError, "Mock 'test mock' expected :msg with (no args) but received it with (37)")
|
77
77
|
end
|
78
78
|
end
|
79
|
-
|
79
|
+
|
80
80
|
describe "failing deprecated MockArgumentConstraints" do
|
81
81
|
before(:each) do
|
82
82
|
@mock = mock("test mock")
|
@@ -94,21 +94,21 @@ module Spec
|
|
94
94
|
@mock.random_call("false")
|
95
95
|
end.should raise_error(MockExpectationError)
|
96
96
|
end
|
97
|
-
|
97
|
+
|
98
98
|
it "should reject non numeric" do
|
99
99
|
@mock.should_receive(:random_call).with(:numeric)
|
100
100
|
lambda do
|
101
101
|
@mock.random_call("1")
|
102
102
|
end.should raise_error(MockExpectationError)
|
103
103
|
end
|
104
|
-
|
104
|
+
|
105
105
|
it "should reject non string" do
|
106
106
|
@mock.should_receive(:random_call).with(:string)
|
107
107
|
lambda do
|
108
108
|
@mock.random_call(123)
|
109
109
|
end.should raise_error(MockExpectationError)
|
110
110
|
end
|
111
|
-
|
111
|
+
|
112
112
|
|
113
113
|
end
|
114
114
|
end
|
@@ -8,7 +8,7 @@ module Spec
|
|
8
8
|
before do
|
9
9
|
@mock = mock("test mock")
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
12
|
after do
|
13
13
|
@mock.rspec_reset
|
14
14
|
end
|
@@ -48,7 +48,7 @@ module Spec
|
|
48
48
|
@mock.three
|
49
49
|
end.should raise_error(MockExpectationError, "Mock 'test mock' received :three out of order")
|
50
50
|
end
|
51
|
-
|
51
|
+
|
52
52
|
it "should fail if third call comes second" do
|
53
53
|
@mock.should_receive(:one).ordered
|
54
54
|
@mock.should_receive(:two).ordered
|
@@ -78,7 +78,7 @@ module Spec
|
|
78
78
|
@mock.ignored_1
|
79
79
|
@mock.rspec_verify
|
80
80
|
end
|
81
|
-
|
81
|
+
|
82
82
|
end
|
83
83
|
end
|
84
84
|
end
|