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,216 @@
|
|
1
|
+
module RSpec
|
2
|
+
module Matchers
|
3
|
+
module BuiltIn
|
4
|
+
# @api private
|
5
|
+
# Provides the implementation for `raise_error`.
|
6
|
+
# Not intended to be instantiated directly.
|
7
|
+
# rubocop:disable ClassLength
|
8
|
+
class RaiseError
|
9
|
+
include Composable
|
10
|
+
|
11
|
+
def initialize(expected_error_or_message=nil, expected_message=nil, &block)
|
12
|
+
@block = block
|
13
|
+
@actual_error = nil
|
14
|
+
@warn_about_bare_error = warn_about_potential_false_positives? && expected_error_or_message.nil?
|
15
|
+
|
16
|
+
case expected_error_or_message
|
17
|
+
when nil
|
18
|
+
@expected_error, @expected_message = Exception, expected_message
|
19
|
+
when String
|
20
|
+
@expected_error, @expected_message = Exception, expected_error_or_message
|
21
|
+
else
|
22
|
+
@expected_error, @expected_message = expected_error_or_message, expected_message
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
# @api public
|
27
|
+
# Specifies the expected error message.
|
28
|
+
def with_message(expected_message)
|
29
|
+
raise_message_already_set if @expected_message
|
30
|
+
@warn_about_bare_error = false
|
31
|
+
@expected_message = expected_message
|
32
|
+
self
|
33
|
+
end
|
34
|
+
|
35
|
+
# rubocop:disable MethodLength
|
36
|
+
# @private
|
37
|
+
def matches?(given_proc, negative_expectation=false, &block)
|
38
|
+
@given_proc = given_proc
|
39
|
+
@block ||= block
|
40
|
+
@raised_expected_error = false
|
41
|
+
@with_expected_message = false
|
42
|
+
@eval_block = false
|
43
|
+
@eval_block_passed = false
|
44
|
+
|
45
|
+
warn_about_bare_error if warning_about_bare_error && !negative_expectation
|
46
|
+
return false unless Proc === given_proc
|
47
|
+
|
48
|
+
begin
|
49
|
+
given_proc.call
|
50
|
+
rescue Exception => @actual_error
|
51
|
+
if values_match?(@expected_error, @actual_error) ||
|
52
|
+
values_match?(@expected_error, @actual_error.message)
|
53
|
+
@raised_expected_error = true
|
54
|
+
@with_expected_message = verify_message
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
eval_block if !negative_expectation && ready_to_eval_block?
|
59
|
+
|
60
|
+
expectation_matched?
|
61
|
+
end
|
62
|
+
# rubocop:enable MethodLength
|
63
|
+
|
64
|
+
# @private
|
65
|
+
def does_not_match?(given_proc)
|
66
|
+
warn_for_false_positives
|
67
|
+
!matches?(given_proc, :negative_expectation) && Proc === given_proc
|
68
|
+
end
|
69
|
+
|
70
|
+
# @private
|
71
|
+
def supports_block_expectations?
|
72
|
+
true
|
73
|
+
end
|
74
|
+
|
75
|
+
def expects_call_stack_jump?
|
76
|
+
true
|
77
|
+
end
|
78
|
+
|
79
|
+
# @api private
|
80
|
+
# @return [String]
|
81
|
+
def failure_message
|
82
|
+
@eval_block ? @actual_error.message : "expected #{expected_error}#{given_error}"
|
83
|
+
end
|
84
|
+
|
85
|
+
# @api private
|
86
|
+
# @return [String]
|
87
|
+
def failure_message_when_negated
|
88
|
+
"expected no #{expected_error}#{given_error}"
|
89
|
+
end
|
90
|
+
|
91
|
+
# @api private
|
92
|
+
# @return [String]
|
93
|
+
def description
|
94
|
+
"raise #{expected_error}"
|
95
|
+
end
|
96
|
+
|
97
|
+
private
|
98
|
+
|
99
|
+
def expectation_matched?
|
100
|
+
error_and_message_match? && block_matches?
|
101
|
+
end
|
102
|
+
|
103
|
+
def error_and_message_match?
|
104
|
+
@raised_expected_error && @with_expected_message
|
105
|
+
end
|
106
|
+
|
107
|
+
def block_matches?
|
108
|
+
@eval_block ? @eval_block_passed : true
|
109
|
+
end
|
110
|
+
|
111
|
+
def ready_to_eval_block?
|
112
|
+
@raised_expected_error && @with_expected_message && @block
|
113
|
+
end
|
114
|
+
|
115
|
+
def eval_block
|
116
|
+
@eval_block = true
|
117
|
+
begin
|
118
|
+
@block[@actual_error]
|
119
|
+
@eval_block_passed = true
|
120
|
+
rescue Exception => err
|
121
|
+
@actual_error = err
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
def verify_message
|
126
|
+
return true if @expected_message.nil?
|
127
|
+
values_match?(@expected_message, @actual_error.message.to_s)
|
128
|
+
end
|
129
|
+
|
130
|
+
def warn_for_false_positives
|
131
|
+
return unless warn_about_potential_false_positives?
|
132
|
+
expression = if expecting_specific_exception? && @expected_message
|
133
|
+
"`expect { }.not_to raise_error(SpecificErrorClass, message)`"
|
134
|
+
elsif expecting_specific_exception?
|
135
|
+
"`expect { }.not_to raise_error(SpecificErrorClass)`"
|
136
|
+
elsif @expected_message
|
137
|
+
"`expect { }.not_to raise_error(message)`"
|
138
|
+
end
|
139
|
+
|
140
|
+
return unless expression
|
141
|
+
|
142
|
+
warn_about_negative_false_positive expression
|
143
|
+
end
|
144
|
+
|
145
|
+
def warn_about_potential_false_positives?
|
146
|
+
RSpec::Expectations.configuration.warn_about_potential_false_positives?
|
147
|
+
end
|
148
|
+
|
149
|
+
def warning_about_bare_error
|
150
|
+
@warn_about_bare_error && @block.nil?
|
151
|
+
end
|
152
|
+
|
153
|
+
def warn_about_bare_error
|
154
|
+
RSpec.warning("Using the `raise_error` matcher without providing a specific " \
|
155
|
+
"error or message risks false positives, since `raise_error` " \
|
156
|
+
"will match when Ruby raises a `NoMethodError`, `NameError` or " \
|
157
|
+
"`ArgumentError`, potentially allowing the expectation to pass " \
|
158
|
+
"without even executing the method you are intending to call. " \
|
159
|
+
"Instead consider providing a specific error class or message. " \
|
160
|
+
"This message can be supressed by setting: " \
|
161
|
+
"`RSpec::Expectations.configuration.warn_about_potential_false_positives = false`")
|
162
|
+
end
|
163
|
+
|
164
|
+
def warn_about_negative_false_positive(expression)
|
165
|
+
RSpec.warning("Using #{expression} risks false positives, since literally " \
|
166
|
+
"any other error would cause the expectation to pass, " \
|
167
|
+
"including those raised by Ruby (e.g. NoMethodError, NameError " \
|
168
|
+
"and ArgumentError), meaning the code you are intending to test " \
|
169
|
+
"may not even get reached. Instead consider using " \
|
170
|
+
"`expect {}.not_to raise_error`. This message can be supressed by setting: " \
|
171
|
+
"`RSpec::Expectations.configuration.warn_about_potential_false_positives = false`")
|
172
|
+
end
|
173
|
+
|
174
|
+
def expected_error
|
175
|
+
case @expected_message
|
176
|
+
when nil
|
177
|
+
if RSpec::Support.is_a_matcher?(@expected_error)
|
178
|
+
"Exception with #{description_of(@expected_error)}"
|
179
|
+
else
|
180
|
+
description_of(@expected_error)
|
181
|
+
end
|
182
|
+
when Regexp
|
183
|
+
"#{@expected_error} with message matching #{description_of(@expected_message)}"
|
184
|
+
else
|
185
|
+
"#{@expected_error} with #{description_of(@expected_message)}"
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
def format_backtrace(backtrace)
|
190
|
+
formatter = Matchers.configuration.backtrace_formatter
|
191
|
+
formatter.format_backtrace(backtrace)
|
192
|
+
end
|
193
|
+
|
194
|
+
def given_error
|
195
|
+
return " but was not given a block" unless Proc === @given_proc
|
196
|
+
return " but nothing was raised" unless @actual_error
|
197
|
+
|
198
|
+
backtrace = format_backtrace(@actual_error.backtrace)
|
199
|
+
[
|
200
|
+
", got #{description_of(@actual_error)} with backtrace:",
|
201
|
+
*backtrace
|
202
|
+
].join("\n # ")
|
203
|
+
end
|
204
|
+
|
205
|
+
def expecting_specific_exception?
|
206
|
+
@expected_error != Exception
|
207
|
+
end
|
208
|
+
|
209
|
+
def raise_message_already_set
|
210
|
+
raise "`expect { }.to raise_error(message).with_message(message)` is not valid. The matcher only allows the expected message to be specified once"
|
211
|
+
end
|
212
|
+
end
|
213
|
+
# rubocop:enable ClassLength
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
RSpec::Support.require_rspec_support "method_signature_verifier"
|
2
|
+
|
3
|
+
module RSpec
|
4
|
+
module Matchers
|
5
|
+
module BuiltIn
|
6
|
+
# @api private
|
7
|
+
# Provides the implementation for `respond_to`.
|
8
|
+
# Not intended to be instantiated directly.
|
9
|
+
class RespondTo < BaseMatcher
|
10
|
+
def initialize(*names)
|
11
|
+
@names = names
|
12
|
+
@expected_arity = nil
|
13
|
+
end
|
14
|
+
|
15
|
+
# @api public
|
16
|
+
# Specifies the number of expected arguments.
|
17
|
+
#
|
18
|
+
# @example
|
19
|
+
# expect(obj).to respond_to(:message).with(3).arguments
|
20
|
+
def with(n)
|
21
|
+
@expected_arity = n
|
22
|
+
self
|
23
|
+
end
|
24
|
+
|
25
|
+
# @api public
|
26
|
+
# No-op. Intended to be used as syntactic sugar when using `with`.
|
27
|
+
#
|
28
|
+
# @example
|
29
|
+
# expect(obj).to respond_to(:message).with(3).arguments
|
30
|
+
def argument
|
31
|
+
self
|
32
|
+
end
|
33
|
+
alias :arguments :argument
|
34
|
+
|
35
|
+
# @private
|
36
|
+
def matches?(actual)
|
37
|
+
find_failing_method_names(actual, :reject).empty?
|
38
|
+
end
|
39
|
+
|
40
|
+
# @private
|
41
|
+
def does_not_match?(actual)
|
42
|
+
find_failing_method_names(actual, :select).empty?
|
43
|
+
end
|
44
|
+
|
45
|
+
# @api private
|
46
|
+
# @return [String]
|
47
|
+
def failure_message
|
48
|
+
"expected #{actual_formatted} to respond to #{@failing_method_names.map { |name| description_of(name) }.join(', ')}#{with_arity}"
|
49
|
+
end
|
50
|
+
|
51
|
+
# @api private
|
52
|
+
# @return [String]
|
53
|
+
def failure_message_when_negated
|
54
|
+
failure_message.sub(/to respond to/, 'not to respond to')
|
55
|
+
end
|
56
|
+
|
57
|
+
# @api private
|
58
|
+
# @return [String]
|
59
|
+
def description
|
60
|
+
"respond to #{pp_names}#{with_arity}"
|
61
|
+
end
|
62
|
+
|
63
|
+
private
|
64
|
+
|
65
|
+
def find_failing_method_names(actual, filter_method)
|
66
|
+
@actual = actual
|
67
|
+
@failing_method_names = @names.__send__(filter_method) do |name|
|
68
|
+
@actual.respond_to?(name) && matches_arity?(actual, name)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def matches_arity?(actual, name)
|
73
|
+
return true unless @expected_arity
|
74
|
+
|
75
|
+
signature = Support::MethodSignature.new(Support.method_handle_for(actual, name))
|
76
|
+
Support::StrictSignatureVerifier.new(signature, Array.new(@expected_arity)).valid?
|
77
|
+
end
|
78
|
+
|
79
|
+
def with_arity
|
80
|
+
return "" unless @expected_arity
|
81
|
+
" with #{@expected_arity} argument#{@expected_arity == 1 ? '' : 's'}"
|
82
|
+
end
|
83
|
+
|
84
|
+
def pp_names
|
85
|
+
@names.length == 1 ? "##{@names.first}" : description_of(@names)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module RSpec
|
2
|
+
module Matchers
|
3
|
+
module BuiltIn
|
4
|
+
# @api private
|
5
|
+
# Provides the implementation for `satisfy`.
|
6
|
+
# Not intended to be instantiated directly.
|
7
|
+
class Satisfy < BaseMatcher
|
8
|
+
# @private
|
9
|
+
attr_reader :description
|
10
|
+
|
11
|
+
def initialize(description="satisfy block", &block)
|
12
|
+
@description = description
|
13
|
+
@block = block
|
14
|
+
end
|
15
|
+
|
16
|
+
# @private
|
17
|
+
def matches?(actual, &block)
|
18
|
+
@block = block if block
|
19
|
+
@actual = actual
|
20
|
+
@block.call(actual)
|
21
|
+
end
|
22
|
+
|
23
|
+
# @api private
|
24
|
+
# @return [String]
|
25
|
+
def failure_message
|
26
|
+
"expected #{actual_formatted} to #{description}"
|
27
|
+
end
|
28
|
+
|
29
|
+
# @api private
|
30
|
+
# @return [String]
|
31
|
+
def failure_message_when_negated
|
32
|
+
"expected #{actual_formatted} not to #{description}"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
module RSpec
|
2
|
+
module Matchers
|
3
|
+
module BuiltIn
|
4
|
+
# @api private
|
5
|
+
# Base class for the `end_with` and `start_with` matchers.
|
6
|
+
# Not intended to be instantiated directly.
|
7
|
+
class StartOrEndWith < BaseMatcher
|
8
|
+
def initialize(*expected)
|
9
|
+
@actual_does_not_have_ordered_elements = false
|
10
|
+
@expected = expected.length == 1 ? expected.first : expected
|
11
|
+
end
|
12
|
+
|
13
|
+
# @api private
|
14
|
+
# @return [String]
|
15
|
+
def failure_message
|
16
|
+
super.tap do |msg|
|
17
|
+
if @actual_does_not_have_ordered_elements
|
18
|
+
msg << ", but it does not have ordered elements"
|
19
|
+
elsif !actual.respond_to?(:[])
|
20
|
+
msg << ", but it cannot be indexed using #[]"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
# @api private
|
26
|
+
# @return [String]
|
27
|
+
def description
|
28
|
+
return super unless Hash === expected
|
29
|
+
english_name = EnglishPhrasing.split_words(self.class.matcher_name)
|
30
|
+
description_of_expected = surface_descriptions_in(expected).inspect
|
31
|
+
"#{english_name} #{description_of_expected}"
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def match(_expected, actual)
|
37
|
+
return false unless actual.respond_to?(:[])
|
38
|
+
|
39
|
+
begin
|
40
|
+
return true if subsets_comparable? && subset_matches?
|
41
|
+
element_matches?
|
42
|
+
rescue ArgumentError
|
43
|
+
@actual_does_not_have_ordered_elements = true
|
44
|
+
return false
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def subsets_comparable?
|
49
|
+
# Structs support the Enumerable interface but don't really have
|
50
|
+
# the semantics of a subset of a larger set...
|
51
|
+
return false if Struct === expected
|
52
|
+
|
53
|
+
expected.respond_to?(:length)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# For RSpec 3.1, the base class was named `StartAndEndWith`. For SemVer reasons,
|
58
|
+
# we still provide this constant until 4.0.
|
59
|
+
# @deprecated Use StartOrEndWith instead.
|
60
|
+
# @private
|
61
|
+
StartAndEndWith = StartOrEndWith
|
62
|
+
|
63
|
+
# @api private
|
64
|
+
# Provides the implementation for `start_with`.
|
65
|
+
# Not intended to be instantiated directly.
|
66
|
+
class StartWith < StartOrEndWith
|
67
|
+
private
|
68
|
+
|
69
|
+
def subset_matches?
|
70
|
+
values_match?(expected, actual[0, expected.length])
|
71
|
+
end
|
72
|
+
|
73
|
+
def element_matches?
|
74
|
+
values_match?(expected, actual[0])
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# @api private
|
79
|
+
# Provides the implementation for `end_with`.
|
80
|
+
# Not intended to be instantiated directly.
|
81
|
+
class EndWith < StartOrEndWith
|
82
|
+
private
|
83
|
+
|
84
|
+
def subset_matches?
|
85
|
+
values_match?(expected, actual[-expected.length, expected.length])
|
86
|
+
end
|
87
|
+
|
88
|
+
def element_matches?
|
89
|
+
values_match?(expected, actual[-1])
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
@@ -0,0 +1,132 @@
|
|
1
|
+
module RSpec
|
2
|
+
module Matchers
|
3
|
+
module BuiltIn
|
4
|
+
# @api private
|
5
|
+
# Provides the implementation for `throw_symbol`.
|
6
|
+
# Not intended to be instantiated directly.
|
7
|
+
class ThrowSymbol
|
8
|
+
include Composable
|
9
|
+
|
10
|
+
def initialize(expected_symbol=nil, expected_arg=nil)
|
11
|
+
@expected_symbol = expected_symbol
|
12
|
+
@expected_arg = expected_arg
|
13
|
+
@caught_symbol = @caught_arg = nil
|
14
|
+
end
|
15
|
+
|
16
|
+
# rubocop:disable MethodLength
|
17
|
+
# @private
|
18
|
+
def matches?(given_proc)
|
19
|
+
@block = given_proc
|
20
|
+
return false unless Proc === given_proc
|
21
|
+
|
22
|
+
begin
|
23
|
+
if @expected_symbol.nil?
|
24
|
+
given_proc.call
|
25
|
+
else
|
26
|
+
@caught_arg = catch :proc_did_not_throw_anything do
|
27
|
+
catch @expected_symbol do
|
28
|
+
given_proc.call
|
29
|
+
throw :proc_did_not_throw_anything, :nothing_thrown
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
if @caught_arg == :nothing_thrown
|
34
|
+
@caught_arg = nil
|
35
|
+
else
|
36
|
+
@caught_symbol = @expected_symbol
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# Ruby 1.8 uses NameError with `symbol'
|
41
|
+
# Ruby 1.9 uses ArgumentError with :symbol
|
42
|
+
rescue NameError, ArgumentError => e
|
43
|
+
unless (match_data = e.message.match(/uncaught throw (`|\:)([a-zA-Z0-9_]*)(')?/))
|
44
|
+
other_exception = e
|
45
|
+
raise
|
46
|
+
end
|
47
|
+
@caught_symbol = match_data.captures[1].to_sym
|
48
|
+
rescue => other_exception
|
49
|
+
raise
|
50
|
+
ensure
|
51
|
+
# rubocop:disable EnsureReturn
|
52
|
+
unless other_exception
|
53
|
+
if @expected_symbol.nil?
|
54
|
+
return !!@caught_symbol
|
55
|
+
else
|
56
|
+
if @expected_arg.nil?
|
57
|
+
return @caught_symbol == @expected_symbol
|
58
|
+
else
|
59
|
+
return (@caught_symbol == @expected_symbol) && values_match?(@expected_arg, @caught_arg)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
# rubocop:enable EnsureReturn
|
64
|
+
end
|
65
|
+
end
|
66
|
+
# rubocop:enable MethodLength
|
67
|
+
|
68
|
+
def does_not_match?(given_proc)
|
69
|
+
!matches?(given_proc) && Proc === given_proc
|
70
|
+
end
|
71
|
+
|
72
|
+
# @api private
|
73
|
+
# @return [String]
|
74
|
+
def failure_message
|
75
|
+
"expected #{expected} to be thrown, #{actual_result}"
|
76
|
+
end
|
77
|
+
|
78
|
+
# @api private
|
79
|
+
# @return [String]
|
80
|
+
def failure_message_when_negated
|
81
|
+
"expected #{expected('no Symbol')}#{' not' if @expected_symbol} to be thrown, #{actual_result}"
|
82
|
+
end
|
83
|
+
|
84
|
+
# @api private
|
85
|
+
# @return [String]
|
86
|
+
def description
|
87
|
+
"throw #{expected}"
|
88
|
+
end
|
89
|
+
|
90
|
+
# @api private
|
91
|
+
# Indicates this matcher matches against a block.
|
92
|
+
# @return [True]
|
93
|
+
def supports_block_expectations?
|
94
|
+
true
|
95
|
+
end
|
96
|
+
|
97
|
+
def expects_call_stack_jump?
|
98
|
+
true
|
99
|
+
end
|
100
|
+
|
101
|
+
private
|
102
|
+
|
103
|
+
def actual_result
|
104
|
+
return "but was not a block" unless Proc === @block
|
105
|
+
"got #{caught}"
|
106
|
+
end
|
107
|
+
|
108
|
+
def expected(symbol_desc='a Symbol')
|
109
|
+
throw_description(@expected_symbol || symbol_desc, @expected_arg)
|
110
|
+
end
|
111
|
+
|
112
|
+
def caught
|
113
|
+
throw_description(@caught_symbol || 'nothing', @caught_arg)
|
114
|
+
end
|
115
|
+
|
116
|
+
def throw_description(symbol, arg)
|
117
|
+
symbol_description = symbol.is_a?(String) ? symbol : description_of(symbol)
|
118
|
+
|
119
|
+
arg_description = if arg
|
120
|
+
" with #{description_of arg}"
|
121
|
+
elsif @expected_arg && @caught_symbol == @expected_symbol
|
122
|
+
" with no argument"
|
123
|
+
else
|
124
|
+
""
|
125
|
+
end
|
126
|
+
|
127
|
+
symbol_description + arg_description
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|