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
@@ -19,10 +19,10 @@ Event.simulateMouse = function(element, eventName) {
|
|
19
19
|
metaKey: false
|
20
20
|
}, arguments[2] || {});
|
21
21
|
var oEvent = document.createEvent("MouseEvents");
|
22
|
-
oEvent.initMouseEvent(eventName, true, true, document.defaultView,
|
23
|
-
options.buttons, options.pointerX, options.pointerY, options.pointerX, options.pointerY,
|
22
|
+
oEvent.initMouseEvent(eventName, true, true, document.defaultView,
|
23
|
+
options.buttons, options.pointerX, options.pointerY, options.pointerX, options.pointerY,
|
24
24
|
options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, 0, $(element));
|
25
|
-
|
25
|
+
|
26
26
|
if(this.mark) Element.remove(this.mark);
|
27
27
|
this.mark = document.createElement('div');
|
28
28
|
this.mark.appendChild(document.createTextNode(" "));
|
@@ -34,10 +34,10 @@ Event.simulateMouse = function(element, eventName) {
|
|
34
34
|
this.mark.style.height = "5px;";
|
35
35
|
this.mark.style.borderTop = "1px solid red;"
|
36
36
|
this.mark.style.borderLeft = "1px solid red;"
|
37
|
-
|
37
|
+
|
38
38
|
if(this.step)
|
39
39
|
alert('['+new Date().getTime().toString()+'] '+eventName+'/'+Test.Unit.inspect(options));
|
40
|
-
|
40
|
+
|
41
41
|
$(element).dispatchEvent(oEvent);
|
42
42
|
};
|
43
43
|
|
@@ -55,7 +55,7 @@ Event.simulateKey = function(element, eventName) {
|
|
55
55
|
}, arguments[2] || {});
|
56
56
|
|
57
57
|
var oEvent = document.createEvent("KeyEvents");
|
58
|
-
oEvent.initKeyEvent(eventName, true, true, window,
|
58
|
+
oEvent.initKeyEvent(eventName, true, true, window,
|
59
59
|
options.ctrlKey, options.altKey, options.shiftKey, options.metaKey,
|
60
60
|
options.keyCode, options.charCode );
|
61
61
|
$(element).dispatchEvent(oEvent);
|
@@ -123,7 +123,7 @@ Test.Unit.Logger.prototype = {
|
|
123
123
|
_toHTML: function(txt) {
|
124
124
|
return txt.escapeHTML().replace(/\n/g,"<br/>");
|
125
125
|
},
|
126
|
-
addLinksToResults: function(){
|
126
|
+
addLinksToResults: function(){
|
127
127
|
$$("tr.failed .nameCell").each( function(td){ // todo: limit to children of this.log
|
128
128
|
td.title = "Run only this test"
|
129
129
|
Event.observe(td, 'click', function(){ window.location.search = "?tests=" + td.innerHTML;});
|
@@ -162,7 +162,7 @@ Test.Unit.Runner.prototype = {
|
|
162
162
|
if(/^test/.test(testcase)) {
|
163
163
|
this.tests.push(
|
164
164
|
new Test.Unit.Testcase(
|
165
|
-
this.options.context ? ' -> ' + this.options.titles[testcase] : testcase,
|
165
|
+
this.options.context ? ' -> ' + this.options.titles[testcase] : testcase,
|
166
166
|
testcases[testcase], testcases["setup"], testcases["teardown"]
|
167
167
|
));
|
168
168
|
}
|
@@ -203,7 +203,7 @@ Test.Unit.Runner.prototype = {
|
|
203
203
|
},
|
204
204
|
postResults: function() {
|
205
205
|
if (this.options.resultsURL) {
|
206
|
-
new Ajax.Request(this.options.resultsURL,
|
206
|
+
new Ajax.Request(this.options.resultsURL,
|
207
207
|
{ method: 'get', parameters: 'result=' + this.getResult(), asynchronous: false });
|
208
208
|
}
|
209
209
|
},
|
@@ -240,9 +240,9 @@ Test.Unit.Runner.prototype = {
|
|
240
240
|
errors += this.tests[i].errors;
|
241
241
|
}
|
242
242
|
return (
|
243
|
-
(this.options.context ? this.options.context + ': ': '') +
|
244
|
-
this.tests.length + " tests, " +
|
245
|
-
assertions + " assertions, " +
|
243
|
+
(this.options.context ? this.options.context + ': ': '') +
|
244
|
+
this.tests.length + " tests, " +
|
245
|
+
assertions + " assertions, " +
|
246
246
|
failures + " failures, " +
|
247
247
|
errors + " errors");
|
248
248
|
}
|
@@ -258,7 +258,7 @@ Test.Unit.Assertions.prototype = {
|
|
258
258
|
},
|
259
259
|
summary: function() {
|
260
260
|
return (
|
261
|
-
this.assertions + " assertions, " +
|
261
|
+
this.assertions + " assertions, " +
|
262
262
|
this.failures + " failures, " +
|
263
263
|
this.errors + " errors" + "\n" +
|
264
264
|
this.messages.join("\n"));
|
@@ -284,55 +284,55 @@ Test.Unit.Assertions.prototype = {
|
|
284
284
|
},
|
285
285
|
assert: function(expression) {
|
286
286
|
var message = arguments[1] || 'assert: got "' + Test.Unit.inspect(expression) + '"';
|
287
|
-
try { expression ? this.pass() :
|
287
|
+
try { expression ? this.pass() :
|
288
288
|
this.fail(message); }
|
289
289
|
catch(e) { this.error(e); }
|
290
290
|
},
|
291
291
|
assertEqual: function(expected, actual) {
|
292
292
|
var message = arguments[2] || "assertEqual";
|
293
293
|
try { (expected == actual) ? this.pass() :
|
294
|
-
this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
|
294
|
+
this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
|
295
295
|
'", actual "' + Test.Unit.inspect(actual) + '"'); }
|
296
296
|
catch(e) { this.error(e); }
|
297
297
|
},
|
298
298
|
assertInspect: function(expected, actual) {
|
299
299
|
var message = arguments[2] || "assertInspect";
|
300
300
|
try { (expected == actual.inspect()) ? this.pass() :
|
301
|
-
this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
|
301
|
+
this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
|
302
302
|
'", actual "' + Test.Unit.inspect(actual) + '"'); }
|
303
303
|
catch(e) { this.error(e); }
|
304
304
|
},
|
305
305
|
assertEnumEqual: function(expected, actual) {
|
306
306
|
var message = arguments[2] || "assertEnumEqual";
|
307
|
-
try { $A(expected).length == $A(actual).length &&
|
307
|
+
try { $A(expected).length == $A(actual).length &&
|
308
308
|
expected.zip(actual).all(function(pair) { return pair[0] == pair[1] }) ?
|
309
|
-
this.pass() : this.fail(message + ': expected ' + Test.Unit.inspect(expected) +
|
309
|
+
this.pass() : this.fail(message + ': expected ' + Test.Unit.inspect(expected) +
|
310
310
|
', actual ' + Test.Unit.inspect(actual)); }
|
311
311
|
catch(e) { this.error(e); }
|
312
312
|
},
|
313
313
|
assertNotEqual: function(expected, actual) {
|
314
314
|
var message = arguments[2] || "assertNotEqual";
|
315
|
-
try { (expected != actual) ? this.pass() :
|
315
|
+
try { (expected != actual) ? this.pass() :
|
316
316
|
this.fail(message + ': got "' + Test.Unit.inspect(actual) + '"'); }
|
317
317
|
catch(e) { this.error(e); }
|
318
318
|
},
|
319
|
-
assertIdentical: function(expected, actual) {
|
320
|
-
var message = arguments[2] || "assertIdentical";
|
321
|
-
try { (expected === actual) ? this.pass() :
|
322
|
-
this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
|
323
|
-
'", actual "' + Test.Unit.inspect(actual) + '"'); }
|
324
|
-
catch(e) { this.error(e); }
|
319
|
+
assertIdentical: function(expected, actual) {
|
320
|
+
var message = arguments[2] || "assertIdentical";
|
321
|
+
try { (expected === actual) ? this.pass() :
|
322
|
+
this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
|
323
|
+
'", actual "' + Test.Unit.inspect(actual) + '"'); }
|
324
|
+
catch(e) { this.error(e); }
|
325
325
|
},
|
326
|
-
assertNotIdentical: function(expected, actual) {
|
327
|
-
var message = arguments[2] || "assertNotIdentical";
|
328
|
-
try { !(expected === actual) ? this.pass() :
|
329
|
-
this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
|
330
|
-
'", actual "' + Test.Unit.inspect(actual) + '"'); }
|
331
|
-
catch(e) { this.error(e); }
|
326
|
+
assertNotIdentical: function(expected, actual) {
|
327
|
+
var message = arguments[2] || "assertNotIdentical";
|
328
|
+
try { !(expected === actual) ? this.pass() :
|
329
|
+
this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
|
330
|
+
'", actual "' + Test.Unit.inspect(actual) + '"'); }
|
331
|
+
catch(e) { this.error(e); }
|
332
332
|
},
|
333
333
|
assertNull: function(obj) {
|
334
334
|
var message = arguments[1] || 'assertNull'
|
335
|
-
try { (obj==null) ? this.pass() :
|
335
|
+
try { (obj==null) ? this.pass() :
|
336
336
|
this.fail(message + ': got "' + Test.Unit.inspect(obj) + '"'); }
|
337
337
|
catch(e) { this.error(e); }
|
338
338
|
},
|
@@ -353,38 +353,38 @@ Test.Unit.Assertions.prototype = {
|
|
353
353
|
},
|
354
354
|
assertType: function(expected, actual) {
|
355
355
|
var message = arguments[2] || 'assertType';
|
356
|
-
try {
|
357
|
-
(actual.constructor == expected) ? this.pass() :
|
358
|
-
this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
|
356
|
+
try {
|
357
|
+
(actual.constructor == expected) ? this.pass() :
|
358
|
+
this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
|
359
359
|
'", actual "' + (actual.constructor) + '"'); }
|
360
360
|
catch(e) { this.error(e); }
|
361
361
|
},
|
362
362
|
assertNotOfType: function(expected, actual) {
|
363
363
|
var message = arguments[2] || 'assertNotOfType';
|
364
|
-
try {
|
365
|
-
(actual.constructor != expected) ? this.pass() :
|
366
|
-
this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
|
364
|
+
try {
|
365
|
+
(actual.constructor != expected) ? this.pass() :
|
366
|
+
this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
|
367
367
|
'", actual "' + (actual.constructor) + '"'); }
|
368
368
|
catch(e) { this.error(e); }
|
369
369
|
},
|
370
370
|
assertInstanceOf: function(expected, actual) {
|
371
371
|
var message = arguments[2] || 'assertInstanceOf';
|
372
|
-
try {
|
373
|
-
(actual instanceof expected) ? this.pass() :
|
372
|
+
try {
|
373
|
+
(actual instanceof expected) ? this.pass() :
|
374
374
|
this.fail(message + ": object was not an instance of the expected type"); }
|
375
|
-
catch(e) { this.error(e); }
|
375
|
+
catch(e) { this.error(e); }
|
376
376
|
},
|
377
377
|
assertNotInstanceOf: function(expected, actual) {
|
378
378
|
var message = arguments[2] || 'assertNotInstanceOf';
|
379
|
-
try {
|
380
|
-
!(actual instanceof expected) ? this.pass() :
|
379
|
+
try {
|
380
|
+
!(actual instanceof expected) ? this.pass() :
|
381
381
|
this.fail(message + ": object was an instance of the not expected type"); }
|
382
|
-
catch(e) { this.error(e); }
|
382
|
+
catch(e) { this.error(e); }
|
383
383
|
},
|
384
384
|
assertRespondsTo: function(method, obj) {
|
385
385
|
var message = arguments[2] || 'assertRespondsTo';
|
386
386
|
try {
|
387
|
-
(obj[method] && typeof obj[method] == 'function') ? this.pass() :
|
387
|
+
(obj[method] && typeof obj[method] == 'function') ? this.pass() :
|
388
388
|
this.fail(message + ": object doesn't respond to [" + method + "]"); }
|
389
389
|
catch(e) { this.error(e); }
|
390
390
|
},
|
@@ -393,7 +393,7 @@ Test.Unit.Assertions.prototype = {
|
|
393
393
|
try {
|
394
394
|
var m = obj[method];
|
395
395
|
if(!m) m = obj['is'+method.charAt(0).toUpperCase()+method.slice(1)];
|
396
|
-
m() ? this.pass() :
|
396
|
+
m() ? this.pass() :
|
397
397
|
this.fail(message + ": method returned false"); }
|
398
398
|
catch(e) { this.error(e); }
|
399
399
|
},
|
@@ -402,17 +402,17 @@ Test.Unit.Assertions.prototype = {
|
|
402
402
|
try {
|
403
403
|
var m = obj[method];
|
404
404
|
if(!m) m = obj['is'+method.charAt(0).toUpperCase()+method.slice(1)];
|
405
|
-
!m() ? this.pass() :
|
405
|
+
!m() ? this.pass() :
|
406
406
|
this.fail(message + ": method returned true"); }
|
407
407
|
catch(e) { this.error(e); }
|
408
408
|
},
|
409
409
|
assertRaise: function(exceptionName, method) {
|
410
410
|
var message = arguments[2] || 'assertRaise';
|
411
|
-
try {
|
411
|
+
try {
|
412
412
|
method();
|
413
413
|
this.fail(message + ": exception expected but none was raised"); }
|
414
414
|
catch(e) {
|
415
|
-
((exceptionName == null) || (e.name==exceptionName)) ? this.pass() : this.error(e);
|
415
|
+
((exceptionName == null) || (e.name==exceptionName)) ? this.pass() : this.error(e);
|
416
416
|
}
|
417
417
|
},
|
418
418
|
assertElementsMatch: function() {
|
@@ -434,7 +434,7 @@ Test.Unit.Assertions.prototype = {
|
|
434
434
|
var startAt = new Date();
|
435
435
|
(iterations || 1).times(operation);
|
436
436
|
var timeTaken = ((new Date())-startAt);
|
437
|
-
this.info((arguments[2] || 'Operation') + ' finished ' +
|
437
|
+
this.info((arguments[2] || 'Operation') + ' finished ' +
|
438
438
|
iterations + ' iterations in ' + (timeTaken/1000)+'s' );
|
439
439
|
return timeTaken;
|
440
440
|
},
|
@@ -444,7 +444,7 @@ Test.Unit.Assertions.prototype = {
|
|
444
444
|
this.assertNotNull(element);
|
445
445
|
if(element.style && Element.getStyle(element, 'display') == 'none')
|
446
446
|
return false;
|
447
|
-
|
447
|
+
|
448
448
|
return this._isVisible(element.parentNode);
|
449
449
|
},
|
450
450
|
assertNotVisible: function(element) {
|
@@ -457,7 +457,7 @@ Test.Unit.Assertions.prototype = {
|
|
457
457
|
var startAt = new Date();
|
458
458
|
(iterations || 1).times(operation);
|
459
459
|
var timeTaken = ((new Date())-startAt);
|
460
|
-
this.info((arguments[2] || 'Operation') + ' finished ' +
|
460
|
+
this.info((arguments[2] || 'Operation') + ' finished ' +
|
461
461
|
iterations + ' iterations in ' + (timeTaken/1000)+'s' );
|
462
462
|
return timeTaken;
|
463
463
|
}
|
@@ -468,7 +468,7 @@ Object.extend(Object.extend(Test.Unit.Testcase.prototype, Test.Unit.Assertions.p
|
|
468
468
|
initialize: function(name, test, setup, teardown) {
|
469
469
|
Test.Unit.Assertions.prototype.initialize.bind(this)();
|
470
470
|
this.name = name;
|
471
|
-
|
471
|
+
|
472
472
|
if(typeof test == 'string') {
|
473
473
|
test = test.gsub(/(\.should[^\(]+\()/,'#{0}this,');
|
474
474
|
test = test.gsub(/(\.should[^\(]+)\(this,\)/,'#{1}(this)');
|
@@ -478,7 +478,7 @@ Object.extend(Object.extend(Test.Unit.Testcase.prototype, Test.Unit.Assertions.p
|
|
478
478
|
} else {
|
479
479
|
this.test = test || function() {};
|
480
480
|
}
|
481
|
-
|
481
|
+
|
482
482
|
this.setup = setup || function() {};
|
483
483
|
this.teardown = teardown || function() {};
|
484
484
|
this.isWaiting = false;
|
@@ -519,23 +519,23 @@ Test.setupBDDExtensionMethods = function(){
|
|
519
519
|
shouldNotBeAn: 'assertNotOfType',
|
520
520
|
shouldBeNull: 'assertNull',
|
521
521
|
shouldNotBeNull: 'assertNotNull',
|
522
|
-
|
522
|
+
|
523
523
|
shouldBe: 'assertReturnsTrue',
|
524
524
|
shouldNotBe: 'assertReturnsFalse',
|
525
525
|
shouldRespondTo: 'assertRespondsTo'
|
526
526
|
};
|
527
|
-
var makeAssertion = function(assertion, args, object) {
|
527
|
+
var makeAssertion = function(assertion, args, object) {
|
528
528
|
this[assertion].apply(this,(args || []).concat([object]));
|
529
529
|
}
|
530
|
-
|
531
|
-
Test.BDDMethods = {};
|
532
|
-
$H(METHODMAP).each(function(pair) {
|
533
|
-
Test.BDDMethods[pair.key] = function() {
|
534
|
-
var args = $A(arguments);
|
535
|
-
var scope = args.shift();
|
536
|
-
makeAssertion.apply(scope, [pair.value, args, this]); };
|
530
|
+
|
531
|
+
Test.BDDMethods = {};
|
532
|
+
$H(METHODMAP).each(function(pair) {
|
533
|
+
Test.BDDMethods[pair.key] = function() {
|
534
|
+
var args = $A(arguments);
|
535
|
+
var scope = args.shift();
|
536
|
+
makeAssertion.apply(scope, [pair.value, args, this]); };
|
537
537
|
});
|
538
|
-
|
538
|
+
|
539
539
|
[Array.prototype, String.prototype, Number.prototype, Boolean.prototype].each(
|
540
540
|
function(p){ Object.extend(p, Test.BDDMethods) }
|
541
541
|
);
|
@@ -543,7 +543,7 @@ Test.setupBDDExtensionMethods = function(){
|
|
543
543
|
|
544
544
|
Test.context = function(name, spec, log){
|
545
545
|
Test.setupBDDExtensionMethods();
|
546
|
-
|
546
|
+
|
547
547
|
var compiledSpec = {};
|
548
548
|
var titles = {};
|
549
549
|
for(specName in spec) {
|
@@ -557,7 +557,7 @@ Test.context = function(name, spec, log){
|
|
557
557
|
var body = spec[specName].toString().split('\n').slice(1);
|
558
558
|
if(/^\{/.test(body[0])) body = body.slice(1);
|
559
559
|
body.pop();
|
560
|
-
body = body.map(function(statement){
|
560
|
+
body = body.map(function(statement){
|
561
561
|
return statement.strip()
|
562
562
|
});
|
563
563
|
compiledSpec[testName] = body.join('\n');
|
@@ -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">
|
@@ -12,15 +12,15 @@
|
|
12
12
|
<script src="javascripts/scriptaculous.js" type="text/javascript"></script>
|
13
13
|
<script src="javascripts/rspec.js" type="text/javascript"></script>
|
14
14
|
<script src="javascripts/unittest.js" type="text/javascript"></script>
|
15
|
-
|
15
|
+
|
16
16
|
<link href="stylesheets/rspec.css" rel="stylesheet" type="text/css" />
|
17
17
|
<link href="stylesheets/test.css" rel="stylesheet" type="text/css" />
|
18
18
|
</head>
|
19
19
|
<body>
|
20
|
-
<!--
|
20
|
+
<!--
|
21
21
|
Classes and ids that are only used by the Story UI, which don't have to be present in
|
22
22
|
the Example report:
|
23
|
-
|
23
|
+
|
24
24
|
#nav
|
25
25
|
#stock_steps
|
26
26
|
dl.story
|
@@ -84,7 +84,7 @@
|
|
84
84
|
'should extract story narrative': function() {
|
85
85
|
var narrative = StoryDom.narrativeText($$('p')[0].innerHTML);
|
86
86
|
narrative.shouldEqual(
|
87
|
-
" As a savings account holder\n" +
|
87
|
+
" As a savings account holder\n" +
|
88
88
|
" I want to transfer money from my savings account\n" +
|
89
89
|
" So that I can get cash easily from an ATM\n"
|
90
90
|
);
|
@@ -98,7 +98,7 @@
|
|
98
98
|
'should extract scenario': function() {
|
99
99
|
var scenario = StoryDom.scenario($$('dl')[1]);
|
100
100
|
scenario.shouldEqual(
|
101
|
-
" Scenario: savings account is in credit\n" +
|
101
|
+
" Scenario: savings account is in credit\n" +
|
102
102
|
" Given my savings account balance is 100 dollars\n" +
|
103
103
|
" Given my cash account balance is 10 dollars\n" +
|
104
104
|
" When I transfer 20 dollars\n" +
|
@@ -110,20 +110,20 @@
|
|
110
110
|
'should extract story from page': function() {
|
111
111
|
var story = StoryDom.story();
|
112
112
|
story.shouldEqual(
|
113
|
-
"Story: transfer to cash account\n" +
|
113
|
+
"Story: transfer to cash account\n" +
|
114
114
|
"\n" +
|
115
115
|
" As a savings account holder\n" +
|
116
116
|
" I want to transfer money from my savings account\n" +
|
117
117
|
" So that I can get cash easily from an ATM\n" +
|
118
118
|
"\n" +
|
119
|
-
" Scenario: savings account is in credit\n" +
|
119
|
+
" Scenario: savings account is in credit\n" +
|
120
120
|
" Given my savings account balance is 100 dollars\n" +
|
121
121
|
" Given my cash account balance is 10 dollars\n" +
|
122
122
|
" When I transfer 20 dollars\n" +
|
123
123
|
" Then my savings account balance should be 80 dollars\n" +
|
124
124
|
" Then my cash account balance should be 30 dollars\n" +
|
125
125
|
"\n" +
|
126
|
-
" Scenario: savings account is overdrawn\n" +
|
126
|
+
" Scenario: savings account is overdrawn\n" +
|
127
127
|
" Given my savings account balance is -20 dollars\n" +
|
128
128
|
" Given my cash account balance is 10 dollars\n" +
|
129
129
|
" When I transfer 20 dollars\n" +
|
@@ -12,20 +12,20 @@ Copyright (c) 2001-2006 Ryan Davis, Eric Hodel, Zen Spider Software
|
|
12
12
|
Copyright (c) 2006 Assaf Arkin
|
13
13
|
====================================================================
|
14
14
|
|
15
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
16
|
-
this software and associated documentation files (the "Software"), to deal in
|
17
|
-
the Software without restriction, including without limitation the rights to
|
15
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
16
|
+
this software and associated documentation files (the "Software"), to deal in
|
17
|
+
the Software without restriction, including without limitation the rights to
|
18
18
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
19
|
-
of the Software, and to permit persons to whom the Software is furnished to do
|
19
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
20
20
|
so, subject to the following conditions:
|
21
21
|
|
22
|
-
The above copyright notice and this permission notice shall be included in all
|
22
|
+
The above copyright notice and this permission notice shall be included in all
|
23
23
|
copies or substantial portions of the Software.
|
24
24
|
|
25
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
26
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
27
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
28
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
29
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
30
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
25
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
26
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
27
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
28
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
29
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
30
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
31
31
|
SOFTWARE.
|
@@ -1,2 +1,2 @@
|
|
1
|
-
--exclude "spec/*,gems/*"
|
1
|
+
--exclude "spec/*,gems/*"
|
2
2
|
--rails
|
@@ -8,7 +8,7 @@ Description:
|
|
8
8
|
module, specify the controller name as 'module/controller'.
|
9
9
|
|
10
10
|
The generator creates stubs for a controller (and spec), a view (and spec)
|
11
|
-
for each view in the argument list, plus a helper.
|
11
|
+
for each view in the argument list, plus a helper.
|
12
12
|
|
13
13
|
Example:
|
14
14
|
./script/generate rspec_controller dog bark fetch
|
@@ -1,11 +1,11 @@
|
|
1
1
|
require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../spec_helper'
|
2
2
|
|
3
3
|
describe <%= class_name %>Helper do
|
4
|
-
|
4
|
+
|
5
5
|
#Delete this example and add some real ones or delete this file
|
6
6
|
it "should include the <%= class_name %>Helper" do
|
7
7
|
included_modules = self.metaclass.send :included_modules
|
8
8
|
included_modules.should include(<%= class_name %>Helper)
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
end
|
@@ -4,7 +4,7 @@ describe "/<%= class_name.underscore %>/<%= action %>" do
|
|
4
4
|
before(:each) do
|
5
5
|
render '<%= class_name.underscore %>/<%= action %>'
|
6
6
|
end
|
7
|
-
|
7
|
+
|
8
8
|
#Delete this example and add some real ones or delete this file
|
9
9
|
it "should tell you where to find the file" do
|
10
10
|
response.should have_tag('p', /Find me in app\/views\/<%= class_name.underscore %>\/<%= action %>/)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class RspecScaffoldGenerator < Rails::Generator::NamedBase
|
2
2
|
default_options :skip_migration => false
|
3
|
-
|
3
|
+
|
4
4
|
attr_reader :controller_name,
|
5
5
|
:controller_class_path,
|
6
6
|
:controller_file_path,
|
@@ -27,7 +27,7 @@ class RspecScaffoldGenerator < Rails::Generator::NamedBase
|
|
27
27
|
else
|
28
28
|
@controller_class_name = "#{@controller_class_nesting}::#{@controller_class_name_without_nesting}"
|
29
29
|
end
|
30
|
-
|
30
|
+
|
31
31
|
if Rails::VERSION::STRING < "2.0.0"
|
32
32
|
@resource_generator = "scaffold_resource"
|
33
33
|
@default_file_extension = "rhtml"
|
@@ -35,7 +35,7 @@ class RspecScaffoldGenerator < Rails::Generator::NamedBase
|
|
35
35
|
@resource_generator = "scaffold"
|
36
36
|
@default_file_extension = "html.erb"
|
37
37
|
end
|
38
|
-
|
38
|
+
|
39
39
|
if ActionController::Base.respond_to?(:resource_action_separator)
|
40
40
|
@resource_edit_path = "/edit"
|
41
41
|
else
|
@@ -45,7 +45,7 @@ class RspecScaffoldGenerator < Rails::Generator::NamedBase
|
|
45
45
|
|
46
46
|
def manifest
|
47
47
|
record do |m|
|
48
|
-
|
48
|
+
|
49
49
|
# Check for class naming collisions.
|
50
50
|
m.class_collisions(controller_class_path, "#{controller_class_name}Controller", "#{controller_class_name}Helper")
|
51
51
|
m.class_collisions(class_path, "#{class_name}")
|
@@ -60,7 +60,7 @@ class RspecScaffoldGenerator < Rails::Generator::NamedBase
|
|
60
60
|
m.directory(File.join('spec/helpers', class_path))
|
61
61
|
m.directory File.join('spec/fixtures', class_path)
|
62
62
|
m.directory File.join('spec/views', controller_class_path, controller_file_name)
|
63
|
-
|
63
|
+
|
64
64
|
# Controller spec, class, and helper.
|
65
65
|
m.template 'rspec_scaffold:routing_spec.rb',
|
66
66
|
File.join('spec/controllers', controller_class_path, "#{controller_file_name}_routing_spec.rb")
|
@@ -83,7 +83,7 @@ class RspecScaffoldGenerator < Rails::Generator::NamedBase
|
|
83
83
|
File.join('app/views', controller_class_path, controller_file_name, "#{action}.#{default_file_extension}")
|
84
84
|
)
|
85
85
|
end
|
86
|
-
|
86
|
+
|
87
87
|
# Model class, unit test, and fixtures.
|
88
88
|
m.template 'model:model.rb', File.join('app/models', class_path, "#{file_name}.rb")
|
89
89
|
m.template 'model:fixtures.yml', File.join('spec/fixtures', class_path, "#{table_name}.yml")
|
@@ -101,11 +101,11 @@ class RspecScaffoldGenerator < Rails::Generator::NamedBase
|
|
101
101
|
|
102
102
|
unless options[:skip_migration]
|
103
103
|
m.migration_template(
|
104
|
-
'model:migration.rb', 'db/migrate',
|
104
|
+
'model:migration.rb', 'db/migrate',
|
105
105
|
:assigns => {
|
106
106
|
:migration_name => "Create#{class_name.pluralize.gsub(/::/, '')}",
|
107
107
|
:attributes => attributes
|
108
|
-
},
|
108
|
+
},
|
109
109
|
:migration_file_name => "create_#{file_path.gsub(/\//, '_').pluralize}"
|
110
110
|
)
|
111
111
|
end
|
@@ -124,7 +124,7 @@ class RspecScaffoldGenerator < Rails::Generator::NamedBase
|
|
124
124
|
def add_options!(opt)
|
125
125
|
opt.separator ''
|
126
126
|
opt.separator 'Options:'
|
127
|
-
opt.on("--skip-migration",
|
127
|
+
opt.on("--skip-migration",
|
128
128
|
"Don't generate a migration file for this model") { |v| options[:skip_migration] = v }
|
129
129
|
end
|
130
130
|
|
@@ -132,7 +132,7 @@ class RspecScaffoldGenerator < Rails::Generator::NamedBase
|
|
132
132
|
%w[ index show new edit ]
|
133
133
|
end
|
134
134
|
|
135
|
-
def model_name
|
135
|
+
def model_name
|
136
136
|
class_name.demodulize
|
137
137
|
end
|
138
138
|
end
|
@@ -152,7 +152,7 @@ module Rails
|
|
152
152
|
when :boolean then "false"
|
153
153
|
else
|
154
154
|
""
|
155
|
-
end
|
155
|
+
end
|
156
156
|
end
|
157
157
|
|
158
158
|
def input_type
|
@@ -160,7 +160,7 @@ module Rails
|
|
160
160
|
when :text then "textarea"
|
161
161
|
else
|
162
162
|
"input"
|
163
|
-
end
|
163
|
+
end
|
164
164
|
end
|
165
165
|
end
|
166
166
|
end
|