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
@@ -7,42 +7,42 @@ module Spec
|
|
7
7
|
step = Step.new("this text") {}
|
8
8
|
step.matches?("this text").should be_true
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
it "should not match a text string that does not start the same" do
|
12
12
|
step = Step.new("this text") {}
|
13
13
|
step.matches?("Xthis text").should be_false
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
16
|
it "should not match a text string that does not end the same" do
|
17
17
|
step = Step.new("this text") {}
|
18
18
|
step.matches?("this textX").should be_false
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
it "should match a text string with a param" do
|
22
22
|
step = Step.new("this $param text") {}
|
23
23
|
step.matches?("this anything text").should be_true
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
26
|
it "should not be greedy" do
|
27
27
|
step = Step.new("enter $value for $key") {}
|
28
28
|
step.parse_args("enter 3 for keys for a piano").should == ['3','keys for a piano']
|
29
29
|
end
|
30
|
-
|
30
|
+
|
31
31
|
it "should match a text string with 3 params" do
|
32
32
|
step = Step.new("1 $one 2 $two 3 $three 4") {}
|
33
33
|
step.matches?("1 a 2 b 3 c 4").should be_true
|
34
34
|
end
|
35
|
-
|
35
|
+
|
36
36
|
it "should match a text string with a param at the beginning" do
|
37
37
|
step = Step.new("$one 2 3") {}
|
38
38
|
step.matches?("a 2 3").should be_true
|
39
39
|
end
|
40
|
-
|
40
|
+
|
41
41
|
it "should match a text string with a param at the end" do
|
42
42
|
step = Step.new("1 2 $three") {}
|
43
43
|
step.matches?("1 2 c").should be_true
|
44
44
|
end
|
45
|
-
|
45
|
+
|
46
46
|
it "should not match a different string" do
|
47
47
|
step = Step.new("this text") {}
|
48
48
|
step.matches?("other text").should be_false
|
@@ -52,65 +52,65 @@ module Spec
|
|
52
52
|
step = Step.new(/this text/) {}
|
53
53
|
step.matches?("this text").should be_true
|
54
54
|
end
|
55
|
-
|
55
|
+
|
56
56
|
it "should match a regexp with a match group" do
|
57
57
|
step = Step.new(/this (.*) text/) {}
|
58
58
|
step.matches?("this anything text").should be_true
|
59
59
|
end
|
60
|
-
|
60
|
+
|
61
61
|
it "should match a regexp with a named variable" do
|
62
62
|
step = Step.new(/this $variable text/) {}
|
63
63
|
step.matches?("this anything text").should be_true
|
64
64
|
end
|
65
|
-
|
65
|
+
|
66
66
|
it "should not match a non matching regexp" do
|
67
67
|
step = Step.new(/this (.*) text/) {}
|
68
68
|
step.matches?("other anything text").should be_false
|
69
69
|
end
|
70
|
-
|
70
|
+
|
71
71
|
it "should not match a non matching regexp with a named variable" do
|
72
72
|
step = Step.new(/this $variable text/) {}
|
73
73
|
step.matches?("other anything text").should be_false
|
74
74
|
end
|
75
|
-
|
75
|
+
|
76
76
|
it "should not get bogged down by parens in strings" do
|
77
77
|
step = Step.new("before () after") {}
|
78
78
|
step.matches?("before () after").should be_true
|
79
79
|
end
|
80
|
-
|
80
|
+
|
81
81
|
it "should match any option of an alteration" do
|
82
82
|
step = Step.new(/(he|she) is cool/) {}
|
83
83
|
step.matches?("he is cool").should be_true
|
84
84
|
step.matches?("she is cool").should be_true
|
85
85
|
end
|
86
|
-
|
86
|
+
|
87
87
|
it "should match alteration as well as a variable" do
|
88
88
|
step = Step.new(/(he|she) is (.*)/) {}
|
89
89
|
step.matches?("he is cool").should be_true
|
90
90
|
step.parse_args("he is cool").should == ['he', 'cool']
|
91
91
|
end
|
92
|
-
|
92
|
+
|
93
93
|
it "should match alteration as well as a named variable" do
|
94
94
|
step = Step.new(/(he|she) is $adjective/) {}
|
95
95
|
step.matches?("he is cool").should be_true
|
96
96
|
step.parse_args("he is cool").should == ['he', 'cool']
|
97
97
|
end
|
98
|
-
|
98
|
+
|
99
99
|
it "should match alteration as well as a anonymous and named variable" do
|
100
100
|
step = Step.new(/(he|she) is (.*?) $adjective/) {}
|
101
101
|
step.matches?("he is very cool").should be_true
|
102
102
|
step.parse_args("he is very cool").should == ['he', 'very', 'cool']
|
103
103
|
end
|
104
|
-
|
104
|
+
|
105
105
|
end
|
106
|
-
|
106
|
+
|
107
107
|
describe Step do
|
108
108
|
it "should make complain with no block" do
|
109
109
|
lambda {
|
110
110
|
step = Step.new("foo")
|
111
111
|
}.should raise_error
|
112
112
|
end
|
113
|
-
|
113
|
+
|
114
114
|
it "should perform itself on an object" do
|
115
115
|
# given
|
116
116
|
$instance = nil
|
@@ -118,14 +118,14 @@ module Spec
|
|
118
118
|
$instance = self
|
119
119
|
end
|
120
120
|
instance = Object.new
|
121
|
-
|
121
|
+
|
122
122
|
# when
|
123
123
|
step.perform(instance, "step")
|
124
|
-
|
124
|
+
|
125
125
|
# then
|
126
126
|
$instance.should == instance
|
127
127
|
end
|
128
|
-
|
128
|
+
|
129
129
|
it "should perform itself with one parameter with match expression" do
|
130
130
|
# given
|
131
131
|
$result = nil
|
@@ -133,15 +133,15 @@ module Spec
|
|
133
133
|
$result = count
|
134
134
|
end
|
135
135
|
instance = Object.new
|
136
|
-
|
136
|
+
|
137
137
|
# when
|
138
138
|
args = step.parse_args("an account with 3 dollars")
|
139
139
|
step.perform(instance, *args)
|
140
|
-
|
140
|
+
|
141
141
|
# then
|
142
142
|
$result.should == "3"
|
143
143
|
end
|
144
|
-
|
144
|
+
|
145
145
|
it "should perform itself with one parameter without a match expression" do
|
146
146
|
# given
|
147
147
|
$result = nil
|
@@ -149,14 +149,14 @@ module Spec
|
|
149
149
|
$result = amount
|
150
150
|
end
|
151
151
|
instance = Object.new
|
152
|
-
|
152
|
+
|
153
153
|
# when
|
154
154
|
step.perform(instance, 20)
|
155
|
-
|
155
|
+
|
156
156
|
# then
|
157
157
|
$result.should == 20
|
158
158
|
end
|
159
|
-
|
159
|
+
|
160
160
|
it "should perform itself with 2 parameters" do
|
161
161
|
# given
|
162
162
|
$account_type = nil
|
@@ -166,11 +166,11 @@ module Spec
|
|
166
166
|
$amount = amount
|
167
167
|
end
|
168
168
|
instance = Object.new
|
169
|
-
|
169
|
+
|
170
170
|
# when
|
171
171
|
args = step.parse_args("a savings account with 3 dollars")
|
172
172
|
step.perform(instance, *args)
|
173
|
-
|
173
|
+
|
174
174
|
# then
|
175
175
|
$account_type.should == "savings"
|
176
176
|
$amount.should == "3"
|
@@ -185,11 +185,11 @@ module Spec
|
|
185
185
|
$adjective = adjective
|
186
186
|
end
|
187
187
|
instance = Object.new
|
188
|
-
|
188
|
+
|
189
189
|
# when
|
190
190
|
args = step.parse_args("he is cool")
|
191
191
|
step.perform(instance, *args)
|
192
|
-
|
192
|
+
|
193
193
|
# then
|
194
194
|
$pronoun.should == "he"
|
195
195
|
$adjective.should == "cool"
|
@@ -10,37 +10,37 @@ module Spec
|
|
10
10
|
$instance = self
|
11
11
|
end
|
12
12
|
object = Object.new
|
13
|
-
|
13
|
+
|
14
14
|
# when
|
15
15
|
story.run_in(object)
|
16
|
-
|
16
|
+
|
17
17
|
# then
|
18
18
|
$instance.should be(object)
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
it 'should not raise an error if no block is supplied' do
|
22
22
|
# when
|
23
23
|
error = exception_from do
|
24
24
|
Story.new 'title', 'narrative'
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
27
|
# then
|
28
28
|
error.should be_nil
|
29
29
|
end
|
30
|
-
|
30
|
+
|
31
31
|
it "should raise when error raised running in another object" do
|
32
32
|
#given
|
33
33
|
story = Story.new 'title', 'narrative' do
|
34
34
|
raise "this is raised in the story"
|
35
35
|
end
|
36
36
|
object = Object.new
|
37
|
-
|
37
|
+
|
38
38
|
# when/then
|
39
39
|
lambda do
|
40
40
|
story.run_in(object)
|
41
41
|
end.should raise_error
|
42
42
|
end
|
43
|
-
|
43
|
+
|
44
44
|
it "should use the steps it is told to using a StepGroup" do
|
45
45
|
story = Story.new("title", "narrative", :steps => steps = StepGroup.new) do end
|
46
46
|
assignee = mock("assignee")
|
@@ -53,27 +53,27 @@ module Spec
|
|
53
53
|
orig_rspec_story_steps = $rspec_story_steps
|
54
54
|
$rspec_story_steps = StepGroupHash.new
|
55
55
|
$rspec_story_steps[:foo] = steps = Object.new
|
56
|
-
|
56
|
+
|
57
57
|
story = Story.new("title", "narrative", :steps_for => :foo) do end
|
58
58
|
assignee = mock("assignee")
|
59
|
-
|
59
|
+
|
60
60
|
assignee.should_receive(:use).with(steps)
|
61
61
|
story.assign_steps_to(assignee)
|
62
62
|
ensure
|
63
63
|
$rspec_story_steps = orig_rspec_story_steps
|
64
64
|
end
|
65
65
|
end
|
66
|
-
|
66
|
+
|
67
67
|
it "should use the steps it is told to using multiple keys" do
|
68
68
|
begin
|
69
69
|
orig_rspec_story_steps = $rspec_story_steps
|
70
70
|
$rspec_story_steps = StepGroupHash.new
|
71
71
|
$rspec_story_steps[:foo] = foo_steps = Object.new
|
72
72
|
$rspec_story_steps[:bar] = bar_steps = Object.new
|
73
|
-
|
73
|
+
|
74
74
|
story = Story.new("title", "narrative", :steps_for => [:foo, :bar]) do end
|
75
75
|
assignee = mock("assignee")
|
76
|
-
|
76
|
+
|
77
77
|
assignee.should_receive(:use).with(foo_steps)
|
78
78
|
assignee.should_receive(:use).with(bar_steps)
|
79
79
|
story.assign_steps_to(assignee)
|
@@ -5,7 +5,7 @@ describe "Translator" do
|
|
5
5
|
before do
|
6
6
|
@t = Spec::Translator.new
|
7
7
|
end
|
8
|
-
|
8
|
+
|
9
9
|
it "should translate files" do
|
10
10
|
from = File.dirname(__FILE__) + '/..'
|
11
11
|
to = "#{Dir.tmpdir}/translated_specs"
|
@@ -27,7 +27,7 @@ describe "Translator" do
|
|
27
27
|
"before(:all) {foo}\n"
|
28
28
|
)
|
29
29
|
end
|
30
|
-
|
30
|
+
|
31
31
|
it "should translate context ' to describe '" do
|
32
32
|
@t.translate_line(
|
33
33
|
"context 'Translator' do\n"
|
@@ -51,7 +51,7 @@ describe "Translator" do
|
|
51
51
|
' describe "Translator"'
|
52
52
|
)
|
53
53
|
end
|
54
|
-
|
54
|
+
|
55
55
|
it "should not translate context=foo" do
|
56
56
|
@t.translate_line(' context=foo').should eql(' context=foo')
|
57
57
|
end
|
@@ -63,7 +63,7 @@ describe "Translator" do
|
|
63
63
|
it "should not translate context = foo" do
|
64
64
|
@t.translate_line(' context = foo').should eql(' context = foo')
|
65
65
|
end
|
66
|
-
|
66
|
+
|
67
67
|
it "should translate should_be_close" do
|
68
68
|
@t.translate_line('5.0.should_be_close(5.0, 0.5)').should eql('5.0.should be_close(5.0, 0.5)')
|
69
69
|
end
|
@@ -87,7 +87,7 @@ describe "Translator" do
|
|
87
87
|
it "should leave should_receive" do
|
88
88
|
@t.translate_line('@mock.should_receive(:not_expected).with("unexpected text")').should eql('@mock.should_receive(:not_expected).with("unexpected text")')
|
89
89
|
end
|
90
|
-
|
90
|
+
|
91
91
|
it "should translate multi word predicates" do
|
92
92
|
@t.translate_line('foo.should_multi_word_predicate').should eql('foo.should be_multi_word_predicate')
|
93
93
|
end
|
@@ -123,7 +123,7 @@ describe "Translator" do
|
|
123
123
|
it "should translate should_be_happy" do
|
124
124
|
@t.translate_line("4.should_be_happy").should eql("4.should be_happy")
|
125
125
|
end
|
126
|
-
|
126
|
+
|
127
127
|
it "should translate custom method taking regexp with parenthesis" do
|
128
128
|
@t.translate_line("@browser.should_contain_text(/Sn.rrunger og annet rusk/)").should eql("@browser.should be_contain_text(/Sn.rrunger og annet rusk/)")
|
129
129
|
end
|
@@ -131,16 +131,16 @@ describe "Translator" do
|
|
131
131
|
it "should translate custom method taking regexp without parenthesis" do
|
132
132
|
@t.translate_line("@browser.should_contain_text /Sn.rrunger og annet rusk/\n").should eql("@browser.should be_contain_text(/Sn.rrunger og annet rusk/)\n")
|
133
133
|
end
|
134
|
-
|
134
|
+
|
135
135
|
it "should translate should_not_be_nil" do
|
136
136
|
@t.translate_line("foo.should_not_be_nil\n").should eql("foo.should_not be_nil\n")
|
137
137
|
end
|
138
|
-
|
138
|
+
|
139
139
|
it "should translate kind of" do
|
140
140
|
@t.translate_line('@object.should_be_kind_of(MessageExpectation)').should(
|
141
141
|
eql('@object.should be_kind_of(MessageExpectation)'))
|
142
142
|
end
|
143
|
-
|
143
|
+
|
144
144
|
it "should translate should_be_true" do
|
145
145
|
@t.translate_line("foo.should_be_true\n").should eql("foo.should be_true\n")
|
146
146
|
end
|
@@ -151,7 +151,7 @@ describe "Translator" do
|
|
151
151
|
@t.translate_line("collection.each { |c| c.should_match a_regexp_in_a_var }\n").should eql("collection.each { |c| c.should match(a_regexp_in_a_var) }\n")
|
152
152
|
@t.translate_line("collection.each{|c| c.should_match a_regexp_in_a_var}\n").should eql("collection.each{|c| c.should match(a_regexp_in_a_var) }\n")
|
153
153
|
end
|
154
|
-
|
154
|
+
|
155
155
|
# From Rubinius specs
|
156
156
|
it "should translate close_to without parens" do
|
157
157
|
@t.translate_line("end.should_be_close 3.14159_26535_89793_23846, TOLERANCE\n").should eql("end.should be_close(3.14159_26535_89793_23846, TOLERANCE)\n")
|
@@ -186,7 +186,7 @@ describe "Translator" do
|
|
186
186
|
"@parslet.should_not eql(lambda { nil }.to_parseable)"
|
187
187
|
)
|
188
188
|
end
|
189
|
-
|
189
|
+
|
190
190
|
# [#9882] 0.9 Beta 1 - translator bugs
|
191
191
|
# http://rubyforge.org/tracker/index.php?func=detail&aid=9882&group_id=797&atid=3149
|
192
192
|
it "should support fully qualified names" do
|
@@ -196,7 +196,7 @@ describe "Translator" do
|
|
196
196
|
"results.should be_kind_of(SimpleASTLanguage::Identifier)"
|
197
197
|
)
|
198
198
|
end
|
199
|
-
|
199
|
+
|
200
200
|
# [#9882] 0.9 Beta 1 - translator bugs
|
201
201
|
# http://rubyforge.org/tracker/index.php?func=detail&aid=9882&group_id=797&atid=3149
|
202
202
|
# it "should leave whitespace between expression and comments" do
|
@@ -40,20 +40,20 @@ module Spec
|
|
40
40
|
def pass
|
41
41
|
Pass.new
|
42
42
|
end
|
43
|
-
|
43
|
+
|
44
44
|
class CorrectlyOrderedMockExpectation
|
45
45
|
def initialize(&event)
|
46
46
|
@event = event
|
47
47
|
end
|
48
|
-
|
48
|
+
|
49
49
|
def expect(&expectations)
|
50
50
|
expectations.call
|
51
51
|
@event.call
|
52
52
|
end
|
53
53
|
end
|
54
|
-
|
54
|
+
|
55
55
|
def during(&block)
|
56
|
-
CorrectlyOrderedMockExpectation.new(&block)
|
56
|
+
CorrectlyOrderedMockExpectation.new(&block)
|
57
57
|
end
|
58
58
|
end
|
59
59
|
end
|
@@ -72,7 +72,7 @@ module Custom
|
|
72
72
|
|
73
73
|
def run
|
74
74
|
end
|
75
|
-
end
|
75
|
+
end
|
76
76
|
end
|
77
77
|
|
78
78
|
def exception_from(&block)
|
@@ -6,7 +6,7 @@ steps_for :running_rspec do
|
|
6
6
|
raise "could not find file at #{@path}"
|
7
7
|
end
|
8
8
|
end
|
9
|
-
|
9
|
+
|
10
10
|
When("I run it with the $interpreter") do |interpreter|
|
11
11
|
stderr_file = Tempfile.new('rspec')
|
12
12
|
stderr_file.close
|
@@ -23,13 +23,13 @@ steps_for :running_rspec do
|
|
23
23
|
@stderr = IO.read(stderr_file.path)
|
24
24
|
@exit_code = $?.to_i
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
27
|
Then("the exit code should be $exit_code") do |exit_code|
|
28
28
|
if @exit_code != exit_code.to_i
|
29
29
|
raise "Did not exit with #{exit_code}, but with #{@exit_code}. Standard error:\n#{@stderr}"
|
30
30
|
end
|
31
31
|
end
|
32
|
-
|
32
|
+
|
33
33
|
Then("the $stream should match $regex") do |stream, string_or_regex|
|
34
34
|
written = case(stream)
|
35
35
|
when 'stdout' then @stdout
|
@@ -38,7 +38,7 @@ steps_for :running_rspec do
|
|
38
38
|
end
|
39
39
|
written.should smart_match(string_or_regex)
|
40
40
|
end
|
41
|
-
|
41
|
+
|
42
42
|
Then("the $stream should not match $regex") do |stream, string_or_regex|
|
43
43
|
written = case(stream)
|
44
44
|
when 'stdout' then @stdout
|
@@ -25,7 +25,7 @@ class ATest < Test::Unit::TestCase
|
|
25
25
|
def test_should_pass_with_assert
|
26
26
|
assert true
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
def test_should_fail_with_assert
|
30
30
|
assert false
|
31
31
|
end
|
@@ -33,7 +33,7 @@ class ATest < Test::Unit::TestCase
|
|
33
33
|
def test_should_pass_with_should
|
34
34
|
1.should == 1
|
35
35
|
end
|
36
|
-
|
36
|
+
|
37
37
|
def test_should_fail_with_should
|
38
38
|
1.should == 2
|
39
39
|
end
|
@@ -26,7 +26,7 @@ var Builder = {
|
|
26
26
|
// due to a Firefox bug
|
27
27
|
node: function(elementName) {
|
28
28
|
elementName = elementName.toUpperCase();
|
29
|
-
|
29
|
+
|
30
30
|
// try innerHTML approach
|
31
31
|
var parentTag = this.NODEMAP[elementName] || 'div';
|
32
32
|
var parentElement = document.createElement(parentTag);
|
@@ -34,14 +34,14 @@ var Builder = {
|
|
34
34
|
parentElement.innerHTML = "<" + elementName + "></" + elementName + ">";
|
35
35
|
} catch(e) {}
|
36
36
|
var element = parentElement.firstChild || null;
|
37
|
-
|
37
|
+
|
38
38
|
// see if browser added wrapping tags
|
39
39
|
if(element && (element.tagName.toUpperCase() != elementName))
|
40
40
|
element = element.getElementsByTagName(elementName)[0];
|
41
|
-
|
41
|
+
|
42
42
|
// fallback to createElement approach
|
43
43
|
if(!element) element = document.createElement(elementName);
|
44
|
-
|
44
|
+
|
45
45
|
// abort if nothing could be created
|
46
46
|
if(!element) return;
|
47
47
|
|
@@ -62,13 +62,13 @@ var Builder = {
|
|
62
62
|
// workaround firefox 1.0.X bug
|
63
63
|
if(!element) {
|
64
64
|
element = document.createElement(elementName);
|
65
|
-
for(attr in arguments[1])
|
65
|
+
for(attr in arguments[1])
|
66
66
|
element[attr == 'class' ? 'className' : attr] = arguments[1][attr];
|
67
67
|
}
|
68
68
|
if(element.tagName.toUpperCase() != elementName)
|
69
69
|
element = parentElement.getElementsByTagName(elementName)[0];
|
70
70
|
}
|
71
|
-
}
|
71
|
+
}
|
72
72
|
|
73
73
|
// text, or array of children
|
74
74
|
if(arguments[2])
|
@@ -117,20 +117,20 @@ var Builder = {
|
|
117
117
|
$(element).update(html.strip());
|
118
118
|
return element.down();
|
119
119
|
},
|
120
|
-
dump: function(scope) {
|
121
|
-
if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope
|
122
|
-
|
120
|
+
dump: function(scope) {
|
121
|
+
if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope
|
122
|
+
|
123
123
|
var tags = ("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY " +
|
124
124
|
"BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET " +
|
125
125
|
"FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX "+
|
126
126
|
"KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P "+
|
127
127
|
"PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD "+
|
128
128
|
"TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/);
|
129
|
-
|
130
|
-
tags.each( function(tag){
|
131
|
-
scope[tag] = function() {
|
132
|
-
return Builder.node.apply(Builder, [tag].concat($A(arguments)));
|
133
|
-
}
|
129
|
+
|
130
|
+
tags.each( function(tag){
|
131
|
+
scope[tag] = function() {
|
132
|
+
return Builder.node.apply(Builder, [tag].concat($A(arguments)));
|
133
|
+
}
|
134
134
|
});
|
135
135
|
}
|
136
136
|
}
|