sublimetheme 1.0.0
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.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +230 -0
- data/Rakefile +8 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/sublimetheme.rb +6832 -0
- data/lib/sublimetheme/version.rb +3 -0
- data/path/bin/htmldiff +25 -0
- data/path/bin/htmldiff.bat +6 -0
- data/path/bin/ldiff +25 -0
- data/path/bin/ldiff.bat +6 -0
- data/path/bin/rspec +23 -0
- data/path/bin/rspec.bat +6 -0
- data/path/cache/diff-lcs-1.2.5.gem +0 -0
- data/path/cache/rspec-3.3.0.gem +0 -0
- data/path/cache/rspec-core-3.3.2.gem +0 -0
- data/path/cache/rspec-expectations-3.3.1.gem +0 -0
- data/path/cache/rspec-mocks-3.3.2.gem +0 -0
- data/path/cache/rspec-support-3.3.0.gem +0 -0
- data/path/gems/diff-lcs-1.2.5/.autotest +3 -0
- data/path/gems/diff-lcs-1.2.5/.gemtest +0 -0
- data/path/gems/diff-lcs-1.2.5/.hoerc +2 -0
- data/path/gems/diff-lcs-1.2.5/.rspec +2 -0
- data/path/gems/diff-lcs-1.2.5/.travis.yml +22 -0
- data/path/gems/diff-lcs-1.2.5/Contributing.rdoc +64 -0
- data/path/gems/diff-lcs-1.2.5/Gemfile +20 -0
- data/path/gems/diff-lcs-1.2.5/History.rdoc +152 -0
- data/path/gems/diff-lcs-1.2.5/License.rdoc +39 -0
- data/path/gems/diff-lcs-1.2.5/Manifest.txt +38 -0
- data/path/gems/diff-lcs-1.2.5/README.rdoc +85 -0
- data/path/gems/diff-lcs-1.2.5/Rakefile +41 -0
- data/path/gems/diff-lcs-1.2.5/autotest/discover.rb +1 -0
- data/path/gems/diff-lcs-1.2.5/bin/htmldiff +32 -0
- data/path/gems/diff-lcs-1.2.5/bin/ldiff +6 -0
- data/path/gems/diff-lcs-1.2.5/docs/COPYING.txt +339 -0
- data/path/gems/diff-lcs-1.2.5/docs/artistic.txt +127 -0
- data/path/gems/diff-lcs-1.2.5/lib/diff-lcs.rb +3 -0
- data/path/gems/diff-lcs-1.2.5/lib/diff/lcs.rb +805 -0
- data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/array.rb +7 -0
- data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/block.rb +37 -0
- data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/callbacks.rb +322 -0
- data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/change.rb +177 -0
- data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/htmldiff.rb +149 -0
- data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/hunk.rb +276 -0
- data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/internals.rb +301 -0
- data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/ldiff.rb +195 -0
- data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/string.rb +5 -0
- data/path/gems/diff-lcs-1.2.5/spec/change_spec.rb +65 -0
- data/path/gems/diff-lcs-1.2.5/spec/diff_spec.rb +47 -0
- data/path/gems/diff-lcs-1.2.5/spec/hunk_spec.rb +72 -0
- data/path/gems/diff-lcs-1.2.5/spec/issues_spec.rb +24 -0
- data/path/gems/diff-lcs-1.2.5/spec/lcs_spec.rb +54 -0
- data/path/gems/diff-lcs-1.2.5/spec/patch_spec.rb +414 -0
- data/path/gems/diff-lcs-1.2.5/spec/sdiff_spec.rb +214 -0
- data/path/gems/diff-lcs-1.2.5/spec/spec_helper.rb +290 -0
- data/path/gems/diff-lcs-1.2.5/spec/traverse_balanced_spec.rb +310 -0
- data/path/gems/diff-lcs-1.2.5/spec/traverse_sequences_spec.rb +139 -0
- data/path/gems/rspec-3.3.0/License.txt +24 -0
- data/path/gems/rspec-3.3.0/README.md +34 -0
- data/path/gems/rspec-3.3.0/lib/rspec.rb +3 -0
- data/path/gems/rspec-3.3.0/lib/rspec/version.rb +5 -0
- data/path/gems/rspec-core-3.3.2/.document +5 -0
- data/path/gems/rspec-core-3.3.2/.yardopts +8 -0
- data/path/gems/rspec-core-3.3.2/Changelog.md +1856 -0
- data/path/gems/rspec-core-3.3.2/License.txt +25 -0
- data/path/gems/rspec-core-3.3.2/README.md +369 -0
- data/path/gems/rspec-core-3.3.2/exe/rspec +4 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/autorun.rb +3 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core.rb +181 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/backtrace_formatter.rb +64 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/bisect/coordinator.rb +66 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/bisect/example_minimizer.rb +130 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/bisect/runner.rb +139 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/bisect/server.rb +61 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/bisect/subset_enumerator.rb +39 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb +1807 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/configuration_options.rb +191 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/drb.rb +111 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/dsl.rb +96 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/example.rb +573 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/example_group.rb +796 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/example_status_persister.rb +235 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/filter_manager.rb +231 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/flat_map.rb +20 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters.rb +254 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/base_formatter.rb +70 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/base_text_formatter.rb +77 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/bisect_formatter.rb +68 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/bisect_progress_formatter.rb +115 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/console_codes.rb +65 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/deprecation_formatter.rb +223 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/documentation_formatter.rb +70 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/exception_presenter.rb +393 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/fallback_message_formatter.rb +28 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/helpers.rb +109 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/html_formatter.rb +151 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/html_printer.rb +415 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/json_formatter.rb +96 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/profile_formatter.rb +68 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/progress_formatter.rb +28 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/protocol.rb +172 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/snippet_extractor.rb +116 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/hooks.rb +638 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/memoized_helpers.rb +532 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/metadata.rb +490 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/metadata_filter.rb +235 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/minitest_assertions_adapter.rb +31 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/mocking_adapters/flexmock.rb +31 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/mocking_adapters/mocha.rb +57 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/mocking_adapters/null.rb +14 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/mocking_adapters/rr.rb +31 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/mocking_adapters/rspec.rb +32 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/mutex.rb +63 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/notifications.rb +498 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/option_parser.rb +301 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/ordering.rb +158 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/pending.rb +165 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/profiler.rb +32 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/project_initializer.rb +48 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/project_initializer/.rspec +2 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/project_initializer/spec/spec_helper.rb +96 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/rake_task.rb +158 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/reentrant_mutex.rb +52 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/reporter.rb +220 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/ruby_project.rb +53 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb +179 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/sandbox.rb +37 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/set.rb +49 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/shared_context.rb +55 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/shared_example_group.rb +210 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/shell_escape.rb +49 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/test_unit_assertions_adapter.rb +30 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/version.rb +9 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/warnings.rb +40 -0
- data/path/gems/rspec-core-3.3.2/lib/rspec/core/world.rb +178 -0
- data/path/gems/rspec-expectations-3.3.1/.document +5 -0
- data/path/gems/rspec-expectations-3.3.1/.yardopts +6 -0
- data/path/gems/rspec-expectations-3.3.1/Changelog.md +953 -0
- data/path/gems/rspec-expectations-3.3.1/License.txt +24 -0
- data/path/gems/rspec-expectations-3.3.1/README.md +289 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations.rb +81 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/configuration.rb +164 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/expectation_target.rb +113 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/fail_with.rb +31 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/failure_aggregator.rb +194 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/handler.rb +170 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/minitest_integration.rb +31 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/syntax.rb +132 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/version.rb +8 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers.rb +1009 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/aliased_matcher.rb +116 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in.rb +52 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/all.rb +85 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/base_matcher.rb +181 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/be.rb +285 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/be_between.rb +77 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/be_instance_of.rb +22 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/be_kind_of.rb +16 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/be_within.rb +72 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/change.rb +337 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/compound.rb +293 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/contain_exactly.rb +253 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/cover.rb +24 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/eq.rb +40 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/eql.rb +34 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/equal.rb +81 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/exist.rb +86 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/has.rb +103 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/include.rb +130 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/match.rb +37 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/operators.rb +128 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/output.rb +200 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/raise_error.rb +216 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/respond_to.rb +90 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/satisfy.rb +37 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/throw_symbol.rb +132 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/yield.rb +418 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/composable.rb +184 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/dsl.rb +453 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/english_phrasing.rb +42 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +73 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/fail_matchers.rb +42 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/generated_descriptions.rb +42 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/matcher_delegator.rb +35 -0
- data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/matcher_protocol.rb +99 -0
- data/path/gems/rspec-mocks-3.3.2/.document +5 -0
- data/path/gems/rspec-mocks-3.3.2/.yardopts +6 -0
- data/path/gems/rspec-mocks-3.3.2/Changelog.md +965 -0
- data/path/gems/rspec-mocks-3.3.2/License.txt +24 -0
- data/path/gems/rspec-mocks-3.3.2/README.md +430 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks.rb +126 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance.rb +11 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/chain.rb +110 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/error_generator.rb +31 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/expect_chain_chain.rb +35 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/expectation_chain.rb +48 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/message_chains.rb +83 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/proxy.rb +116 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/recorder.rb +264 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/stub_chain.rb +46 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/stub_chain_chain.rb +27 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/argument_list_matcher.rb +100 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/argument_matchers.rb +320 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/configuration.rb +188 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/error_generator.rb +362 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/example_methods.rb +421 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/instance_method_stasher.rb +135 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/marshal_extension.rb +41 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/matchers/have_received.rb +116 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/matchers/receive.rb +130 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/matchers/receive_message_chain.rb +80 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/matchers/receive_messages.rb +75 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/message_chain.rb +87 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/message_expectation.rb +717 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/method_double.rb +287 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/method_reference.rb +192 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/mutate_const.rb +335 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/mutex.rb +73 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/object_reference.rb +149 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/order_group.rb +81 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/proxy.rb +439 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/reentrant_mutex.rb +53 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/space.rb +238 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/standalone.rb +3 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/syntax.rb +325 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/targets.rb +97 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/test_double.rb +170 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/verifying_double.rb +129 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/verifying_message_expecation.rb +54 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/verifying_proxy.rb +213 -0
- data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/version.rb +9 -0
- data/path/gems/rspec-support-3.3.0/Changelog.md +125 -0
- data/path/gems/rspec-support-3.3.0/LICENSE.txt +22 -0
- data/path/gems/rspec-support-3.3.0/README.md +26 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support.rb +111 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/caller_filter.rb +83 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/differ.rb +215 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/directory_maker.rb +63 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/encoded_string.rb +155 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/fuzzy_matcher.rb +48 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/hunk_generator.rb +47 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/matcher_definition.rb +42 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/method_signature_verifier.rb +273 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/object_formatter.rb +93 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/recursive_const_methods.rb +76 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/ruby_features.rb +118 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec.rb +81 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/deprecation_helpers.rb +64 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/formatting_support.rb +9 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/in_sub_process.rb +52 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/library_wide_checks.rb +145 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/shell_out.rb +71 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/stderr_splitter.rb +63 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/string_matcher.rb +46 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/with_isolated_directory.rb +9 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/version.rb +7 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/version_checker.rb +53 -0
- data/path/gems/rspec-support-3.3.0/lib/rspec/support/warnings.rb +39 -0
- data/path/specifications/diff-lcs-1.2.5.gemspec +68 -0
- data/path/specifications/rspec-3.3.0.gemspec +42 -0
- data/path/specifications/rspec-core-3.3.2.gemspec +68 -0
- data/path/specifications/rspec-expectations-3.3.1.gemspec +50 -0
- data/path/specifications/rspec-mocks-3.3.2.gemspec +53 -0
- data/path/specifications/rspec-support-3.3.0.gemspec +38 -0
- data/sublimetheme.gemspec +32 -0
- metadata +363 -0
@@ -0,0 +1,195 @@
|
|
1
|
+
# -*- ruby encoding: utf-8 -*-
|
2
|
+
|
3
|
+
require 'optparse'
|
4
|
+
require 'ostruct'
|
5
|
+
require 'diff/lcs/hunk'
|
6
|
+
|
7
|
+
# == ldiff Usage
|
8
|
+
# ldiff [options] oldfile newfile
|
9
|
+
#
|
10
|
+
# -c:: Displays a context diff with 3 lines of context.
|
11
|
+
# -C [LINES], --context [LINES]:: Displays a context diff with LINES lines of context. Default 3 lines.
|
12
|
+
# -u:: Displays a unified diff with 3 lines of context.
|
13
|
+
# -U [LINES], --unified [LINES]:: Displays a unified diff with LINES lines of context. Default 3 lines.
|
14
|
+
# -e:: Creates an 'ed' script to change oldfile to newfile.
|
15
|
+
# -f:: Creates an 'ed' script to change oldfile to newfile in reverse order.
|
16
|
+
# -a, --text:: Treats the files as text and compares them line-by-line, even if they do not seem to be text.
|
17
|
+
# --binary:: Treats the files as binary.
|
18
|
+
# -q, --brief:: Reports only whether or not the files differ, not the details.
|
19
|
+
# --help:: Shows the command-line help.
|
20
|
+
# --version:: Shows the version of Diff::LCS.
|
21
|
+
#
|
22
|
+
# By default, runs produces an "old-style" diff, with output like UNIX diff.
|
23
|
+
#
|
24
|
+
# == Copyright
|
25
|
+
# Copyright © 2004 Austin Ziegler
|
26
|
+
#
|
27
|
+
# Part of Diff::LCS <http://rubyforge.org/projects/ruwiki/>
|
28
|
+
# Austin Ziegler <diff-lcs@halostatue.ca>
|
29
|
+
#
|
30
|
+
# This program is free software. It may be redistributed and/or modified under
|
31
|
+
# the terms of the GPL version 2 (or later), the Perl Artistic licence, or the
|
32
|
+
# Ruby licence.
|
33
|
+
module Diff::LCS::Ldiff
|
34
|
+
BANNER = <<-COPYRIGHT
|
35
|
+
ldiff #{Diff::LCS::VERSION}
|
36
|
+
Copyright 2004-2013 Austin Ziegler
|
37
|
+
|
38
|
+
Part of Diff::LCS.
|
39
|
+
http://rubyforge.org/projects/ruwiki/
|
40
|
+
|
41
|
+
Austin Ziegler <diff-lcs@halostatue.ca>
|
42
|
+
|
43
|
+
This program is free software. It may be redistributed and/or modified under
|
44
|
+
the terms of the GPL version 2 (or later), the Perl Artistic licence, or the
|
45
|
+
MIT licence.
|
46
|
+
COPYRIGHT
|
47
|
+
end
|
48
|
+
|
49
|
+
class << Diff::LCS::Ldiff
|
50
|
+
attr_reader :format, :lines #:nodoc:
|
51
|
+
attr_reader :file_old, :file_new #:nodoc:
|
52
|
+
attr_reader :data_old, :data_new #:nodoc:
|
53
|
+
|
54
|
+
def run(args, input = $stdin, output = $stdout, error = $stderr) #:nodoc:
|
55
|
+
@binary = nil
|
56
|
+
|
57
|
+
args.options do |o|
|
58
|
+
o.banner = "Usage: #{File.basename($0)} [options] oldfile newfile"
|
59
|
+
o.separator ""
|
60
|
+
o.on('-c', '-C', '--context [LINES]', Numeric, 'Displays a context diff with LINES lines', 'of context. Default 3 lines.') do |ctx|
|
61
|
+
@format = :context
|
62
|
+
@lines = ctx || 3
|
63
|
+
end
|
64
|
+
o.on('-u', '-U', '--unified [LINES]', Numeric, 'Displays a unified diff with LINES lines', 'of context. Default 3 lines.') do |ctx|
|
65
|
+
@format = :unified
|
66
|
+
@lines = ctx || 3
|
67
|
+
end
|
68
|
+
o.on('-e', 'Creates an \'ed\' script to change', 'oldfile to newfile.') do |ctx|
|
69
|
+
@format = :ed
|
70
|
+
end
|
71
|
+
o.on('-f', 'Creates an \'ed\' script to change', 'oldfile to newfile in reverse order.') do |ctx|
|
72
|
+
@format = :reverse_ed
|
73
|
+
end
|
74
|
+
o.on('-a', '--text', 'Treat the files as text and compare them', 'line-by-line, even if they do not seem', 'to be text.') do |txt|
|
75
|
+
@binary = false
|
76
|
+
end
|
77
|
+
o.on('--binary', 'Treats the files as binary.') do |bin|
|
78
|
+
@binary = true
|
79
|
+
end
|
80
|
+
o.on('-q', '--brief', 'Report only whether or not the files', 'differ, not the details.') do |ctx|
|
81
|
+
@format = :report
|
82
|
+
end
|
83
|
+
o.on_tail('--help', 'Shows this text.') do
|
84
|
+
error << o
|
85
|
+
return 0
|
86
|
+
end
|
87
|
+
o.on_tail('--version', 'Shows the version of Diff::LCS.') do
|
88
|
+
error << BANNER
|
89
|
+
return 0
|
90
|
+
end
|
91
|
+
o.on_tail ""
|
92
|
+
o.on_tail 'By default, runs produces an "old-style" diff, with output like UNIX diff.'
|
93
|
+
o.parse!
|
94
|
+
end
|
95
|
+
|
96
|
+
unless args.size == 2
|
97
|
+
error << args.options
|
98
|
+
return 127
|
99
|
+
end
|
100
|
+
|
101
|
+
# Defaults are for old-style diff
|
102
|
+
@format ||= :old
|
103
|
+
@lines ||= 0
|
104
|
+
|
105
|
+
file_old, file_new = *ARGV
|
106
|
+
|
107
|
+
case @format
|
108
|
+
when :context
|
109
|
+
char_old = '*' * 3
|
110
|
+
char_new = '-' * 3
|
111
|
+
when :unified
|
112
|
+
char_old = '-' * 3
|
113
|
+
char_new = '+' * 3
|
114
|
+
end
|
115
|
+
|
116
|
+
# After we've read up to a certain point in each file, the number of
|
117
|
+
# items we've read from each file will differ by FLD (could be 0).
|
118
|
+
file_length_difference = 0
|
119
|
+
|
120
|
+
if @binary.nil? or @binary
|
121
|
+
data_old = IO::read(file_old)
|
122
|
+
data_new = IO::read(file_new)
|
123
|
+
|
124
|
+
# Test binary status
|
125
|
+
if @binary.nil?
|
126
|
+
old_txt = data_old[0...4096].scan(/\0/).empty?
|
127
|
+
new_txt = data_new[0...4096].scan(/\0/).empty?
|
128
|
+
@binary = (not old_txt) or (not new_txt)
|
129
|
+
old_txt = new_txt = nil
|
130
|
+
end
|
131
|
+
|
132
|
+
unless @binary
|
133
|
+
data_old = data_old.split($/).map { |e| e.chomp }
|
134
|
+
data_new = data_new.split($/).map { |e| e.chomp }
|
135
|
+
end
|
136
|
+
else
|
137
|
+
data_old = IO::readlines(file_old).map { |e| e.chomp }
|
138
|
+
data_new = IO::readlines(file_new).map { |e| e.chomp }
|
139
|
+
end
|
140
|
+
|
141
|
+
# diff yields lots of pieces, each of which is basically a Block object
|
142
|
+
if @binary
|
143
|
+
diffs = (data_old == data_new)
|
144
|
+
else
|
145
|
+
diffs = Diff::LCS.diff(data_old, data_new)
|
146
|
+
diffs = nil if diffs.empty?
|
147
|
+
end
|
148
|
+
|
149
|
+
return 0 unless diffs
|
150
|
+
|
151
|
+
if @format == :report
|
152
|
+
output << "Files #{file_old} and #{file_new} differ\n"
|
153
|
+
return 1
|
154
|
+
end
|
155
|
+
|
156
|
+
if (@format == :unified) or (@format == :context)
|
157
|
+
ft = File.stat(file_old).mtime.localtime.strftime('%Y-%m-%d %H:%M:%S.%N %z')
|
158
|
+
puts "#{char_old} #{file_old}\t#{ft}"
|
159
|
+
ft = File.stat(file_new).mtime.localtime.strftime('%Y-%m-%d %H:%M:%S.%N %z')
|
160
|
+
puts "#{char_new} #{file_new}\t#{ft}"
|
161
|
+
end
|
162
|
+
|
163
|
+
# Loop over hunks. If a hunk overlaps with the last hunk, join them.
|
164
|
+
# Otherwise, print out the old one.
|
165
|
+
oldhunk = hunk = nil
|
166
|
+
|
167
|
+
if @format == :ed
|
168
|
+
real_output = output
|
169
|
+
output = []
|
170
|
+
end
|
171
|
+
|
172
|
+
diffs.each do |piece|
|
173
|
+
begin
|
174
|
+
hunk = Diff::LCS::Hunk.new(data_old, data_new, piece, @lines,
|
175
|
+
file_length_difference)
|
176
|
+
file_length_difference = hunk.file_length_difference
|
177
|
+
|
178
|
+
next unless oldhunk
|
179
|
+
next if (@lines > 0) and hunk.merge(oldhunk)
|
180
|
+
|
181
|
+
output << oldhunk.diff(@format) << "\n"
|
182
|
+
ensure
|
183
|
+
oldhunk = hunk
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
output << oldhunk.diff(@format) << "\n"
|
188
|
+
|
189
|
+
if @format == :ed
|
190
|
+
output.reverse_each { |e| real_output << e.diff(:ed_finish) }
|
191
|
+
end
|
192
|
+
|
193
|
+
return 1
|
194
|
+
end
|
195
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# -*- ruby encoding: utf-8 -*-
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe Diff::LCS::Change do
|
6
|
+
describe "an add" do
|
7
|
+
subject { described_class.new('+', 0, 'element') }
|
8
|
+
it { should_not be_deleting }
|
9
|
+
it { should be_adding }
|
10
|
+
it { should_not be_unchanged }
|
11
|
+
it { should_not be_changed }
|
12
|
+
it { should_not be_finished_a }
|
13
|
+
it { should_not be_finished_b }
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "a delete" do
|
17
|
+
subject { described_class.new('-', 0, 'element') }
|
18
|
+
it { should be_deleting }
|
19
|
+
it { should_not be_adding }
|
20
|
+
it { should_not be_unchanged }
|
21
|
+
it { should_not be_changed }
|
22
|
+
it { should_not be_finished_a }
|
23
|
+
it { should_not be_finished_b }
|
24
|
+
end
|
25
|
+
|
26
|
+
describe "an unchanged" do
|
27
|
+
subject { described_class.new('=', 0, 'element') }
|
28
|
+
it { should_not be_deleting }
|
29
|
+
it { should_not be_adding }
|
30
|
+
it { should be_unchanged }
|
31
|
+
it { should_not be_changed }
|
32
|
+
it { should_not be_finished_a }
|
33
|
+
it { should_not be_finished_b }
|
34
|
+
end
|
35
|
+
|
36
|
+
describe "a changed" do
|
37
|
+
subject { described_class.new('!', 0, 'element') }
|
38
|
+
it { should_not be_deleting }
|
39
|
+
it { should_not be_adding }
|
40
|
+
it { should_not be_unchanged }
|
41
|
+
it { should be_changed }
|
42
|
+
it { should_not be_finished_a }
|
43
|
+
it { should_not be_finished_b }
|
44
|
+
end
|
45
|
+
|
46
|
+
describe "a finished_a" do
|
47
|
+
subject { described_class.new('>', 0, 'element') }
|
48
|
+
it { should_not be_deleting }
|
49
|
+
it { should_not be_adding }
|
50
|
+
it { should_not be_unchanged }
|
51
|
+
it { should_not be_changed }
|
52
|
+
it { should be_finished_a }
|
53
|
+
it { should_not be_finished_b }
|
54
|
+
end
|
55
|
+
|
56
|
+
describe "a finished_b" do
|
57
|
+
subject { described_class.new('<', 0, 'element') }
|
58
|
+
it { should_not be_deleting }
|
59
|
+
it { should_not be_adding }
|
60
|
+
it { should_not be_unchanged }
|
61
|
+
it { should_not be_changed }
|
62
|
+
it { should_not be_finished_a }
|
63
|
+
it { should be_finished_b }
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# -*- ruby encoding: utf-8 -*-
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe "Diff::LCS.diff" do
|
6
|
+
include Diff::LCS::SpecHelper::Matchers
|
7
|
+
|
8
|
+
it "should correctly diff seq1 to seq2" do
|
9
|
+
diff_s1_s2 = Diff::LCS.diff(seq1, seq2)
|
10
|
+
change_diff(correct_forward_diff).should == diff_s1_s2
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should correctly diff seq2 to seq1" do
|
14
|
+
diff_s2_s1 = Diff::LCS.diff(seq2, seq1)
|
15
|
+
change_diff(correct_backward_diff).should == diff_s2_s1
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should correctly diff against an empty sequence" do
|
19
|
+
diff = Diff::LCS.diff(word_sequence, [])
|
20
|
+
correct_diff = [
|
21
|
+
[ [ '-', 0, 'abcd' ],
|
22
|
+
[ '-', 1, 'efgh' ],
|
23
|
+
[ '-', 2, 'ijkl' ],
|
24
|
+
[ '-', 3, 'mnopqrstuvwxyz' ] ]
|
25
|
+
]
|
26
|
+
|
27
|
+
change_diff(correct_diff).should == diff
|
28
|
+
|
29
|
+
diff = Diff::LCS.diff([], word_sequence)
|
30
|
+
correct_diff.each { |hunk| hunk.each { |change| change[0] = '+' } }
|
31
|
+
change_diff(correct_diff).should == diff
|
32
|
+
end
|
33
|
+
|
34
|
+
it "should correctly diff 'xx' and 'xaxb'" do
|
35
|
+
left = 'xx'
|
36
|
+
right = 'xaxb'
|
37
|
+
Diff::LCS.patch(left, Diff::LCS.diff(left, right)).should == right
|
38
|
+
end
|
39
|
+
|
40
|
+
it "should return an empty diff with (hello, hello)" do
|
41
|
+
Diff::LCS.diff(hello, hello).should == []
|
42
|
+
end
|
43
|
+
|
44
|
+
it "should return an empty diff with (hello_ary, hello_ary)" do
|
45
|
+
Diff::LCS.diff(hello_ary, hello_ary).should == []
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# -*- ruby encoding: utf-8 -*-
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
def h(v)
|
6
|
+
v.to_s.bytes.to_a.map { |e| "%02x" % e }.join
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "Diff::LCS::Hunk" do
|
10
|
+
if String.method_defined?(:encoding)
|
11
|
+
|
12
|
+
let(:old_data) { ["Tu avec carté {count} itém has".encode('UTF-16LE')] }
|
13
|
+
let(:new_data) { ["Tu avec carte {count} item has".encode('UTF-16LE')] }
|
14
|
+
let(:pieces) { Diff::LCS.diff old_data, new_data }
|
15
|
+
let(:hunk) { Diff::LCS::Hunk.new(old_data, new_data, pieces[0], 3, 0) }
|
16
|
+
|
17
|
+
it 'should be able to produce a unified diff from the two pieces' do
|
18
|
+
expected = (<<-EOD.gsub(/^\s+/,'').encode('UTF-16LE').chomp)
|
19
|
+
@@ -1,2 +1,2 @@
|
20
|
+
-Tu avec carté {count} itém has
|
21
|
+
+Tu avec carte {count} item has
|
22
|
+
EOD
|
23
|
+
expect(hunk.diff(:unified).to_s == expected).to eql true
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'should be able to produce a context diff from the two pieces' do
|
27
|
+
expected = (<<-EOD.gsub(/^\s+/,'').encode('UTF-16LE').chomp)
|
28
|
+
***************
|
29
|
+
*** 1,2 ****
|
30
|
+
!Tu avec carté {count} itém has
|
31
|
+
--- 1,2 ----
|
32
|
+
!Tu avec carte {count} item has
|
33
|
+
EOD
|
34
|
+
|
35
|
+
expect(hunk.diff(:context).to_s == expected).to eql true
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'should be able to produce an old diff from the two pieces' do
|
39
|
+
expected = (<<-EOD.gsub(/^ +/,'').encode('UTF-16LE').chomp)
|
40
|
+
1,2c1,2
|
41
|
+
< Tu avec carté {count} itém has
|
42
|
+
---
|
43
|
+
> Tu avec carte {count} item has
|
44
|
+
|
45
|
+
EOD
|
46
|
+
expect(hunk.diff(:old).to_s == expected).to eql true
|
47
|
+
end
|
48
|
+
|
49
|
+
it 'should be able to produce a reverse ed diff from the two pieces' do
|
50
|
+
expected = (<<-EOD.gsub(/^ +/,'').encode('UTF-16LE').chomp)
|
51
|
+
c1,2
|
52
|
+
Tu avec carte {count} item has
|
53
|
+
.
|
54
|
+
|
55
|
+
EOD
|
56
|
+
expect(hunk.diff(:reverse_ed).to_s == expected).to eql true
|
57
|
+
end
|
58
|
+
|
59
|
+
context 'with empty first data set' do
|
60
|
+
let(:old_data) { [] }
|
61
|
+
|
62
|
+
it 'should be able to produce a unified diff' do
|
63
|
+
expected = (<<-EOD.gsub(/^\s+/,'').encode('UTF-16LE').chomp)
|
64
|
+
@@ -1 +1,2 @@
|
65
|
+
+Tu avec carte {count} item has
|
66
|
+
EOD
|
67
|
+
expect(hunk.diff(:unified).to_s == expected).to eql true
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- ruby encoding: utf-8 -*-
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe "Diff::LCS Issues" do
|
6
|
+
include Diff::LCS::SpecHelper::Matchers
|
7
|
+
|
8
|
+
it "should not fail to provide a simple patchset (issue 1)" do
|
9
|
+
s1, s2 = *%W(aX bXaX)
|
10
|
+
correct_forward_diff = [
|
11
|
+
[ [ '+', 0, 'b' ],
|
12
|
+
[ '+', 1, 'X' ] ],
|
13
|
+
]
|
14
|
+
|
15
|
+
diff_s1_s2 = Diff::LCS.diff(s1, s2)
|
16
|
+
change_diff(correct_forward_diff).should == diff_s1_s2
|
17
|
+
expect do
|
18
|
+
Diff::LCS.patch(s1, diff_s1_s2).should == s2
|
19
|
+
end.to_not raise_error(RuntimeError, /provided patchset/)
|
20
|
+
expect do
|
21
|
+
Diff::LCS.patch(s2, diff_s1_s2).should == s1
|
22
|
+
end.to_not raise_error(RuntimeError, /provided patchset/)
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# -*- ruby encoding: utf-8 -*-
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe "Diff::LCS::Internals.lcs" do
|
6
|
+
include Diff::LCS::SpecHelper::Matchers
|
7
|
+
|
8
|
+
it "should return a meaningful LCS array with (seq1, seq2)" do
|
9
|
+
res = Diff::LCS::Internals.lcs(seq1, seq2)
|
10
|
+
# The result of the LCS (less the +nil+ values) must be as long as the
|
11
|
+
# correct result.
|
12
|
+
res.compact.size.should == correct_lcs.size
|
13
|
+
res.should correctly_map_sequence(seq1).to_other_sequence(seq2)
|
14
|
+
|
15
|
+
# Compact these transformations and they should be the correct LCS.
|
16
|
+
x_seq1 = (0...res.size).map { |ix| res[ix] ? seq1[ix] : nil }.compact
|
17
|
+
x_seq2 = (0...res.size).map { |ix| res[ix] ? seq2[res[ix]] : nil }.compact
|
18
|
+
|
19
|
+
x_seq1.should == correct_lcs
|
20
|
+
x_seq2.should == correct_lcs
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should return all indexes with (hello, hello)" do
|
24
|
+
Diff::LCS::Internals.lcs(hello, hello).should == (0...hello.size).to_a
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should return all indexes with (hello_ary, hello_ary)" do
|
28
|
+
Diff::LCS::Internals.lcs(hello_ary, hello_ary).should == (0...hello_ary.size).to_a
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe "Diff::LCS.LCS" do
|
33
|
+
include Diff::LCS::SpecHelper::Matchers
|
34
|
+
|
35
|
+
it "should return the correct compacted values from Diff::LCS.LCS" do
|
36
|
+
res = Diff::LCS.LCS(seq1, seq2)
|
37
|
+
res.should == correct_lcs
|
38
|
+
res.compact.should == res
|
39
|
+
end
|
40
|
+
|
41
|
+
it "should be transitive" do
|
42
|
+
res = Diff::LCS.LCS(seq2, seq1)
|
43
|
+
res.should == correct_lcs
|
44
|
+
res.compact.should == res
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should return %W(h e l l o) with (hello, hello)" do
|
48
|
+
Diff::LCS.LCS(hello, hello).should == hello.split(//)
|
49
|
+
end
|
50
|
+
|
51
|
+
it "should return hello_ary with (hello_ary, hello_ary)" do
|
52
|
+
Diff::LCS.LCS(hello_ary, hello_ary).should == hello_ary
|
53
|
+
end
|
54
|
+
end
|