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
@@ -16,7 +16,7 @@ class AssertSelectController < ActionController::Base
|
|
16
16
|
# def response(&block)
|
17
17
|
# @update = block
|
18
18
|
# end
|
19
|
-
#
|
19
|
+
#
|
20
20
|
def html()
|
21
21
|
render :text=>@content, :layout=>false, :content_type=>Mime::HTML
|
22
22
|
@content = nil
|
@@ -68,7 +68,7 @@ module AssertSelectSpecHelpers
|
|
68
68
|
@controller.response = xml
|
69
69
|
get :xml
|
70
70
|
end
|
71
|
-
|
71
|
+
|
72
72
|
def first_non_rspec_line_in_backtrace_of(error)
|
73
73
|
rspec_path = File.join('rspec', 'lib', 'spec')
|
74
74
|
error.backtrace.reject { |line|
|
@@ -84,7 +84,7 @@ module AssertSelectSpecHelpers
|
|
84
84
|
end
|
85
85
|
|
86
86
|
unless defined?(SpecFailed)
|
87
|
-
SpecFailed = Spec::Expectations::ExpectationNotMetError
|
87
|
+
SpecFailed = Spec::Expectations::ExpectationNotMetError
|
88
88
|
end
|
89
89
|
|
90
90
|
describe "should have_tag", :type => :controller do
|
@@ -130,7 +130,7 @@ describe "should have_tag", :type => :controller do
|
|
130
130
|
lambda { response.should have_tag("div", :text=>/foobar/) }.should raise_error(SpecFailed)
|
131
131
|
lambda { response.should have_tag("p", :text=>/foo/) }.should raise_error(SpecFailed)
|
132
132
|
end
|
133
|
-
|
133
|
+
|
134
134
|
it "should use submitted message" do
|
135
135
|
render_html %Q{nothing here}
|
136
136
|
lambda {
|
@@ -188,7 +188,7 @@ describe "should have_tag", :type => :controller do
|
|
188
188
|
elements.size.should == 3
|
189
189
|
end
|
190
190
|
}.should raise_error(SpecFailed, "expected: 3,\n got: 2 (using ==)")
|
191
|
-
|
191
|
+
|
192
192
|
lambda {
|
193
193
|
response.should have_tag("div#?", /\d+/) { |elements|
|
194
194
|
elements.size.should == 3
|
@@ -200,9 +200,9 @@ describe "should have_tag", :type => :controller do
|
|
200
200
|
with_tag("#1")
|
201
201
|
with_tag("#2")
|
202
202
|
without_tag("#3")
|
203
|
-
end
|
203
|
+
end
|
204
204
|
end
|
205
|
-
|
205
|
+
|
206
206
|
#added for RSpec
|
207
207
|
it "nested tags in form" do
|
208
208
|
render_html %Q{
|
@@ -219,20 +219,20 @@ describe "should have_tag", :type => :controller do
|
|
219
219
|
response.should have_tag("form[action=test]") { |form|
|
220
220
|
with_tag("input[type=text][name=email]")
|
221
221
|
}
|
222
|
-
|
222
|
+
|
223
223
|
lambda {
|
224
224
|
response.should have_tag("form[action=test]") { |form|
|
225
225
|
with_tag("input[type=text][name=other_input]")
|
226
226
|
}
|
227
227
|
}.should raise_error(SpecFailed)
|
228
|
-
|
228
|
+
|
229
229
|
lambda {
|
230
230
|
response.should have_tag("form[action=test]") {
|
231
231
|
with_tag("input[type=text][name=other_input]")
|
232
232
|
}
|
233
233
|
}.should raise_error(SpecFailed)
|
234
234
|
end
|
235
|
-
|
235
|
+
|
236
236
|
it "should report the correct line number for a nested failed expectation" do
|
237
237
|
render_html %Q{
|
238
238
|
<form action="test">
|
@@ -244,7 +244,7 @@ describe "should have_tag", :type => :controller do
|
|
244
244
|
@expected_error_line = __LINE__; should have_tag("input[type=text][name=other_input]")
|
245
245
|
}
|
246
246
|
rescue => e
|
247
|
-
first_non_rspec_line_in_backtrace_of(e).should =~
|
247
|
+
first_non_rspec_line_in_backtrace_of(e).should =~
|
248
248
|
/#{File.basename(__FILE__)}:#{@expected_error_line}/
|
249
249
|
else
|
250
250
|
fail
|
@@ -262,7 +262,7 @@ describe "should have_tag", :type => :controller do
|
|
262
262
|
@expected_error_line = __LINE__; raise "Failed!"
|
263
263
|
}
|
264
264
|
rescue => e
|
265
|
-
first_non_rspec_line_in_backtrace_of(e).should =~
|
265
|
+
first_non_rspec_line_in_backtrace_of(e).should =~
|
266
266
|
/#{File.basename(__FILE__)}:#{@expected_error_line}/
|
267
267
|
else
|
268
268
|
fail
|
@@ -289,7 +289,7 @@ describe "should have_tag", :type => :controller do
|
|
289
289
|
end
|
290
290
|
end
|
291
291
|
|
292
|
-
|
292
|
+
|
293
293
|
it "beatles" do
|
294
294
|
unless defined?(BEATLES)
|
295
295
|
BEATLES = [
|
@@ -314,7 +314,7 @@ describe "should have_tag", :type => :controller do
|
|
314
314
|
<div class="beatle">
|
315
315
|
<h2>Ringo</h2><p>Drums</p>
|
316
316
|
</div>
|
317
|
-
</div>
|
317
|
+
</div>
|
318
318
|
}
|
319
319
|
response.should have_tag("div#beatles>div[class=\"beatle\"]", 4)
|
320
320
|
|
@@ -353,7 +353,7 @@ describe "should have_tag", :type => :controller do
|
|
353
353
|
with_tag("#1")
|
354
354
|
with_tag("#2")
|
355
355
|
}
|
356
|
-
|
356
|
+
|
357
357
|
lambda {
|
358
358
|
response.should have_tag("div") { |elements|
|
359
359
|
elements.size.should == 2
|
@@ -384,7 +384,7 @@ describe "should have_tag", :type => :controller do
|
|
384
384
|
with_tag("#2")
|
385
385
|
}
|
386
386
|
end
|
387
|
-
|
387
|
+
|
388
388
|
it "assert_select_from_rjs with multiple items" do
|
389
389
|
render_rjs do |page|
|
390
390
|
page.replace_html "test", "<div id=\"1\">foo</div>"
|
@@ -453,7 +453,7 @@ describe "css_select", :type => :controller do
|
|
453
453
|
css_select("#1").should have(1).element
|
454
454
|
css_select("#2").should have(1).element
|
455
455
|
end
|
456
|
-
|
456
|
+
|
457
457
|
end
|
458
458
|
|
459
459
|
describe "have_rjs behaviour_type", :type => :controller do
|
@@ -470,11 +470,11 @@ describe "have_rjs behaviour_type", :type => :controller do
|
|
470
470
|
page["test5"].hide
|
471
471
|
end
|
472
472
|
end
|
473
|
-
|
473
|
+
|
474
474
|
it "should pass if any rjs exists" do
|
475
475
|
response.should have_rjs
|
476
476
|
end
|
477
|
-
|
477
|
+
|
478
478
|
it "should fail if no rjs exists" do
|
479
479
|
render_rjs do |page|
|
480
480
|
end
|
@@ -482,7 +482,7 @@ describe "have_rjs behaviour_type", :type => :controller do
|
|
482
482
|
response.should have_rjs
|
483
483
|
end.should raise_error(SpecFailed)
|
484
484
|
end
|
485
|
-
|
485
|
+
|
486
486
|
it "should find all rjs from multiple statements" do
|
487
487
|
response.should have_rjs do
|
488
488
|
with_tag("#1")
|
@@ -499,7 +499,7 @@ describe "have_rjs behaviour_type", :type => :controller do
|
|
499
499
|
with_tag("div", 1)
|
500
500
|
with_tag("div#1", "foo")
|
501
501
|
}
|
502
|
-
|
502
|
+
|
503
503
|
lambda do
|
504
504
|
response.should have_rjs("test1") { |rjs|
|
505
505
|
rjs.size.should == 1
|
@@ -516,7 +516,7 @@ describe "have_rjs behaviour_type", :type => :controller do
|
|
516
516
|
# response.should have_rjs("test4")
|
517
517
|
# response.should have_rjs("test5")
|
518
518
|
end
|
519
|
-
|
519
|
+
|
520
520
|
# specify "should find rjs using :hide" do
|
521
521
|
# response.should have_rjs(:hide)
|
522
522
|
# response.should have_rjs(:hide, "test4")
|
@@ -565,7 +565,7 @@ describe "have_rjs behaviour_type", :type => :controller do
|
|
565
565
|
response.should have_rjs(:replace_html, "test3")
|
566
566
|
}.should raise_error(SpecFailed)
|
567
567
|
end
|
568
|
-
|
568
|
+
|
569
569
|
it "should find rjs using :insert_html (non-positioned)" do
|
570
570
|
response.should have_rjs(:insert_html) { |rjs|
|
571
571
|
with_tag("div", 1)
|
@@ -652,7 +652,7 @@ describe "send_email behaviour_type", :type => :controller do
|
|
652
652
|
response.should send_email{}
|
653
653
|
}.should raise_error(SpecFailed, /No e-mail in delivery list./)
|
654
654
|
end
|
655
|
-
|
655
|
+
|
656
656
|
it "should pass otherwise" do
|
657
657
|
AssertSelectMailer.deliver_test "<div><p>foo</p><p>bar</p></div>"
|
658
658
|
response.should send_email
|
@@ -666,7 +666,7 @@ describe "send_email behaviour_type", :type => :controller do
|
|
666
666
|
with_tag("p:last-child", "bar")
|
667
667
|
}
|
668
668
|
}
|
669
|
-
|
669
|
+
|
670
670
|
lambda {
|
671
671
|
response.should_not send_email
|
672
672
|
}.should raise_error(SpecFailed, "should not send email, but did")
|
@@ -676,52 +676,52 @@ end
|
|
676
676
|
|
677
677
|
# describe "An rjs call to :visual_effect, a 'should have_rjs' spec with",
|
678
678
|
# :type => :view do
|
679
|
-
#
|
679
|
+
#
|
680
680
|
# before do
|
681
681
|
# render 'rjs_spec/visual_effect'
|
682
682
|
# end
|
683
|
-
#
|
683
|
+
#
|
684
684
|
# it "should pass with the correct element name" do
|
685
685
|
# response.should have_rjs(:effect, :fade, 'mydiv')
|
686
686
|
# end
|
687
|
-
#
|
687
|
+
#
|
688
688
|
# it "should fail the wrong element name" do
|
689
689
|
# lambda {
|
690
690
|
# response.should have_rjs(:effect, :fade, 'wrongname')
|
691
691
|
# }.should raise_error(SpecFailed)
|
692
692
|
# end
|
693
|
-
#
|
693
|
+
#
|
694
694
|
# it "should fail with the correct element but the wrong command" do
|
695
695
|
# lambda {
|
696
696
|
# response.should have_rjs(:effect, :puff, 'mydiv')
|
697
697
|
# }.should raise_error(SpecFailed)
|
698
698
|
# end
|
699
|
-
#
|
699
|
+
#
|
700
700
|
# end
|
701
|
-
#
|
701
|
+
#
|
702
702
|
# describe "An rjs call to :visual_effect for a toggle, a 'should have_rjs' spec with",
|
703
703
|
# :type => :view do
|
704
|
-
#
|
704
|
+
#
|
705
705
|
# before do
|
706
706
|
# render 'rjs_spec/visual_toggle_effect'
|
707
707
|
# end
|
708
|
-
#
|
708
|
+
#
|
709
709
|
# it "should pass with the correct element name" do
|
710
710
|
# response.should have_rjs(:effect, :toggle_blind, 'mydiv')
|
711
711
|
# end
|
712
|
-
#
|
712
|
+
#
|
713
713
|
# it "should fail with the wrong element name" do
|
714
714
|
# lambda {
|
715
715
|
# response.should have_rjs(:effect, :toggle_blind, 'wrongname')
|
716
716
|
# }.should raise_error(SpecFailed)
|
717
717
|
# end
|
718
|
-
#
|
718
|
+
#
|
719
719
|
# it "should fail the correct element but the wrong command" do
|
720
720
|
# lambda {
|
721
721
|
# response.should have_rjs(:effect, :puff, 'mydiv')
|
722
722
|
# }.should raise_error(SpecFailed)
|
723
723
|
# end
|
724
|
-
#
|
724
|
+
#
|
725
725
|
# end
|
726
726
|
|
727
727
|
describe "string.should have_tag", :type => :helper do
|
@@ -769,7 +769,7 @@ describe "have_tag", :type => :controller do
|
|
769
769
|
</div>
|
770
770
|
<div class="piece">
|
771
771
|
<h3>Another</h3>
|
772
|
-
</div>
|
772
|
+
</div>
|
773
773
|
</div>
|
774
774
|
}
|
775
775
|
|
@@ -1,21 +1,21 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
|
2
2
|
|
3
3
|
describe "have_text" do
|
4
|
-
|
4
|
+
|
5
5
|
describe "where target is a Regexp" do
|
6
6
|
it 'should should match submitted text using a regexp' do
|
7
7
|
string = 'foo'
|
8
8
|
string.should have_text(/fo*/)
|
9
9
|
end
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
12
|
describe "where target is a String" do
|
13
13
|
it 'should match submitted text using a string' do
|
14
14
|
string = 'foo'
|
15
15
|
string.should have_text('foo')
|
16
16
|
end
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
end
|
20
20
|
|
21
21
|
describe "have_text",
|
@@ -51,7 +51,7 @@ describe "have_text",
|
|
51
51
|
response.should have_text("this is the text for this action")
|
52
52
|
}.should fail_with(/expected \"this is the text for this action\", got .*/)
|
53
53
|
end
|
54
|
-
|
54
|
+
|
55
55
|
it "should pass using should_not with incorrect text" do
|
56
56
|
post 'text_action'
|
57
57
|
response.should_not have_text("the accordian guy")
|
@@ -6,54 +6,54 @@ require File.dirname(__FILE__) + '/../../spec_helper'
|
|
6
6
|
integrate_views
|
7
7
|
end
|
8
8
|
controller_name :redirect_spec
|
9
|
-
|
9
|
+
|
10
10
|
it "redirected to another action" do
|
11
11
|
get 'action_with_redirect_to_somewhere'
|
12
12
|
response.should redirect_to(:action => 'somewhere')
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
15
|
it "redirected to another controller and action" do
|
16
16
|
get 'action_with_redirect_to_other_somewhere'
|
17
17
|
response.should redirect_to(:controller => 'render_spec', :action => 'text_action')
|
18
18
|
end
|
19
|
-
|
19
|
+
|
20
20
|
it "redirected to another action (with 'and return')" do
|
21
21
|
get 'action_with_redirect_to_somewhere_and_return'
|
22
22
|
response.should redirect_to(:action => 'somewhere')
|
23
23
|
end
|
24
|
-
|
24
|
+
|
25
25
|
it "redirected to correct path with leading /" do
|
26
26
|
get 'action_with_redirect_to_somewhere'
|
27
27
|
response.should redirect_to('/redirect_spec/somewhere')
|
28
28
|
end
|
29
|
-
|
29
|
+
|
30
30
|
it "redirected to correct path without leading /" do
|
31
31
|
get 'action_with_redirect_to_somewhere'
|
32
32
|
response.should redirect_to('redirect_spec/somewhere')
|
33
33
|
end
|
34
|
-
|
34
|
+
|
35
35
|
it "redirected to correct internal URL" do
|
36
36
|
get 'action_with_redirect_to_somewhere'
|
37
37
|
response.should redirect_to("http://test.host/redirect_spec/somewhere")
|
38
38
|
end
|
39
|
-
|
39
|
+
|
40
40
|
it "redirected to correct external URL" do
|
41
41
|
get 'action_with_redirect_to_rspec_site'
|
42
42
|
response.should redirect_to("http://rspec.rubyforge.org")
|
43
43
|
end
|
44
|
-
|
44
|
+
|
45
45
|
it "redirected :back" do
|
46
46
|
request.env['HTTP_REFERER'] = "http://test.host/previous/page"
|
47
47
|
get 'action_with_redirect_back'
|
48
48
|
response.should redirect_to(:back)
|
49
49
|
end
|
50
|
-
|
50
|
+
|
51
51
|
it "redirected :back and should redirect_to URL matches" do
|
52
52
|
request.env['HTTP_REFERER'] = "http://test.host/previous/page"
|
53
53
|
get 'action_with_redirect_back'
|
54
54
|
response.should redirect_to("http://test.host/previous/page")
|
55
55
|
end
|
56
|
-
|
56
|
+
|
57
57
|
it "redirected from within a respond_to block" do
|
58
58
|
get 'action_with_redirect_in_respond_to'
|
59
59
|
response.should redirect_to('redirect_spec/somewhere')
|
@@ -83,7 +83,7 @@ require File.dirname(__FILE__) + '/../../spec_helper'
|
|
83
83
|
|
84
84
|
end
|
85
85
|
|
86
|
-
|
86
|
+
|
87
87
|
describe "redirect_to with a controller spec in #{mode} mode and a custom request.host", :type => :controller do
|
88
88
|
if mode == 'integration'
|
89
89
|
integrate_views
|
@@ -92,23 +92,23 @@ require File.dirname(__FILE__) + '/../../spec_helper'
|
|
92
92
|
before do
|
93
93
|
request.host = "some.custom.host"
|
94
94
|
end
|
95
|
-
|
95
|
+
|
96
96
|
it "should pass when redirected to another action" do
|
97
97
|
get 'action_with_redirect_to_somewhere'
|
98
98
|
response.should redirect_to(:action => 'somewhere')
|
99
99
|
end
|
100
100
|
end
|
101
|
-
|
101
|
+
|
102
102
|
describe "Given a controller spec in #{mode} mode", :type => :controller do
|
103
103
|
if mode == 'integration'
|
104
104
|
integrate_views
|
105
105
|
end
|
106
106
|
controller_name :redirect_spec
|
107
|
-
|
107
|
+
|
108
108
|
it "an action that redirects should not result in an error if no should redirect_to expectation is called" do
|
109
109
|
get 'action_with_redirect_to_somewhere'
|
110
110
|
end
|
111
|
-
|
111
|
+
|
112
112
|
it "an action that redirects should not result in an error if should_not redirect_to expectation was called, but not to that action" do
|
113
113
|
get 'action_with_redirect_to_somewhere'
|
114
114
|
response.should_not redirect_to(:action => 'another_destination')
|
@@ -126,71 +126,71 @@ require File.dirname(__FILE__) + '/../../spec_helper'
|
|
126
126
|
response.should_not redirect_to(:action => 'any_destination')
|
127
127
|
end
|
128
128
|
|
129
|
-
|
129
|
+
|
130
130
|
end
|
131
|
-
|
131
|
+
|
132
132
|
describe "Given a controller spec in #{mode} mode, should redirect_to should fail when", :type => :controller do
|
133
133
|
if mode == 'integration'
|
134
134
|
integrate_views
|
135
135
|
end
|
136
136
|
controller_name :redirect_spec
|
137
|
-
|
137
|
+
|
138
138
|
it "redirected to wrong action" do
|
139
139
|
get 'action_with_redirect_to_somewhere'
|
140
140
|
lambda {
|
141
141
|
response.should redirect_to(:action => 'somewhere_else')
|
142
142
|
}.should fail_with("expected redirect to {:action=>\"somewhere_else\"}, got redirect to \"http://test.host/redirect_spec/somewhere\"")
|
143
143
|
end
|
144
|
-
|
144
|
+
|
145
145
|
it "redirected to incorrect path with leading /" do
|
146
146
|
get 'action_with_redirect_to_somewhere'
|
147
147
|
lambda {
|
148
148
|
response.should redirect_to('/redirect_spec/somewhere_else')
|
149
149
|
}.should fail_with('expected redirect to "/redirect_spec/somewhere_else", got redirect to "http://test.host/redirect_spec/somewhere"')
|
150
150
|
end
|
151
|
-
|
151
|
+
|
152
152
|
it "redirected to incorrect path without leading /" do
|
153
153
|
get 'action_with_redirect_to_somewhere'
|
154
154
|
lambda {
|
155
155
|
response.should redirect_to('redirect_spec/somewhere_else')
|
156
156
|
}.should fail_with('expected redirect to "redirect_spec/somewhere_else", got redirect to "http://test.host/redirect_spec/somewhere"')
|
157
157
|
end
|
158
|
-
|
158
|
+
|
159
159
|
it "redirected to incorrect internal URL (based on the action)" do
|
160
160
|
get 'action_with_redirect_to_somewhere'
|
161
161
|
lambda {
|
162
162
|
response.should redirect_to("http://test.host/redirect_spec/somewhere_else")
|
163
163
|
}.should fail_with('expected redirect to "http://test.host/redirect_spec/somewhere_else", got redirect to "http://test.host/redirect_spec/somewhere"')
|
164
164
|
end
|
165
|
-
|
165
|
+
|
166
166
|
it "redirected to wrong external URL" do
|
167
167
|
get 'action_with_redirect_to_rspec_site'
|
168
168
|
lambda {
|
169
169
|
response.should redirect_to("http://test.unit.rubyforge.org")
|
170
170
|
}.should fail_with('expected redirect to "http://test.unit.rubyforge.org", got redirect to "http://rspec.rubyforge.org"')
|
171
171
|
end
|
172
|
-
|
172
|
+
|
173
173
|
it "redirected to incorrect internal URL (based on the directory path)" do
|
174
174
|
get 'action_with_redirect_to_somewhere'
|
175
175
|
lambda {
|
176
176
|
response.should redirect_to("http://test.host/non_existent_controller/somewhere")
|
177
177
|
}.should fail_with('expected redirect to "http://test.host/non_existent_controller/somewhere", got redirect to "http://test.host/redirect_spec/somewhere"')
|
178
178
|
end
|
179
|
-
|
179
|
+
|
180
180
|
it "expected redirect :back, but redirected to a new URL" do
|
181
181
|
get 'action_with_no_redirect'
|
182
182
|
lambda {
|
183
183
|
response.should redirect_to(:back)
|
184
184
|
}.should fail_with('expected redirect to :back, got no redirect')
|
185
185
|
end
|
186
|
-
|
186
|
+
|
187
187
|
it "no redirect at all" do
|
188
188
|
get 'action_with_no_redirect'
|
189
189
|
lambda {
|
190
190
|
response.should redirect_to(:action => 'nowhere')
|
191
191
|
}.should fail_with("expected redirect to {:action=>\"nowhere\"}, got no redirect")
|
192
192
|
end
|
193
|
-
|
193
|
+
|
194
194
|
it "redirected to an internal URL which is unroutable and matched via a hash" do
|
195
195
|
get "action_with_redirect_to_unroutable_url_inside_app"
|
196
196
|
route = {:controller => "nonexistant", :action => "none"}
|
@@ -7,7 +7,7 @@ require File.dirname(__FILE__) + '/../../spec_helper'
|
|
7
7
|
if mode == 'integration'
|
8
8
|
integrate_views
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
it "should match a simple path" do
|
12
12
|
post 'some_action'
|
13
13
|
response.should render_template('some_action')
|
@@ -17,12 +17,12 @@ require File.dirname(__FILE__) + '/../../spec_helper'
|
|
17
17
|
post 'some_action'
|
18
18
|
response.should render_template('render_spec/some_action')
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
it "should match a less simple path to another controller" do
|
22
22
|
post 'action_which_renders_template_from_other_controller'
|
23
23
|
response.should render_template('controller_spec/action_with_template')
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
26
|
it "should match a symbol" do
|
27
27
|
post 'some_action'
|
28
28
|
response.should render_template(:some_action)
|
@@ -82,88 +82,88 @@ require File.dirname(__FILE__) + '/../../spec_helper'
|
|
82
82
|
end.should fail_with("expected \"some_action\", got nil")
|
83
83
|
end
|
84
84
|
end
|
85
|
-
|
85
|
+
|
86
86
|
describe "response.should_not render_template (in #{mode} mode)",
|
87
87
|
:type => :controller do
|
88
88
|
controller_name :render_spec
|
89
89
|
if mode == 'integration'
|
90
90
|
integrate_views
|
91
91
|
end
|
92
|
-
|
92
|
+
|
93
93
|
it "should pass when the action renders nothing" do
|
94
94
|
post 'action_that_renders_nothing'
|
95
95
|
response.should_not render_template('action_that_renders_nothing')
|
96
96
|
end
|
97
|
-
|
97
|
+
|
98
98
|
it "should pass when the action renders nothing (symbol)" do
|
99
99
|
post 'action_that_renders_nothing'
|
100
100
|
response.should_not render_template(:action_that_renders_nothing)
|
101
101
|
end
|
102
|
-
|
102
|
+
|
103
103
|
it "should pass when the action does not render the template" do
|
104
104
|
post 'some_action'
|
105
105
|
response.should_not render_template('some_other_template')
|
106
106
|
end
|
107
|
-
|
107
|
+
|
108
108
|
it "should pass when the action does not render the template (symbol)" do
|
109
109
|
post 'some_action'
|
110
110
|
response.should_not render_template(:some_other_template)
|
111
111
|
end
|
112
|
-
|
112
|
+
|
113
113
|
it "should pass when the action does not render the template (named with controller)" do
|
114
114
|
post 'some_action'
|
115
115
|
response.should_not render_template('render_spec/some_other_template')
|
116
116
|
end
|
117
|
-
|
117
|
+
|
118
118
|
it "should pass when the action renders the template with a different controller" do
|
119
119
|
post 'action_which_renders_template_from_other_controller'
|
120
120
|
response.should_not render_template('action_with_template')
|
121
121
|
end
|
122
|
-
|
122
|
+
|
123
123
|
it "should pass when the action renders the template (named with controller) with a different controller" do
|
124
124
|
post 'action_which_renders_template_from_other_controller'
|
125
125
|
response.should_not render_template('render_spec/action_with_template')
|
126
126
|
end
|
127
|
-
|
127
|
+
|
128
128
|
it "should pass when TEXT is rendered" do
|
129
129
|
post 'text_action'
|
130
130
|
response.should_not render_template('some_action')
|
131
131
|
end
|
132
|
-
|
132
|
+
|
133
133
|
it "should fail when the action renders the template" do
|
134
134
|
post 'some_action'
|
135
135
|
lambda do
|
136
136
|
response.should_not render_template('some_action')
|
137
137
|
end.should fail_with("expected not to render \"some_action\", but did")
|
138
138
|
end
|
139
|
-
|
139
|
+
|
140
140
|
it "should fail when the action renders the template (symbol)" do
|
141
141
|
post 'some_action'
|
142
142
|
lambda do
|
143
143
|
response.should_not render_template(:some_action)
|
144
144
|
end.should fail_with("expected not to render \"some_action\", but did")
|
145
145
|
end
|
146
|
-
|
146
|
+
|
147
147
|
it "should fail when the action renders the template (named with controller)" do
|
148
148
|
post 'some_action'
|
149
149
|
lambda do
|
150
150
|
response.should_not render_template('render_spec/some_action')
|
151
151
|
end.should fail_with("expected not to render \"render_spec/some_action\", but did")
|
152
152
|
end
|
153
|
-
|
153
|
+
|
154
154
|
it "should fail when the action renders the partial" do
|
155
155
|
post 'action_with_partial'
|
156
156
|
lambda do
|
157
157
|
response.should_not render_template('_a_partial')
|
158
158
|
end.should fail_with("expected not to render \"_a_partial\", but did")
|
159
159
|
end
|
160
|
-
|
160
|
+
|
161
161
|
it "should fail when the action renders the partial (named with controller)" do
|
162
162
|
post 'action_with_partial'
|
163
163
|
lambda do
|
164
164
|
response.should_not render_template('render_spec/_a_partial')
|
165
165
|
end.should fail_with("expected not to render \"render_spec/_a_partial\", but did")
|
166
166
|
end
|
167
|
-
|
167
|
+
|
168
168
|
end
|
169
169
|
end
|
@@ -39,7 +39,7 @@ describe "mock_model with null_object", :type => :view do
|
|
39
39
|
before(:each) do
|
40
40
|
@model = mock_model(MockableModel, :null_object => true, :mocked_method => "mocked")
|
41
41
|
end
|
42
|
-
|
42
|
+
|
43
43
|
it "should be able to mock methods" do
|
44
44
|
@model.mocked_method.should == "mocked"
|
45
45
|
end
|
@@ -54,7 +54,7 @@ describe "mock_model as association", :type => :view do
|
|
54
54
|
@mock_model = mock_model(MockableModel)
|
55
55
|
@real.mockable_model = @mock_model
|
56
56
|
end
|
57
|
-
|
57
|
+
|
58
58
|
it "should pass associated_model == mock" do
|
59
59
|
@mock_model.should == @real.mockable_model
|
60
60
|
end
|