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
@@ -1,14 +1,14 @@
|
|
1
1
|
module Spec
|
2
2
|
module Runner
|
3
3
|
module Formatter
|
4
|
-
# Baseclass for formatters that implements all required methods as no-ops.
|
4
|
+
# Baseclass for formatters that implements all required methods as no-ops.
|
5
5
|
class BaseFormatter
|
6
6
|
attr_accessor :example_group, :options, :where
|
7
7
|
def initialize(options, where)
|
8
8
|
@options = options
|
9
9
|
@where = where
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
12
|
# This method is invoked before any examples are run, right after
|
13
13
|
# they have all been collected. This can be useful for special
|
14
14
|
# formatters that need to provide progress on feedback (graphical ones)
|
@@ -36,12 +36,12 @@ module Spec
|
|
36
36
|
end
|
37
37
|
|
38
38
|
# This method is invoked when an +example+ fails, i.e. an exception occurred
|
39
|
-
# inside it (such as a failed should or other exception). +counter+ is the
|
40
|
-
# sequence number of the failure (starting at 1) and +failure+ is the associated
|
39
|
+
# inside it (such as a failed should or other exception). +counter+ is the
|
40
|
+
# sequence number of the failure (starting at 1) and +failure+ is the associated
|
41
41
|
# Failure object.
|
42
42
|
def example_failed(example, counter, failure)
|
43
43
|
end
|
44
|
-
|
44
|
+
|
45
45
|
# This method is invoked when an example is not yet implemented (i.e. has not
|
46
46
|
# been provided a block), or when an ExamplePendingError is raised.
|
47
47
|
# +message+ is the message from the ExamplePendingError, if it exists, or the
|
@@ -60,11 +60,11 @@ module Spec
|
|
60
60
|
# information about the failure.
|
61
61
|
def dump_failure(counter, failure)
|
62
62
|
end
|
63
|
-
|
63
|
+
|
64
64
|
# This method is invoked after the dumping of examples and failures.
|
65
65
|
def dump_summary(duration, example_count, failure_count, pending_count)
|
66
66
|
end
|
67
|
-
|
67
|
+
|
68
68
|
# This gets invoked after the summary if option is set to do so.
|
69
69
|
def dump_pending
|
70
70
|
end
|
@@ -25,11 +25,11 @@ module Spec
|
|
25
25
|
end
|
26
26
|
@pending_examples = []
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
def example_pending(example_group_description, example, message)
|
30
30
|
@pending_examples << ["#{example_group_description} #{example.description}", message]
|
31
31
|
end
|
32
|
-
|
32
|
+
|
33
33
|
def dump_failure(counter, failure)
|
34
34
|
@output.puts
|
35
35
|
@output.puts "#{counter.to_s})"
|
@@ -37,7 +37,7 @@ module Spec
|
|
37
37
|
@output.puts format_backtrace(failure.exception.backtrace)
|
38
38
|
@output.flush
|
39
39
|
end
|
40
|
-
|
40
|
+
|
41
41
|
def colourise(s, failure)
|
42
42
|
if(failure.expectation_not_met?)
|
43
43
|
red(s)
|
@@ -47,7 +47,7 @@ module Spec
|
|
47
47
|
magenta(s)
|
48
48
|
end
|
49
49
|
end
|
50
|
-
|
50
|
+
|
51
51
|
def dump_summary(duration, example_count, failure_count, pending_count)
|
52
52
|
return if dry_run?
|
53
53
|
@output.puts
|
@@ -55,7 +55,7 @@ module Spec
|
|
55
55
|
@output.puts
|
56
56
|
|
57
57
|
summary = "#{example_count} example#{'s' unless example_count == 1}, #{failure_count} failure#{'s' unless failure_count == 1}"
|
58
|
-
summary << ", #{pending_count} pending" if pending_count > 0
|
58
|
+
summary << ", #{pending_count} pending" if pending_count > 0
|
59
59
|
|
60
60
|
if failure_count == 0
|
61
61
|
if pending_count > 0
|
@@ -74,23 +74,23 @@ module Spec
|
|
74
74
|
@output.puts
|
75
75
|
@output.puts "Pending:"
|
76
76
|
@pending_examples.each do |pending_example|
|
77
|
-
@output.puts "#{pending_example[0]} (#{pending_example[1]})"
|
77
|
+
@output.puts "#{pending_example[0]} (#{pending_example[1]})"
|
78
78
|
end
|
79
79
|
end
|
80
80
|
@output.flush
|
81
81
|
end
|
82
|
-
|
82
|
+
|
83
83
|
def close
|
84
84
|
if IO === @output
|
85
|
-
@output.close
|
85
|
+
@output.close
|
86
86
|
end
|
87
87
|
end
|
88
|
-
|
88
|
+
|
89
89
|
def format_backtrace(backtrace)
|
90
90
|
return "" if backtrace.nil?
|
91
91
|
backtrace.map { |line| backtrace_line(line) }.join("\n")
|
92
92
|
end
|
93
|
-
|
93
|
+
|
94
94
|
protected
|
95
95
|
|
96
96
|
def colour?
|
@@ -100,7 +100,7 @@ module Spec
|
|
100
100
|
def dry_run?
|
101
101
|
@options.dry_run ? true : false
|
102
102
|
end
|
103
|
-
|
103
|
+
|
104
104
|
def backtrace_line(line)
|
105
105
|
line.sub(/\A([^:]+:\d+)$/, '\\1:')
|
106
106
|
end
|
@@ -117,13 +117,13 @@ module Spec
|
|
117
117
|
false
|
118
118
|
end
|
119
119
|
end
|
120
|
-
|
120
|
+
|
121
121
|
def green(text); colour(text, "\e[32m"); end
|
122
122
|
def red(text); colour(text, "\e[31m"); end
|
123
123
|
def magenta(text); colour(text, "\e[35m"); end
|
124
124
|
def yellow(text); colour(text, "\e[33m"); end
|
125
125
|
def blue(text); colour(text, "\e[34m"); end
|
126
|
-
|
126
|
+
|
127
127
|
end
|
128
128
|
end
|
129
129
|
end
|
@@ -3,7 +3,7 @@ require 'spec/runner/formatter/base_text_formatter'
|
|
3
3
|
module Spec
|
4
4
|
module Runner
|
5
5
|
module Formatter
|
6
|
-
class FailingExamplesFormatter < BaseTextFormatter
|
6
|
+
class FailingExamplesFormatter < BaseTextFormatter
|
7
7
|
def example_failed(example, counter, failure)
|
8
8
|
@output.puts "#{example_group.description} #{example.description}"
|
9
9
|
@output.flush
|
@@ -6,7 +6,7 @@ module Spec
|
|
6
6
|
module Formatter
|
7
7
|
class HtmlFormatter < BaseTextFormatter
|
8
8
|
include ERB::Util # for the #h method
|
9
|
-
|
9
|
+
|
10
10
|
def initialize(options, output)
|
11
11
|
super
|
12
12
|
@current_example_group_number = 0
|
@@ -17,12 +17,12 @@ module Spec
|
|
17
17
|
def current_example_group_number
|
18
18
|
@current_example_group_number
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
# The number of the currently running example (a global counter)
|
22
22
|
def current_example_number
|
23
23
|
@current_example_number
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
26
|
def start(example_count)
|
27
27
|
@example_count = example_count
|
28
28
|
|
@@ -97,7 +97,7 @@ module Spec
|
|
97
97
|
@snippet_extractor ||= SnippetExtractor.new
|
98
98
|
" <pre class=\"ruby\"><code>#{@snippet_extractor.snippet(failure.exception)}</code></pre>"
|
99
99
|
end
|
100
|
-
|
100
|
+
|
101
101
|
def move_progress
|
102
102
|
@output.puts " <script type=\"text/javascript\">moveProgressBar('#{percent_done}');</script>"
|
103
103
|
@output.flush
|
@@ -119,7 +119,7 @@ module Spec
|
|
119
119
|
totals = "This was a dry-run"
|
120
120
|
else
|
121
121
|
totals = "#{example_count} example#{'s' unless example_count == 1}, #{failure_count} failure#{'s' unless failure_count == 1}"
|
122
|
-
totals << ", #{pending_count} pending" if pending_count > 0
|
122
|
+
totals << ", #{pending_count} pending" if pending_count > 0
|
123
123
|
end
|
124
124
|
@output.puts "<script type=\"text/javascript\">document.getElementById('duration').innerHTML = \"Finished in <strong>#{duration} seconds</strong>\";</script>"
|
125
125
|
@output.puts "<script type=\"text/javascript\">document.getElementById('totals').innerHTML = \"#{totals}\";</script>"
|
@@ -130,10 +130,10 @@ module Spec
|
|
130
130
|
@output.flush
|
131
131
|
end
|
132
132
|
|
133
|
-
def html_header
|
133
|
+
def html_header
|
134
134
|
<<-EOF
|
135
135
|
<?xml version="1.0" encoding="UTF-8"?>
|
136
|
-
<!DOCTYPE html
|
136
|
+
<!DOCTYPE html
|
137
137
|
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
138
138
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
139
139
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
@@ -204,7 +204,7 @@ function makeYellow(element_id) {
|
|
204
204
|
}
|
205
205
|
EOF
|
206
206
|
end
|
207
|
-
|
207
|
+
|
208
208
|
def global_styles
|
209
209
|
<<-EOF
|
210
210
|
#rspec-header {
|
@@ -4,20 +4,20 @@ module Spec
|
|
4
4
|
module Runner
|
5
5
|
module Formatter
|
6
6
|
class ProfileFormatter < ProgressBarFormatter
|
7
|
-
|
7
|
+
|
8
8
|
def initialize(options, where)
|
9
9
|
super
|
10
10
|
@example_times = []
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
13
|
def start(count)
|
14
14
|
@output.puts "Profiling enabled."
|
15
15
|
end
|
16
|
-
|
16
|
+
|
17
17
|
def example_started(example)
|
18
18
|
@time = Time.now
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
def example_passed(example)
|
22
22
|
super
|
23
23
|
@example_times << [
|
@@ -26,15 +26,15 @@ module Spec
|
|
26
26
|
Time.now - @time
|
27
27
|
]
|
28
28
|
end
|
29
|
-
|
29
|
+
|
30
30
|
def start_dump
|
31
31
|
super
|
32
32
|
@output.puts "\n\nTop 10 slowest examples:\n"
|
33
|
-
|
33
|
+
|
34
34
|
@example_times = @example_times.sort_by do |description, example, time|
|
35
35
|
time
|
36
36
|
end.reverse
|
37
|
-
|
37
|
+
|
38
38
|
@example_times[0..9].each do |description, example, time|
|
39
39
|
@output.print red(sprintf("%.7f", time))
|
40
40
|
@output.puts " #{description} #{example}"
|
@@ -13,13 +13,13 @@ module Spec
|
|
13
13
|
@output.print green('.')
|
14
14
|
@output.flush
|
15
15
|
end
|
16
|
-
|
16
|
+
|
17
17
|
def example_pending(example_group_description, example, message)
|
18
18
|
super
|
19
19
|
@output.print yellow('P')
|
20
20
|
@output.flush
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
def start_dump
|
24
24
|
@output.puts
|
25
25
|
@output.flush
|
@@ -5,14 +5,14 @@ module Spec
|
|
5
5
|
class SnippetExtractor #:nodoc:
|
6
6
|
class NullConverter; def convert(code, pre); code; end; end #:nodoc:
|
7
7
|
begin; require 'rubygems'; require 'syntax/convertors/html'; @@converter = Syntax::Convertors::HTML.for_syntax "ruby"; rescue LoadError => e; @@converter = NullConverter.new; end
|
8
|
-
|
8
|
+
|
9
9
|
def snippet(error)
|
10
10
|
raw_code, line = snippet_for(error.backtrace[0])
|
11
11
|
highlighted = @@converter.convert(raw_code, false)
|
12
12
|
highlighted << "\n<span class=\"comment\"># gem install syntax to get syntax highlighting</span>" if @@converter.is_a?(NullConverter)
|
13
13
|
post_process(highlighted, line)
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
16
|
def snippet_for(error_line)
|
17
17
|
if error_line =~ /(.*):(\d+)/
|
18
18
|
file = $1
|
@@ -22,7 +22,7 @@ module Spec
|
|
22
22
|
["# Couldn't get snippet for #{error_line}", 1]
|
23
23
|
end
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
26
|
def lines_around(file, line)
|
27
27
|
if File.file?(file)
|
28
28
|
lines = File.open(file).read.split("\n")
|
@@ -35,7 +35,7 @@ module Spec
|
|
35
35
|
"# Couldn't get snippet for #{file}"
|
36
36
|
end
|
37
37
|
end
|
38
|
-
|
38
|
+
|
39
39
|
def post_process(highlighted, offending_line)
|
40
40
|
new_lines = []
|
41
41
|
highlighted.split("\n").each_with_index do |line, i|
|
@@ -45,7 +45,7 @@ module Spec
|
|
45
45
|
end
|
46
46
|
new_lines.join("\n")
|
47
47
|
end
|
48
|
-
|
48
|
+
|
49
49
|
end
|
50
50
|
end
|
51
51
|
end
|
@@ -10,24 +10,24 @@ module Spec
|
|
10
10
|
output.puts example_group.description
|
11
11
|
output.flush
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
def example_failed(example, counter, failure)
|
15
15
|
message = if failure.expectation_not_met?
|
16
16
|
"- #{example.description} (FAILED - #{counter})"
|
17
17
|
else
|
18
18
|
"- #{example.description} (ERROR - #{counter})"
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
output.puts(failure.expectation_not_met? ? red(message) : magenta(message))
|
22
22
|
output.flush
|
23
23
|
end
|
24
|
-
|
24
|
+
|
25
25
|
def example_passed(example)
|
26
26
|
message = "- #{example.description}"
|
27
27
|
output.puts green(message)
|
28
28
|
output.flush
|
29
29
|
end
|
30
|
-
|
30
|
+
|
31
31
|
def example_pending(example_group_description, example, message)
|
32
32
|
super
|
33
33
|
output.puts yellow("- #{example.description} (PENDING: #{message})")
|
@@ -7,11 +7,11 @@ module Spec
|
|
7
7
|
module Story
|
8
8
|
class HtmlFormatter < BaseTextFormatter
|
9
9
|
include ERB::Util
|
10
|
-
|
10
|
+
|
11
11
|
def run_started(count)
|
12
12
|
@output.puts <<-EOF
|
13
13
|
<?xml version="1.0" encoding="UTF-8"?>
|
14
|
-
<!DOCTYPE html
|
14
|
+
<!DOCTYPE html
|
15
15
|
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
16
16
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
17
17
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
@@ -47,7 +47,7 @@ EOF
|
|
47
47
|
</head>
|
48
48
|
EOF
|
49
49
|
end
|
50
|
-
|
50
|
+
|
51
51
|
def story_started(title, narrative)
|
52
52
|
@output.puts <<-EOF
|
53
53
|
<dl class="story passed">
|
@@ -82,7 +82,7 @@ EOF
|
|
82
82
|
</dl>
|
83
83
|
EOF
|
84
84
|
end
|
85
|
-
|
85
|
+
|
86
86
|
def found_scenario(type, description)
|
87
87
|
end
|
88
88
|
|
@@ -112,11 +112,11 @@ EOF
|
|
112
112
|
def step_failed(type, description, *args)
|
113
113
|
print_step('failed', type, description, *args)
|
114
114
|
end
|
115
|
-
|
115
|
+
|
116
116
|
def print_step(klass, type, description, *args)
|
117
117
|
spans = args.map { |arg| "<span class=\"param\">#{arg}</span>" }
|
118
118
|
desc_string = description.step_name
|
119
|
-
arg_regexp = description.arg_regexp
|
119
|
+
arg_regexp = description.arg_regexp
|
120
120
|
i = -1
|
121
121
|
inner = type.to_s.capitalize + ' ' + desc_string.gsub(arg_regexp) { |param| spans[i+=1] }
|
122
122
|
@output.puts " <li class=\"#{klass}\">#{inner}</li>"
|
@@ -13,7 +13,7 @@ module Spec
|
|
13
13
|
@pending_steps = []
|
14
14
|
@previous_type = nil
|
15
15
|
end
|
16
|
-
|
16
|
+
|
17
17
|
def run_started(count)
|
18
18
|
@count = count
|
19
19
|
@output.puts "Running #@count scenarios\n\n"
|
@@ -27,7 +27,7 @@ module Spec
|
|
27
27
|
@output.print line
|
28
28
|
end
|
29
29
|
end
|
30
|
-
|
30
|
+
|
31
31
|
def story_ended(title, narrative)
|
32
32
|
@output.puts
|
33
33
|
@output.puts
|
@@ -39,22 +39,22 @@ module Spec
|
|
39
39
|
@output.print "\n\n Scenario: #{scenario_name}"
|
40
40
|
@scenario_ok = true
|
41
41
|
end
|
42
|
-
|
42
|
+
|
43
43
|
def scenario_succeeded(story_title, scenario_name)
|
44
44
|
@successful_scenario_count += 1
|
45
45
|
end
|
46
|
-
|
46
|
+
|
47
47
|
def scenario_failed(story_title, scenario_name, err)
|
48
48
|
@options.backtrace_tweaker.tweak_backtrace(err)
|
49
49
|
@failed_scenarios << [story_title, scenario_name, err] unless @scenario_already_failed
|
50
50
|
@scenario_already_failed = true
|
51
51
|
end
|
52
|
-
|
52
|
+
|
53
53
|
def scenario_pending(story_title, scenario_name, msg)
|
54
54
|
@pending_scenario_count += 1 unless @scenario_already_failed
|
55
55
|
@scenario_already_failed = true
|
56
56
|
end
|
57
|
-
|
57
|
+
|
58
58
|
def run_ended
|
59
59
|
@output.puts "#@count scenarios: #@successful_scenario_count succeeded, #{@failed_scenarios.size} failed, #@pending_scenario_count pending"
|
60
60
|
unless @pending_steps.empty?
|
@@ -74,32 +74,32 @@ module Spec
|
|
74
74
|
#{err.backtrace.join("\n")}
|
75
75
|
]
|
76
76
|
end
|
77
|
-
end
|
77
|
+
end
|
78
78
|
end
|
79
79
|
|
80
80
|
def step_upcoming(type, description, *args)
|
81
81
|
end
|
82
|
-
|
82
|
+
|
83
83
|
def step_succeeded(type, description, *args)
|
84
84
|
found_step(type, description, false, *args)
|
85
85
|
end
|
86
|
-
|
86
|
+
|
87
87
|
def step_pending(type, description, *args)
|
88
88
|
found_step(type, description, false, *args)
|
89
89
|
@pending_steps << [@current_story_title, @current_scenario_name, description]
|
90
90
|
@output.print " (PENDING)"
|
91
91
|
@scenario_ok = false
|
92
92
|
end
|
93
|
-
|
93
|
+
|
94
94
|
def step_failed(type, description, *args)
|
95
95
|
found_step(type, description, true, *args)
|
96
96
|
@output.print red(@scenario_ok ? " (FAILED)" : " (SKIPPED)")
|
97
97
|
@scenario_ok = false
|
98
98
|
end
|
99
|
-
|
99
|
+
|
100
100
|
def collected_steps(steps)
|
101
101
|
end
|
102
|
-
|
102
|
+
|
103
103
|
def method_missing(sym, *args, &block) #:nodoc:
|
104
104
|
# noop - ignore unknown messages
|
105
105
|
end
|
@@ -12,7 +12,7 @@ module Spec
|
|
12
12
|
@filter = filter
|
13
13
|
@heckle_class = heckle_class
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
16
|
# Runs all the example groups held by +rspec_options+ once for each of the
|
17
17
|
# methods in the matched classes.
|
18
18
|
def heckle_with
|
@@ -22,13 +22,13 @@ module Spec
|
|
22
22
|
heckle_class_or_module(@filter)
|
23
23
|
end
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
26
|
def heckle_method(class_name, method_name)
|
27
27
|
verify_constant(class_name)
|
28
28
|
heckle = @heckle_class.new(class_name, method_name, rspec_options)
|
29
29
|
heckle.validate
|
30
30
|
end
|
31
|
-
|
31
|
+
|
32
32
|
def heckle_class_or_module(class_or_module_name)
|
33
33
|
verify_constant(class_or_module_name)
|
34
34
|
pattern = /^#{class_or_module_name}/
|
@@ -36,7 +36,7 @@ module Spec
|
|
36
36
|
ObjectSpace.each_object(Class) do |klass|
|
37
37
|
classes << klass if klass.name =~ pattern
|
38
38
|
end
|
39
|
-
|
39
|
+
|
40
40
|
classes.each do |klass|
|
41
41
|
klass.instance_methods(false).each do |method_name|
|
42
42
|
heckle = @heckle_class.new(klass.name, method_name, rspec_options)
|
@@ -44,7 +44,7 @@ module Spec
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
47
|
-
|
47
|
+
|
48
48
|
def verify_constant(name)
|
49
49
|
begin
|
50
50
|
# This is defined in Heckle
|
@@ -54,7 +54,7 @@ module Spec
|
|
54
54
|
end
|
55
55
|
end
|
56
56
|
end
|
57
|
-
|
57
|
+
|
58
58
|
#Supports Heckle 1.2 and prior (earlier versions used Heckle::Base)
|
59
59
|
class Heckler < (Heckle.const_defined?(:Base) ? Heckle::Base : Heckle)
|
60
60
|
def initialize(klass_name, method_name, rspec_options)
|
@@ -122,7 +122,7 @@ module Spec
|
|
122
122
|
@options.argv = @argv.dup
|
123
123
|
return if parse_generate_options
|
124
124
|
return if parse_drb
|
125
|
-
|
125
|
+
|
126
126
|
super(@argv) do |file|
|
127
127
|
@options.files << file
|
128
128
|
blk.call(file) if blk
|
@@ -137,7 +137,7 @@ module Spec
|
|
137
137
|
require file
|
138
138
|
end
|
139
139
|
end
|
140
|
-
|
140
|
+
|
141
141
|
def parse_options_file(options_file)
|
142
142
|
option_file_args = IO.readlines(options_file).map {|l| l.chomp.split " "}.flatten
|
143
143
|
@argv.push(*option_file_args)
|
@@ -152,7 +152,7 @@ module Spec
|
|
152
152
|
options_file = @argv.delete_at(index)
|
153
153
|
end
|
154
154
|
end
|
155
|
-
|
155
|
+
|
156
156
|
if options_file
|
157
157
|
write_generated_options(options_file)
|
158
158
|
return true
|
@@ -160,7 +160,7 @@ module Spec
|
|
160
160
|
return false
|
161
161
|
end
|
162
162
|
end
|
163
|
-
|
163
|
+
|
164
164
|
def write_generated_options(options_file)
|
165
165
|
File.open(options_file, 'w') do |io|
|
166
166
|
io.puts @argv.join("\n")
|
@@ -191,7 +191,7 @@ module Spec
|
|
191
191
|
def parse_help
|
192
192
|
@out_stream.puts self
|
193
193
|
exit if stdout?
|
194
|
-
end
|
194
|
+
end
|
195
195
|
|
196
196
|
def stdout?
|
197
197
|
@out_stream == $stdout
|
@@ -100,7 +100,7 @@ module Spec
|
|
100
100
|
|
101
101
|
def examples_should_not_be_run
|
102
102
|
@examples_should_be_run = false
|
103
|
-
end
|
103
|
+
end
|
104
104
|
|
105
105
|
def colour=(colour)
|
106
106
|
@colour = colour
|
@@ -147,7 +147,7 @@ module Spec
|
|
147
147
|
@format_options ||= []
|
148
148
|
@format_options << [format, where]
|
149
149
|
end
|
150
|
-
|
150
|
+
|
151
151
|
def formatters
|
152
152
|
@format_options ||= [['progress', @output_stream]]
|
153
153
|
@formatters ||= load_formatters(@format_options, EXAMPLE_FORMATTERS)
|
@@ -157,7 +157,7 @@ module Spec
|
|
157
157
|
@format_options ||= [['plain', @output_stream]]
|
158
158
|
@formatters ||= load_formatters(@format_options, STORY_FORMATTERS)
|
159
159
|
end
|
160
|
-
|
160
|
+
|
161
161
|
def load_formatters(format_options, formatters)
|
162
162
|
format_options.map do |format, where|
|
163
163
|
formatter_type = if formatters[format]
|
@@ -197,13 +197,13 @@ module Spec
|
|
197
197
|
end
|
198
198
|
result
|
199
199
|
end
|
200
|
-
|
200
|
+
|
201
201
|
protected
|
202
202
|
def examples_should_be_run?
|
203
203
|
return @examples_should_be_run unless @examples_should_be_run.nil?
|
204
204
|
@examples_should_be_run = true
|
205
205
|
end
|
206
|
-
|
206
|
+
|
207
207
|
def differ_class=(klass)
|
208
208
|
return unless klass
|
209
209
|
@differ_class = klass
|
@@ -227,7 +227,7 @@ module Spec
|
|
227
227
|
if $_spec_spec ; raise e ; else exit(1) ; end
|
228
228
|
end
|
229
229
|
end
|
230
|
-
|
230
|
+
|
231
231
|
def custom_runner
|
232
232
|
return nil unless custom_runner?
|
233
233
|
klass_name, arg = ClassAndArgumentsParser.parse(user_input_for_runner)
|
@@ -238,13 +238,13 @@ module Spec
|
|
238
238
|
def custom_runner?
|
239
239
|
return user_input_for_runner ? true : false
|
240
240
|
end
|
241
|
-
|
241
|
+
|
242
242
|
def heckle
|
243
243
|
returns = self.heckle_runner.heckle_with
|
244
244
|
self.heckle_runner = nil
|
245
245
|
returns
|
246
246
|
end
|
247
|
-
|
247
|
+
|
248
248
|
def sorted_files
|
249
249
|
return sorter ? files.sort(&sorter) : files
|
250
250
|
end
|