picolena 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/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
@@ -11,7 +11,7 @@ module Spec
|
|
11
11
|
translate_file(from, to)
|
12
12
|
end
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
15
|
def translate_dir(from, to)
|
16
16
|
FileUtils.mkdir_p(to) unless File.directory?(to)
|
17
17
|
Dir["#{from}/*"].each do |sub_from|
|
@@ -43,35 +43,35 @@ module Spec
|
|
43
43
|
line.gsub!(/:string/, 'an_instance_of(String)')
|
44
44
|
|
45
45
|
return line if line =~ /(should_not|should)_receive/
|
46
|
-
|
46
|
+
|
47
47
|
line.gsub!(/(^\s*)context([\s*|\(]['|"|A-Z])/, '\1describe\2')
|
48
48
|
line.gsub!(/(^\s*)specify([\s*|\(]['|"|A-Z])/, '\1it\2')
|
49
49
|
line.gsub!(/(^\s*)context_setup(\s*[do|\{])/, '\1before(:all)\2')
|
50
50
|
line.gsub!(/(^\s*)context_teardown(\s*[do|\{])/, '\1after(:all)\2')
|
51
51
|
line.gsub!(/(^\s*)setup(\s*[do|\{])/, '\1before(:each)\2')
|
52
52
|
line.gsub!(/(^\s*)teardown(\s*[do|\{])/, '\1after(:each)\2')
|
53
|
-
|
53
|
+
|
54
54
|
if line =~ /(.*\.)(should_not|should)(?:_be)(?!_)(.*)/m
|
55
55
|
pre = $1
|
56
56
|
should = $2
|
57
57
|
post = $3
|
58
58
|
be_or_equal = post =~ /(<|>)/ ? "be" : "equal"
|
59
|
-
|
59
|
+
|
60
60
|
return "#{pre}#{should} #{be_or_equal}#{post}"
|
61
61
|
end
|
62
|
-
|
62
|
+
|
63
63
|
if line =~ /(.*\.)(should_not|should)_(?!not)\s*(.*)/m
|
64
64
|
pre = $1
|
65
65
|
should = $2
|
66
66
|
post = $3
|
67
|
-
|
67
|
+
|
68
68
|
post.gsub!(/^raise/, 'raise_error')
|
69
69
|
post.gsub!(/^throw/, 'throw_symbol')
|
70
|
-
|
70
|
+
|
71
71
|
unless standard_matcher?(post)
|
72
72
|
post = "be_#{post}"
|
73
73
|
end
|
74
|
-
|
74
|
+
|
75
75
|
# Add parenthesis
|
76
76
|
post.gsub!(/^(\w+)\s+([\w|\.|\,|\(.*\)|\'|\"|\:|@| ]+)(\})/, '\1(\2)\3') # inside a block
|
77
77
|
post.gsub!(/^(redirect_to)\s+(.*)/, '\1(\2)') # redirect_to, which often has http:
|
@@ -84,22 +84,22 @@ module Spec
|
|
84
84
|
|
85
85
|
line
|
86
86
|
end
|
87
|
-
|
87
|
+
|
88
88
|
def standard_matcher?(matcher)
|
89
89
|
patterns = [
|
90
|
-
/^be/,
|
90
|
+
/^be/,
|
91
91
|
/^be_close/,
|
92
|
-
/^eql/,
|
93
|
-
/^equal/,
|
94
|
-
/^has/,
|
95
|
-
/^have/,
|
96
|
-
/^change/,
|
92
|
+
/^eql/,
|
93
|
+
/^equal/,
|
94
|
+
/^has/,
|
95
|
+
/^have/,
|
96
|
+
/^change/,
|
97
97
|
/^include/,
|
98
|
-
/^match/,
|
99
|
-
/^raise_error/,
|
100
|
-
/^respond_to/,
|
101
|
-
/^redirect_to/,
|
102
|
-
/^satisfy/,
|
98
|
+
/^match/,
|
99
|
+
/^raise_error/,
|
100
|
+
/^respond_to/,
|
101
|
+
/^redirect_to/,
|
102
|
+
/^satisfy/,
|
103
103
|
/^throw_symbol/,
|
104
104
|
# Extra ones that we use in spec_helper
|
105
105
|
/^pass/,
|
@@ -109,6 +109,6 @@ module Spec
|
|
109
109
|
matched = patterns.detect{ |p| matcher =~ p }
|
110
110
|
!matched.nil?
|
111
111
|
end
|
112
|
-
|
112
|
+
|
113
113
|
end
|
114
114
|
end
|
@@ -13,8 +13,8 @@ module Spec
|
|
13
13
|
FULL_VERSION = "#{[MAJOR, MINOR, TINY, RELEASE_CANDIDATE].compact.join('.')} (build #{BUILD_TIME_UTC})"
|
14
14
|
|
15
15
|
NAME = "RSpec"
|
16
|
-
URL = "http://rspec.rubyforge.org/"
|
17
|
-
|
16
|
+
URL = "http://rspec.rubyforge.org/"
|
17
|
+
|
18
18
|
DESCRIPTION = "#{NAME}-#{FULL_VERSION} - BDD for Ruby\n#{URL}"
|
19
19
|
end
|
20
20
|
end
|
@@ -8,7 +8,7 @@ class PreCommit::Rspec < PreCommit
|
|
8
8
|
pre_commit_rails
|
9
9
|
ok_to_commit
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
12
|
def check_for_gem_dependencies
|
13
13
|
require "rubygems"
|
14
14
|
gem 'rake'
|
@@ -39,7 +39,7 @@ class PreCommit::Rspec < PreCommit
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
42
|
-
|
42
|
+
|
43
43
|
# TODO - move me up to the project root
|
44
44
|
def touch_revision_storing_files
|
45
45
|
files = [
|
@@ -56,13 +56,13 @@ class PreCommit::Rspec < PreCommit
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
end
|
59
|
-
|
59
|
+
|
60
60
|
def pre_commit_core
|
61
61
|
Dir.chdir 'rspec' do
|
62
62
|
rake = (PLATFORM == "i386-mswin32") ? "rake.bat" : "rake"
|
63
63
|
system("#{rake} pre_commit --verbose --trace")
|
64
64
|
raise "RSpec Core pre_commit failed" if error_code?
|
65
|
-
end
|
65
|
+
end
|
66
66
|
end
|
67
67
|
|
68
68
|
def pre_commit_textmate_bundle
|
@@ -70,7 +70,7 @@ class PreCommit::Rspec < PreCommit
|
|
70
70
|
rake = (PLATFORM == "i386-mswin32") ? "rake.bat" : "rake"
|
71
71
|
system("#{rake} spec --verbose --trace")
|
72
72
|
raise "RSpec Textmate Bundle specs failed" if error_code?
|
73
|
-
end
|
73
|
+
end
|
74
74
|
end
|
75
75
|
|
76
76
|
def install_dependencies
|
@@ -104,7 +104,7 @@ class PreCommit::Rspec < PreCommit
|
|
104
104
|
end
|
105
105
|
end
|
106
106
|
end
|
107
|
-
|
107
|
+
|
108
108
|
def ok_to_commit
|
109
109
|
puts "OK TO COMMIT"
|
110
110
|
end
|
@@ -42,7 +42,7 @@ class PreCommit::RspecOnRails < PreCommit
|
|
42
42
|
|
43
43
|
rake_sh "spec"
|
44
44
|
rake_sh "spec:plugins:rspec_on_rails"
|
45
|
-
|
45
|
+
|
46
46
|
# TODO - why is this necessary? Shouldn't the specs leave
|
47
47
|
# a clean DB?
|
48
48
|
rake_sh "db:test:prepare"
|
@@ -91,12 +91,12 @@ class PreCommit::RspecOnRails < PreCommit
|
|
91
91
|
rm_rf 'spec/spec.opts'
|
92
92
|
rm_rf 'spec/rcov.opts'
|
93
93
|
end
|
94
|
-
|
94
|
+
|
95
95
|
def copy(source, target)
|
96
96
|
output = silent_sh("cp -R #{File.expand_path(source)} #{File.expand_path(target)}")
|
97
97
|
raise "Error installing rspec" if shell_error?(output)
|
98
98
|
end
|
99
|
-
|
99
|
+
|
100
100
|
def generate_rspec
|
101
101
|
result = silent_sh("ruby script/generate rspec --force")
|
102
102
|
if error_code? || result =~ /^Missing/
|
@@ -158,7 +158,7 @@ class PreCommit::RspecOnRails < PreCommit
|
|
158
158
|
raise "rspec_scaffold failed. #{result}"
|
159
159
|
end
|
160
160
|
end
|
161
|
-
|
161
|
+
|
162
162
|
def purchase_migration_version
|
163
163
|
"005"
|
164
164
|
end
|
@@ -205,7 +205,7 @@ class PreCommit::RspecOnRails < PreCommit
|
|
205
205
|
end
|
206
206
|
puts "#####################################################"
|
207
207
|
end
|
208
|
-
|
208
|
+
|
209
209
|
def generate_login_controller
|
210
210
|
generator = "ruby script/generate rspec_controller login signup login logout --force"
|
211
211
|
notice = <<-EOF
|
@@ -269,7 +269,7 @@ class PreCommit::RspecOnRails < PreCommit
|
|
269
269
|
end
|
270
270
|
end
|
271
271
|
end
|
272
|
-
|
272
|
+
|
273
273
|
def update_dependencies
|
274
274
|
check_dependencies
|
275
275
|
VENDOR_DEPS.each do |dep|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/../spec_helper.rb'
|
2
2
|
|
3
3
|
##
|
4
|
-
# This is not a complete specification of PreCommit, but
|
4
|
+
# This is not a complete specification of PreCommit, but
|
5
5
|
# just a collection of bug fix regression tests.
|
6
6
|
describe "The helper method PreCommit#silent_sh" do
|
7
7
|
before do
|
@@ -4,7 +4,7 @@ require 'fileutils'
|
|
4
4
|
include FileUtils
|
5
5
|
|
6
6
|
##
|
7
|
-
# This is not a complete specification of PreCommit.RSpecOnRails, but
|
7
|
+
# This is not a complete specification of PreCommit.RSpecOnRails, but
|
8
8
|
# just a collection of bug fix regression tests.
|
9
9
|
describe "RSpecOnRails pre_commit" do
|
10
10
|
before do
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!DOCTYPE html
|
2
|
+
<!DOCTYPE html
|
3
3
|
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
4
4
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
5
5
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
@@ -252,8 +252,8 @@ a {
|
|
252
252
|
<dl>
|
253
253
|
<dt id="example_group_9">Autotest::Rspec handling failed results</dt>
|
254
254
|
<script type="text/javascript">moveProgressBar('1.2');</script>
|
255
|
-
<dd class="spec passed"><span class="passed_spec_name">should scan the output into a multi-dimensional array,
|
256
|
-
consisting of the failing spec's name as the first element,
|
255
|
+
<dd class="spec passed"><span class="passed_spec_name">should scan the output into a multi-dimensional array,
|
256
|
+
consisting of the failing spec's name as the first element,
|
257
257
|
and the failure as the second</span></dd>
|
258
258
|
</dl>
|
259
259
|
</div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require File.dirname(__FILE__) + "/../autotest_helper"
|
2
2
|
|
3
3
|
class Autotest
|
4
|
-
|
4
|
+
|
5
5
|
module AutotestHelper
|
6
6
|
def rspec_output
|
7
7
|
<<-HERE
|
@@ -22,8 +22,8 @@ Autotest::Rspec handling failed results should return an array of failed example
|
|
22
22
|
Autotest::Rspec tests/specs for a given file should find all the specs for a given file (TODO)
|
23
23
|
HERE
|
24
24
|
end
|
25
|
-
|
26
|
-
|
25
|
+
|
26
|
+
|
27
27
|
def common_setup
|
28
28
|
@proc = mock Proc
|
29
29
|
@kernel = mock Kernel
|
@@ -45,15 +45,15 @@ HERE
|
|
45
45
|
]
|
46
46
|
end
|
47
47
|
end
|
48
|
-
|
48
|
+
|
49
49
|
describe Rspec, "selection of rspec command" do
|
50
50
|
include AutotestHelper
|
51
|
-
|
51
|
+
|
52
52
|
before :each do
|
53
53
|
common_setup
|
54
54
|
@rspec_autotest = Rspec.new
|
55
55
|
end
|
56
|
-
|
56
|
+
|
57
57
|
it "should try to find the spec command if it exists in ./bin and use it above everything else" do
|
58
58
|
File.stub!(:exists?).and_return true
|
59
59
|
|
@@ -69,31 +69,31 @@ HERE
|
|
69
69
|
|
70
70
|
@rspec_autotest.spec_command.should == "/foo/spec"
|
71
71
|
end
|
72
|
-
|
72
|
+
|
73
73
|
it "should raise an error if no spec command is found at all" do
|
74
74
|
File.stub!(:exists?).and_return false
|
75
|
-
|
75
|
+
|
76
76
|
lambda {
|
77
77
|
@rspec_autotest.spec_command
|
78
78
|
}.should raise_error(RspecCommandError, "No spec command could be found!")
|
79
79
|
end
|
80
|
-
|
80
|
+
|
81
81
|
end
|
82
|
-
|
82
|
+
|
83
83
|
describe Rspec, "selection of rspec command (windows compatibility issues)" do
|
84
84
|
include AutotestHelper
|
85
|
-
|
85
|
+
|
86
86
|
before :each do
|
87
87
|
common_setup
|
88
88
|
end
|
89
|
-
|
89
|
+
|
90
90
|
it "should use the ALT_SEPARATOR if it is non-nil" do
|
91
91
|
@rspec_autotest = Rspec.new
|
92
92
|
spec_command = File.expand_path("#{File.dirname(__FILE__)}/../../bin/spec")
|
93
93
|
@rspec_autotest.stub!(:spec_commands).and_return [spec_command]
|
94
94
|
@rspec_autotest.spec_command(@windows_alt_separator).should == spec_command.gsub('/', @windows_alt_separator)
|
95
95
|
end
|
96
|
-
|
96
|
+
|
97
97
|
it "should not use the ALT_SEPATOR if it is nil" do
|
98
98
|
@windows_alt_separator = nil
|
99
99
|
@rspec_autotest = Rspec.new
|
@@ -103,7 +103,7 @@ HERE
|
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
106
|
-
describe Rspec, "adding spec.opts --options" do
|
106
|
+
describe Rspec, "adding spec.opts --options" do
|
107
107
|
before :each do
|
108
108
|
@rspec_autotest = Rspec.new
|
109
109
|
end
|
@@ -117,14 +117,14 @@ HERE
|
|
117
117
|
File.stub!(:exist?).and_return false
|
118
118
|
Rspec.new.add_options_if_present.should == ""
|
119
119
|
end
|
120
|
-
end
|
121
|
-
|
120
|
+
end
|
121
|
+
|
122
122
|
describe Rspec do
|
123
123
|
before :each do
|
124
124
|
@rspec_autotest = Rspec.new
|
125
125
|
@rspec_autotest.stub!(:ruby).and_return "ruby"
|
126
126
|
@rspec_autotest.stub!(:add_options_if_present).and_return "-O spec/spec.opts"
|
127
|
-
|
127
|
+
|
128
128
|
@ruby = @rspec_autotest.ruby
|
129
129
|
@spec_command = @rspec_autotest.spec_command
|
130
130
|
@options = @rspec_autotest.add_options_if_present
|
@@ -136,60 +136,60 @@ HERE
|
|
136
136
|
@files_to_test.stub!(:keys).and_return @files_to_test[:spec]
|
137
137
|
@to_test = @files_to_test.keys.flatten.join ' '
|
138
138
|
end
|
139
|
-
|
139
|
+
|
140
140
|
it "should make the apropriate test command" do
|
141
141
|
@rspec_autotest.make_test_cmd(@files_to_test).should == "#{@ruby} -S #{@spec_command} #{@options} #{@to_test}"
|
142
142
|
end
|
143
143
|
end
|
144
|
-
|
144
|
+
|
145
145
|
describe Rspec, "mappings" do
|
146
|
-
|
146
|
+
|
147
147
|
before(:each) do
|
148
148
|
@lib_file = "lib/something.rb"
|
149
149
|
@spec_file = "spec/something_spec.rb"
|
150
150
|
@rspec_autotest = Rspec.new
|
151
151
|
@rspec_autotest.hook :initialize
|
152
152
|
end
|
153
|
-
|
153
|
+
|
154
154
|
it "should find the spec file for a given lib file" do
|
155
155
|
@rspec_autotest.should map_specs([@spec_file]).to(@lib_file)
|
156
156
|
end
|
157
|
-
|
157
|
+
|
158
158
|
it "should find the spec file if given a spec file" do
|
159
159
|
@rspec_autotest.should map_specs([@spec_file]).to(@spec_file)
|
160
160
|
end
|
161
|
-
|
161
|
+
|
162
162
|
it "should only find the file if the file is being tracked (in @file)" do
|
163
163
|
@rspec_autotest.should map_specs([]).to("lib/untracked_file")
|
164
164
|
end
|
165
165
|
end
|
166
|
-
|
166
|
+
|
167
167
|
describe Rspec, "consolidating failures" do
|
168
168
|
include AutotestHelper
|
169
|
-
|
169
|
+
|
170
170
|
before :each do
|
171
171
|
common_setup
|
172
172
|
@rspec_autotest = Rspec.new
|
173
|
-
|
173
|
+
|
174
174
|
@spec_file = "./spec/autotest/rspec_spec.rb"
|
175
175
|
@rspec_autotest.instance_variable_set("@files", {@spec_file => Time.now})
|
176
176
|
@rspec_autotest.stub!(:find_files_to_test).and_return true
|
177
177
|
end
|
178
|
-
|
178
|
+
|
179
179
|
it "should return no failures if no failures were given in the output" do
|
180
180
|
@rspec_autotest.consolidate_failures([[]]).should == {}
|
181
181
|
end
|
182
|
-
|
182
|
+
|
183
183
|
it "should return a hash with the spec filename => spec name for each failure or error" do
|
184
184
|
@rspec_autotest.stub!(:test_files_for).and_return "./spec/autotest/rspec_spec.rb"
|
185
185
|
foo = [
|
186
186
|
[
|
187
|
-
"false should be false",
|
187
|
+
"false should be false",
|
188
188
|
"expected: true,\n got: false (using ==)\n./spec/autotest/rspec_spec.rb:203:"
|
189
189
|
]
|
190
190
|
]
|
191
191
|
@rspec_autotest.consolidate_failures(foo).should == {@spec_file => ["false should be false"]}
|
192
192
|
end
|
193
|
-
|
193
|
+
|
194
194
|
end
|
195
195
|
end
|
@@ -4,29 +4,29 @@ module Spec
|
|
4
4
|
def initialize(specs)
|
5
5
|
@specs = specs
|
6
6
|
end
|
7
|
-
|
7
|
+
|
8
8
|
def to(file)
|
9
9
|
@file = file
|
10
10
|
self
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
13
|
def matches?(autotest)
|
14
14
|
@autotest = prepare autotest
|
15
15
|
@actual = autotest.test_files_for(@file)
|
16
16
|
@actual == @specs
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
def failure_message
|
20
20
|
"expected #{@autotest.class} to map #{@specs.inspect} to #{@file.inspect}\ngot #{@actual.inspect}"
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
private
|
24
24
|
def prepare autotest
|
25
25
|
stub_found_files autotest
|
26
26
|
stub_find_order autotest
|
27
27
|
autotest
|
28
28
|
end
|
29
|
-
|
29
|
+
|
30
30
|
def stub_found_files autotest
|
31
31
|
found_files = @specs.inject({}){|h,f| h[f] = Time.at(0)}
|
32
32
|
autotest.stub!(:find_files).and_return(found_files)
|
@@ -38,10 +38,10 @@ module Spec
|
|
38
38
|
end
|
39
39
|
|
40
40
|
end
|
41
|
-
|
41
|
+
|
42
42
|
def map_specs(specs)
|
43
43
|
AutotestMappingMatcher.new(specs)
|
44
44
|
end
|
45
|
-
|
45
|
+
|
46
46
|
end
|
47
47
|
end
|
@@ -2,13 +2,13 @@ require File.dirname(__FILE__) + '/../../spec_helper.rb'
|
|
2
2
|
|
3
3
|
module Spec
|
4
4
|
module Example
|
5
|
-
|
5
|
+
|
6
6
|
describe Configuration do
|
7
7
|
before(:each) do
|
8
8
|
@config = Configuration.new
|
9
9
|
@example_group = mock("example_group")
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
12
|
describe "#mock_with" do
|
13
13
|
|
14
14
|
it "should default mock framework to rspec" do
|
@@ -86,11 +86,11 @@ module Spec
|
|
86
86
|
end
|
87
87
|
|
88
88
|
end
|
89
|
-
|
89
|
+
|
90
90
|
end
|
91
91
|
|
92
92
|
describe Configuration do
|
93
|
-
|
93
|
+
|
94
94
|
before(:each) do
|
95
95
|
@config = Configuration.new
|
96
96
|
@special_example_group = Class.new(ExampleGroup)
|
@@ -136,7 +136,7 @@ module Spec
|
|
136
136
|
end
|
137
137
|
@example_group.it "calls prepend_before" do
|
138
138
|
end
|
139
|
-
|
139
|
+
|
140
140
|
@example_group.run
|
141
141
|
order.should == [
|
142
142
|
:prepend__before_all,
|
@@ -29,7 +29,7 @@ module Spec
|
|
29
29
|
ExampleGroupFactory.get(@example_group).should == @example_group
|
30
30
|
end
|
31
31
|
|
32
|
-
end
|
32
|
+
end
|
33
33
|
|
34
34
|
describe ExampleGroupFactory, "#create_example_group" do
|
35
35
|
it "should create a uniquely named class" do
|
@@ -66,7 +66,7 @@ module Spec
|
|
66
66
|
) {}
|
67
67
|
example_group.superclass.should == klass
|
68
68
|
end
|
69
|
-
|
69
|
+
|
70
70
|
it "should create a type indicated by :spec_path" do
|
71
71
|
klass = Class.new(ExampleGroup) do
|
72
72
|
def initialize(*args, &block); end
|
@@ -77,7 +77,7 @@ module Spec
|
|
77
77
|
) {}
|
78
78
|
example_group.superclass.should == klass
|
79
79
|
end
|
80
|
-
|
80
|
+
|
81
81
|
it "should create a type indicated by :spec_path (with spec_path generated by caller on windows)" do
|
82
82
|
klass = Class.new(ExampleGroup) do
|
83
83
|
def initialize(*args, &block); end
|
@@ -88,7 +88,7 @@ module Spec
|
|
88
88
|
) {}
|
89
89
|
example_group.superclass.should == klass
|
90
90
|
end
|
91
|
-
|
91
|
+
|
92
92
|
it "should create and register a Spec::Example::Example if :shared => true" do
|
93
93
|
shared_example_group = Spec::Example::ExampleGroupFactory.create_example_group(
|
94
94
|
"name", :spec_path => '/blah/spec/models/blah.rb', :type => :controller, :shared => true
|
@@ -120,7 +120,7 @@ module Spec
|
|
120
120
|
end
|
121
121
|
rspec_options.example_groups.should_not include(example_group)
|
122
122
|
end
|
123
|
-
|
123
|
+
|
124
124
|
after(:each) do
|
125
125
|
Spec::Example::ExampleGroupFactory.reset
|
126
126
|
end
|
@@ -320,12 +320,12 @@ module Spec
|
|
320
320
|
end
|
321
321
|
child_example_group.description.should == "ExampleGroup.foobar Does something"
|
322
322
|
end
|
323
|
-
|
323
|
+
|
324
324
|
it "should return the class name if nil" do
|
325
325
|
example_group.set_description(nil)
|
326
326
|
example_group.description.should =~ /Class:/
|
327
327
|
end
|
328
|
-
|
328
|
+
|
329
329
|
it "should return the class name if nil" do
|
330
330
|
example_group.set_description("")
|
331
331
|
example_group.description.should =~ /Class:/
|
@@ -461,7 +461,7 @@ module Spec
|
|
461
461
|
it "should add ExampleGroup to set of ExampleGroups to be run" do
|
462
462
|
options.example_groups.delete(example_group)
|
463
463
|
options.example_groups.should_not include(example_group)
|
464
|
-
|
464
|
+
|
465
465
|
example_group.register {}
|
466
466
|
options.example_groups.should include(example_group)
|
467
467
|
end
|
@@ -97,7 +97,7 @@ module Spec
|
|
97
97
|
reporter.should_not_receive(:add_example_group)
|
98
98
|
example_group.run
|
99
99
|
end
|
100
|
-
|
100
|
+
|
101
101
|
describe "when before_each fails" do
|
102
102
|
before(:each) do
|
103
103
|
$example_ran = $after_each_ran = false
|
@@ -116,7 +116,7 @@ module Spec
|
|
116
116
|
example_group.run
|
117
117
|
$example_ran.should be_false
|
118
118
|
end
|
119
|
-
|
119
|
+
|
120
120
|
it "should run after_each" do
|
121
121
|
example_group.run
|
122
122
|
$after_each_ran.should be_true
|