dirwatch 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dirwatch/templates/mac/latex.yml +1 -1
- data/lib/dirwatch/version.rb +1 -1
- data/vendor/bundle/ruby/2.5.0/cache/ast-2.4.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/parser-2.5.1.2.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/powerpack-0.1.2.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/rake-12.3.1.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/rspec-3.8.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/rspec-core-3.8.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/rspec-expectations-3.8.1.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/rspec-mocks-3.8.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/rspec-support-3.8.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/ruby-progressbar-1.10.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/cache/unicode-display_width-1.4.0.gem +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/CHANGELOG.md +9 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/Gemfile +4 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/LICENSE.MIT +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/README.YARD.md +12 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/README.md +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/Rakefile +19 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/ast.gemspec +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/lib/ast.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/lib/ast/node.rb +258 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/lib/ast/processor.rb +12 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/lib/ast/processor/mixin.rb +288 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/lib/ast/sexp.rb +30 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/test/helper.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/ast-2.4.0/test/test_ast.rb +271 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/CHANGELOG.md +927 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/CONTRIBUTING.md +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/Gemfile +10 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/LICENSE.txt +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/README.md +301 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/Rakefile +165 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/bin/ruby-parse +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/bin/ruby-rewrite +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/doc/AST_FORMAT.md +1735 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/doc/CUSTOMIZATION.md +37 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/doc/INTERNALS.md +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/doc/css/common.css +68 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/gauntlet_parser.rb +123 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser.rb +81 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/all.rb +11 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ast/node.rb +40 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ast/processor.rb +241 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/base.rb +267 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/builders/default.rb +1677 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/clobbering_error.rb +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/color.rb +32 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/context.rb +51 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/current.rb +83 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/deprecation.rb +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/diagnostic.rb +163 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/diagnostic/engine.rb +105 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/lexer.rb +23093 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/lexer.rl +2382 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/lexer/dedenter.rb +79 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/lexer/explanation.rb +55 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/lexer/literal.rb +265 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/lexer/stack_state.rb +49 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/macruby.rb +6122 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/macruby.y +2198 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/messages.rb +84 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/meta.rb +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/rewriter.rb +105 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby18.rb +5654 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby18.y +1934 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby19.rb +6077 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby19.y +2175 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby20.rb +6512 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby20.y +2353 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby21.rb +6572 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby21.y +2357 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby22.rb +6600 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby22.y +2364 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby23.rb +6628 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby23.y +2370 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby24.rb +6695 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby24.y +2408 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby25.rb +6661 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby25.y +2405 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby26.rb +6674 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/ruby26.y +2413 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/rubymotion.rb +6083 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/rubymotion.y +2182 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/runner.rb +248 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/runner/ruby_parse.rb +157 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/runner/ruby_rewrite.rb +101 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/buffer.rb +330 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/comment.rb +121 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/comment/associator.rb +210 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map.rb +186 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/collection.rb +18 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/condition.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/constant.rb +32 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/definition.rb +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/for.rb +19 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/heredoc.rb +19 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/index.rb +33 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/keyword.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/objc_kwarg.rb +19 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/operator.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/rescue_body.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/send.rb +36 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/ternary.rb +18 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map/variable.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/range.rb +310 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/rewriter.rb +513 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/rewriter/action.rb +44 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/tree_rewriter.rb +301 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/source/tree_rewriter/action.rb +133 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/static_environment.rb +46 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/syntax_error.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/tree_rewriter.rb +133 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/lib/parser/version.rb +5 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/parser.gemspec +51 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/bug_163/fixtures/input.rb +5 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/bug_163/fixtures/output.rb +5 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/bug_163/rewriter.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/helper.rb +52 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/parse_helper.rb +315 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/racc_coverage_helper.rb +133 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_base.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_current.rb +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_diagnostic.rb +96 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_diagnostic_engine.rb +62 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_encoding.rb +99 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_lexer.rb +3537 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_lexer_stack_state.rb +78 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_parse_helper.rb +80 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_parser.rb +7038 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_runner_rewrite.rb +47 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_source_buffer.rb +162 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_source_comment.rb +36 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_source_comment_associator.rb +367 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_source_map.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_source_range.rb +172 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_source_rewriter.rb +541 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_source_rewriter_action.rb +46 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_source_tree_rewriter.rb +173 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/test_static_environment.rb +45 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/using_tree_rewriter/fixtures/input.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/using_tree_rewriter/fixtures/output.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/parser-2.5.1.2/test/using_tree_rewriter/using_tree_rewriter.rb +9 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/CHANGELOG.md +46 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/CONTRIBUTING.md +62 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/Gemfile +4 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/README.md +99 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/Rakefile +12 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack.rb +11 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/array.rb +2 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/array/butfirst.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/array/butlast.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/enumerable.rb +9 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/enumerable/average.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/enumerable/drop_last.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/enumerable/drop_last_while.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/enumerable/exactly.rb +43 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/enumerable/frequencies.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/enumerable/several.rb +37 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/enumerable/sum.rb +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/enumerable/take_last.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/enumerable/take_last_while.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/hash.rb +1 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/hash/symbolize_keys.rb +14 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/numeric.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/numeric/neg.rb +19 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/numeric/pos.rb +19 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/numeric/scale.rb +44 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/string.rb +9 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/string/ascii_only.rb +42 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/string/blank.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/string/format.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/string/remove.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/string/remove_prefix.rb +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/string/remove_suffix.rb +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/string/squish.rb +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/string/strip_indent.rb +22 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/string/strip_margin.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/lib/powerpack/version.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/powerpack.gemspec +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/array/butfirst_spec.rb +11 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/array/butlast_spec.rb +11 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/enumerable/average_spec.rb +19 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/enumerable/drop_last_spec.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/enumerable/drop_last_while_spec.rb +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/enumerable/exactly_spec.rb +39 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/enumerable/frequencies_spec.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/enumerable/several_spec.rb +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/enumerable/sum_spec.rb +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/enumerable/take_last_spec.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/enumerable/take_last_while_spec.rb +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/hash/symbolize_keys_spec.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/numeric/neg_spec.rb +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/numeric/pos_spec.rb +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/numeric/scale_spec.rb +139 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/ascii_only_spec.rb +45 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/blank_spec.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/format_spec.rb +12 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/remove_prefix_spec.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/remove_spec.rb +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/remove_suffix_spec.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/squish_spec.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/strip_indent_spec.rb +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/strip_margin_spec.rb +26 -0
- data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/spec_helper.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/CONTRIBUTING.rdoc +36 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/Gemfile +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/History.rdoc +2317 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/README.rdoc +156 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/Rakefile +41 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/bin/console +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/bin/setup +6 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/command_line_usage.rdoc +158 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/example/Rakefile1 +38 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/example/Rakefile2 +35 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/example/a.c +6 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/example/b.c +6 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/example/main.c +11 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/glossary.rdoc +42 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/jamis.rb +592 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/proto_rake.rdoc +127 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/rake.1 +156 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/rakefile.rdoc +622 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/doc/rational.rdoc +151 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake.rb +71 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/application.rb +824 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/backtrace.rb +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/clean.rb +78 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/cloneable.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/cpu_counter.rb +107 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/default_loader.rb +15 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/dsl_definition.rb +195 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/early_time.rb +22 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/ext/core.rb +26 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/ext/string.rb +176 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/file_creation_task.rb +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/file_list.rb +435 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/file_task.rb +54 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/file_utils.rb +137 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/file_utils_ext.rb +145 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/invocation_chain.rb +57 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/invocation_exception_mixin.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/late_time.rb +18 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/linked_list.rb +112 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/loaders/makefile.rb +54 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/multi_task.rb +14 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/name_space.rb +38 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/packagetask.rb +211 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/phony.rb +16 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/private_reader.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/promise.rb +100 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/pseudo_status.rb +30 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/rake_module.rb +67 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/rake_test_loader.rb +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/scope.rb +43 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/task.rb +411 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/task_argument_error.rb +8 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/task_arguments.rb +109 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/task_manager.rb +323 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/tasklib.rb +12 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/testtask.rb +224 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/thread_history_display.rb +49 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/thread_pool.rb +163 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/trace_output.rb +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/version.rb +10 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/win32.rb +51 -0
- data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/rake.gemspec +42 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-3.8.0/LICENSE.md +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-3.8.0/README.md +43 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-3.8.0/lib/rspec.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-3.8.0/lib/rspec/version.rb +5 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/Changelog.md +2221 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/LICENSE.md +26 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/README.md +384 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/exe/rspec +4 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/autorun.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core.rb +185 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/backtrace_formatter.rb +65 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/coordinator.rb +62 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/example_minimizer.rb +173 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/fork_runner.rb +134 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/server.rb +61 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/shell_command.rb +126 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/shell_runner.rb +73 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/bisect/utilities.rb +58 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/configuration.rb +2289 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/configuration_options.rb +233 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/drb.rb +113 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/dsl.rb +98 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example.rb +653 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example_group.rb +885 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/example_status_persister.rb +235 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/filter_manager.rb +231 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/flat_map.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters.rb +269 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/base_bisect_formatter.rb +45 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/base_formatter.rb +70 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/base_text_formatter.rb +75 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/bisect_drb_formatter.rb +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/bisect_progress_formatter.rb +157 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/console_codes.rb +68 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/deprecation_formatter.rb +223 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/documentation_formatter.rb +70 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/exception_presenter.rb +497 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/fallback_message_formatter.rb +28 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/helpers.rb +110 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/html_formatter.rb +153 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/html_printer.rb +414 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/html_snippet_extractor.rb +120 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/json_formatter.rb +102 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/profile_formatter.rb +68 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/progress_formatter.rb +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/protocol.rb +182 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/snippet_extractor.rb +134 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/syntax_highlighter.rb +91 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb +624 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/invocations.rb +87 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/memoized_helpers.rb +535 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/metadata.rb +499 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/metadata_filter.rb +255 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/minitest_assertions_adapter.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/flexmock.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/mocha.rb +57 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/null.rb +14 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/rr.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/mocking_adapters/rspec.rb +32 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/notifications.rb +521 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/option_parser.rb +309 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/ordering.rb +158 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/output_wrapper.rb +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/pending.rb +165 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/profiler.rb +34 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/project_initializer.rb +48 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/project_initializer/spec/spec_helper.rb +100 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/rake_task.rb +168 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb +257 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/ruby_project.rb +53 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/runner.rb +199 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/sandbox.rb +37 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/set.rb +54 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/shared_context.rb +55 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/shared_example_group.rb +269 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/shell_escape.rb +49 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/test_unit_assertions_adapter.rb +30 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/version.rb +9 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/warnings.rb +40 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/world.rb +275 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/Changelog.md +1110 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/LICENSE.md +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/README.md +305 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations.rb +82 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/block_snippet_extractor.rb +253 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/configuration.rb +215 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/expectation_target.rb +127 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/fail_with.rb +39 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/failure_aggregator.rb +194 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/handler.rb +170 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/minitest_integration.rb +58 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/syntax.rb +132 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/expectations/version.rb +8 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers.rb +1034 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/aliased_matcher.rb +116 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in.rb +52 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/all.rb +85 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/base_matcher.rb +193 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be.rb +288 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be_between.rb +77 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be_instance_of.rb +22 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be_kind_of.rb +16 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/be_within.rb +72 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/change.rb +426 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/compound.rb +271 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/contain_exactly.rb +302 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/cover.rb +24 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/eq.rb +40 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/eql.rb +34 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/equal.rb +81 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/exist.rb +90 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/has.rb +103 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/include.rb +149 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/match.rb +106 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/operators.rb +128 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/output.rb +200 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/raise_error.rb +230 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/respond_to.rb +165 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/satisfy.rb +60 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/throw_symbol.rb +132 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/built_in/yield.rb +432 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/composable.rb +171 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/dsl.rb +527 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/english_phrasing.rb +58 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +73 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/fail_matchers.rb +42 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/generated_descriptions.rb +41 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/matcher_delegator.rb +35 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.8.1/lib/rspec/matchers/matcher_protocol.rb +99 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/Changelog.md +1100 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/LICENSE.md +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/README.md +460 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks.rb +130 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance.rb +11 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/chain.rb +110 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/error_generator.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/expect_chain_chain.rb +31 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/expectation_chain.rb +50 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/message_chains.rb +83 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/proxy.rb +116 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/recorder.rb +289 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/stub_chain.rb +51 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/any_instance/stub_chain_chain.rb +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/argument_list_matcher.rb +100 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/argument_matchers.rb +320 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/configuration.rb +212 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/error_generator.rb +369 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/example_methods.rb +434 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/instance_method_stasher.rb +146 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/marshal_extension.rb +41 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/have_received.rb +134 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/receive.rb +132 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/receive_message_chain.rb +82 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/matchers/receive_messages.rb +77 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/message_chain.rb +87 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/message_expectation.rb +741 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/method_double.rb +287 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/method_reference.rb +202 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/minitest_integration.rb +68 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/mutate_const.rb +339 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/object_reference.rb +149 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/order_group.rb +81 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/proxy.rb +485 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/space.rb +238 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/standalone.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/syntax.rb +325 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/targets.rb +124 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/test_double.rb +171 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/verifying_double.rb +129 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/verifying_message_expectation.rb +54 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/verifying_proxy.rb +220 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.8.0/lib/rspec/mocks/version.rb +9 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/Changelog.md +242 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/LICENSE.md +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/README.md +40 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support.rb +149 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/caller_filter.rb +83 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/comparable_version.rb +46 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/differ.rb +215 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/directory_maker.rb +63 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/encoded_string.rb +165 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/fuzzy_matcher.rb +48 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/hunk_generator.rb +47 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/matcher_definition.rb +42 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/method_signature_verifier.rb +426 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/mutex.rb +73 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/object_formatter.rb +275 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/recursive_const_methods.rb +76 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/reentrant_mutex.rb +53 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/ruby_features.rb +176 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/source.rb +75 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/source/location.rb +21 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/source/node.rb +110 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/source/token.rb +87 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec.rb +81 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/deprecation_helpers.rb +64 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/formatting_support.rb +9 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/in_sub_process.rb +69 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/library_wide_checks.rb +150 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/shell_out.rb +84 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/stderr_splitter.rb +63 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/string_matcher.rb +46 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/with_isolated_directory.rb +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/version.rb +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.8.0/lib/rspec/support/warnings.rb +39 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/LICENSE.txt +19 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/README.md +38 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/Rakefile +2 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar.rb +18 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/base.rb +183 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/calculators/length.rb +100 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/calculators/running_average.rb +9 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/components.rb +5 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/components/bar.rb +102 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/components/percentage.rb +29 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/components/rate.rb +43 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/components/time.rb +107 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/components/title.rb +13 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/errors/invalid_progress_error.rb +4 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/format.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/format/formatter.rb +27 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/format/molecule.rb +60 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/format/string.rb +36 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/output.rb +68 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/outputs/non_tty.rb +47 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/outputs/null.rb +33 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/outputs/tty.rb +32 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/progress.rb +118 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/refinements.rb +1 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/refinements/enumerator.rb +23 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/throttle.rb +25 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/time.rb +32 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/timer.rb +72 -0
- data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.10.0/lib/ruby-progressbar/version.rb +3 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/CHANGELOG.md +113 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/MIT-LICENSE.txt +22 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/README.md +124 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/Rakefile +64 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/data/display_width.marshal.gz +0 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/lib/unicode/display_width.rb +51 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/lib/unicode/display_width/constants.rb +8 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/lib/unicode/display_width/index.rb +12 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/lib/unicode/display_width/no_string_ext.rb +7 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/lib/unicode/display_width/string_ext.rb +17 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/spec/display_width_spec.rb +156 -0
- data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.0/unicode-display_width.gemspec +18 -0
- data/vendor/bundle/ruby/2.5.0/specifications/ast-2.4.0.gemspec +59 -0
- data/vendor/bundle/ruby/2.5.0/specifications/parser-2.5.1.2.gemspec +62 -0
- data/vendor/bundle/ruby/2.5.0/specifications/powerpack-0.1.2.gemspec +41 -0
- data/vendor/bundle/ruby/2.5.0/specifications/rake-12.3.1.gemspec +49 -0
- data/vendor/bundle/ruby/2.5.0/specifications/rspec-3.8.0.gemspec +42 -0
- data/vendor/bundle/ruby/2.5.0/specifications/rspec-core-3.8.0.gemspec +62 -0
- data/vendor/bundle/ruby/2.5.0/specifications/rspec-expectations-3.8.1.gemspec +50 -0
- data/vendor/bundle/ruby/2.5.0/specifications/rspec-mocks-3.8.0.gemspec +50 -0
- data/vendor/bundle/ruby/2.5.0/specifications/rspec-support-3.8.0.gemspec +41 -0
- data/vendor/bundle/ruby/2.5.0/specifications/ruby-progressbar-1.10.0.gemspec +46 -0
- data/vendor/bundle/ruby/2.5.0/specifications/unicode-display_width-1.4.0.gemspec +38 -0
- metadata +532 -2
@@ -0,0 +1,171 @@
|
|
1
|
+
RSpec::Support.require_rspec_support "fuzzy_matcher"
|
2
|
+
|
3
|
+
module RSpec
|
4
|
+
module Matchers
|
5
|
+
# Mixin designed to support the composable matcher features
|
6
|
+
# of RSpec 3+. Mix it into your custom matcher classes to
|
7
|
+
# allow them to be used in a composable fashion.
|
8
|
+
#
|
9
|
+
# @api public
|
10
|
+
module Composable
|
11
|
+
# Creates a compound `and` expectation. The matcher will
|
12
|
+
# only pass if both sub-matchers pass.
|
13
|
+
# This can be chained together to form an arbitrarily long
|
14
|
+
# chain of matchers.
|
15
|
+
#
|
16
|
+
# @example
|
17
|
+
# expect(alphabet).to start_with("a").and end_with("z")
|
18
|
+
# expect(alphabet).to start_with("a") & end_with("z")
|
19
|
+
#
|
20
|
+
# @note The negative form (`expect(...).not_to matcher.and other`)
|
21
|
+
# is not supported at this time.
|
22
|
+
def and(matcher)
|
23
|
+
BuiltIn::Compound::And.new self, matcher
|
24
|
+
end
|
25
|
+
alias & and
|
26
|
+
|
27
|
+
# Creates a compound `or` expectation. The matcher will
|
28
|
+
# pass if either sub-matcher passes.
|
29
|
+
# This can be chained together to form an arbitrarily long
|
30
|
+
# chain of matchers.
|
31
|
+
#
|
32
|
+
# @example
|
33
|
+
# expect(stoplight.color).to eq("red").or eq("green").or eq("yellow")
|
34
|
+
# expect(stoplight.color).to eq("red") | eq("green") | eq("yellow")
|
35
|
+
#
|
36
|
+
# @note The negative form (`expect(...).not_to matcher.or other`)
|
37
|
+
# is not supported at this time.
|
38
|
+
def or(matcher)
|
39
|
+
BuiltIn::Compound::Or.new self, matcher
|
40
|
+
end
|
41
|
+
alias | or
|
42
|
+
|
43
|
+
# Delegates to `#matches?`. Allows matchers to be used in composable
|
44
|
+
# fashion and also supports using matchers in case statements.
|
45
|
+
def ===(value)
|
46
|
+
matches?(value)
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
|
51
|
+
# This provides a generic way to fuzzy-match an expected value against
|
52
|
+
# an actual value. It understands nested data structures (e.g. hashes
|
53
|
+
# and arrays) and is able to match against a matcher being used as
|
54
|
+
# the expected value or within the expected value at any level of
|
55
|
+
# nesting.
|
56
|
+
#
|
57
|
+
# Within a custom matcher you are encouraged to use this whenever your
|
58
|
+
# matcher needs to match two values, unless it needs more precise semantics.
|
59
|
+
# For example, the `eq` matcher _does not_ use this as it is meant to
|
60
|
+
# use `==` (and only `==`) for matching.
|
61
|
+
#
|
62
|
+
# @param expected [Object] what is expected
|
63
|
+
# @param actual [Object] the actual value
|
64
|
+
#
|
65
|
+
# @!visibility public
|
66
|
+
def values_match?(expected, actual)
|
67
|
+
expected = with_matchers_cloned(expected)
|
68
|
+
Support::FuzzyMatcher.values_match?(expected, actual)
|
69
|
+
end
|
70
|
+
|
71
|
+
# Returns the description of the given object in a way that is
|
72
|
+
# aware of composed matchers. If the object is a matcher with
|
73
|
+
# a `description` method, returns the description; otherwise
|
74
|
+
# returns `object.inspect`.
|
75
|
+
#
|
76
|
+
# You are encouraged to use this in your custom matcher's
|
77
|
+
# `description`, `failure_message` or
|
78
|
+
# `failure_message_when_negated` implementation if you are
|
79
|
+
# supporting matcher arguments.
|
80
|
+
#
|
81
|
+
# @!visibility public
|
82
|
+
def description_of(object)
|
83
|
+
RSpec::Support::ObjectFormatter.format(object)
|
84
|
+
end
|
85
|
+
|
86
|
+
# Transforms the given data structue (typically a hash or array)
|
87
|
+
# into a new data structure that, when `#inspect` is called on it,
|
88
|
+
# will provide descriptions of any contained matchers rather than
|
89
|
+
# the normal `#inspect` output.
|
90
|
+
#
|
91
|
+
# You are encouraged to use this in your custom matcher's
|
92
|
+
# `description`, `failure_message` or
|
93
|
+
# `failure_message_when_negated` implementation if you are
|
94
|
+
# supporting any arguments which may be a data structure
|
95
|
+
# containing matchers.
|
96
|
+
#
|
97
|
+
# @!visibility public
|
98
|
+
def surface_descriptions_in(item)
|
99
|
+
if Matchers.is_a_describable_matcher?(item)
|
100
|
+
DescribableItem.new(item)
|
101
|
+
elsif Hash === item
|
102
|
+
Hash[surface_descriptions_in(item.to_a)]
|
103
|
+
elsif Struct === item || unreadable_io?(item)
|
104
|
+
RSpec::Support::ObjectFormatter.format(item)
|
105
|
+
elsif should_enumerate?(item)
|
106
|
+
item.map { |subitem| surface_descriptions_in(subitem) }
|
107
|
+
else
|
108
|
+
item
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
# @private
|
113
|
+
# Historically, a single matcher instance was only checked
|
114
|
+
# against a single value. Given that the matcher was only
|
115
|
+
# used once, it's been common to memoize some intermediate
|
116
|
+
# calculation that is derived from the `actual` value in
|
117
|
+
# order to reuse that intermediate result in the failure
|
118
|
+
# message.
|
119
|
+
#
|
120
|
+
# This can cause a problem when using such a matcher as an
|
121
|
+
# argument to another matcher in a composed matcher expression,
|
122
|
+
# since the matcher instance may be checked against multiple
|
123
|
+
# values and produce invalid results due to the memoization.
|
124
|
+
#
|
125
|
+
# To deal with this, we clone any matchers in `expected` via
|
126
|
+
# this method when using `values_match?`, so that any memoization
|
127
|
+
# does not "leak" between checks.
|
128
|
+
def with_matchers_cloned(object)
|
129
|
+
if Matchers.is_a_matcher?(object)
|
130
|
+
object.clone
|
131
|
+
elsif Hash === object
|
132
|
+
Hash[with_matchers_cloned(object.to_a)]
|
133
|
+
elsif should_enumerate?(object)
|
134
|
+
object.map { |subobject| with_matchers_cloned(subobject) }
|
135
|
+
else
|
136
|
+
object
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
# @api private
|
141
|
+
# We should enumerate arrays as long as they are not recursive.
|
142
|
+
def should_enumerate?(item)
|
143
|
+
Array === item && item.none? { |subitem| subitem.equal?(item) }
|
144
|
+
end
|
145
|
+
|
146
|
+
# @api private
|
147
|
+
def unreadable_io?(object)
|
148
|
+
return false unless IO === object
|
149
|
+
object.each {} # STDOUT is enumerable but raises an error
|
150
|
+
false
|
151
|
+
rescue IOError
|
152
|
+
true
|
153
|
+
end
|
154
|
+
module_function :surface_descriptions_in, :should_enumerate?, :unreadable_io?
|
155
|
+
|
156
|
+
# Wraps an item in order to surface its `description` via `inspect`.
|
157
|
+
# @api private
|
158
|
+
DescribableItem = Struct.new(:item) do
|
159
|
+
# Inspectable version of the item description
|
160
|
+
def inspect
|
161
|
+
"(#{item.description})"
|
162
|
+
end
|
163
|
+
|
164
|
+
# A pretty printed version of the item description.
|
165
|
+
def pretty_print(pp)
|
166
|
+
pp.text "(#{item.description})"
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
170
|
+
end
|
171
|
+
end
|
@@ -0,0 +1,527 @@
|
|
1
|
+
module RSpec
|
2
|
+
module Matchers
|
3
|
+
# Defines the custom matcher DSL.
|
4
|
+
module DSL
|
5
|
+
# Defines a matcher alias. The returned matcher's `description` will be overriden
|
6
|
+
# to reflect the phrasing of the new name, which will be used in failure messages
|
7
|
+
# when passed as an argument to another matcher in a composed matcher expression.
|
8
|
+
#
|
9
|
+
# @example
|
10
|
+
# RSpec::Matchers.alias_matcher :a_list_that_sums_to, :sum_to
|
11
|
+
# sum_to(3).description # => "sum to 3"
|
12
|
+
# a_list_that_sums_to(3).description # => "a list that sums to 3"
|
13
|
+
#
|
14
|
+
# @example
|
15
|
+
# RSpec::Matchers.alias_matcher :a_list_sorted_by, :be_sorted_by do |description|
|
16
|
+
# description.sub("be sorted by", "a list sorted by")
|
17
|
+
# end
|
18
|
+
#
|
19
|
+
# be_sorted_by(:age).description # => "be sorted by age"
|
20
|
+
# a_list_sorted_by(:age).description # => "a list sorted by age"
|
21
|
+
#
|
22
|
+
# @param new_name [Symbol] the new name for the matcher
|
23
|
+
# @param old_name [Symbol] the original name for the matcher
|
24
|
+
# @param options [Hash] options for the aliased matcher
|
25
|
+
# @option options [Class] :klass the ruby class to use as the decorator. (Not normally used).
|
26
|
+
# @yield [String] optional block that, when given, is used to define the overriden
|
27
|
+
# logic. The yielded arg is the original description or failure message. If no
|
28
|
+
# block is provided, a default override is used based on the old and new names.
|
29
|
+
# @see RSpec::Matchers
|
30
|
+
def alias_matcher(new_name, old_name, options={}, &description_override)
|
31
|
+
description_override ||= lambda do |old_desc|
|
32
|
+
old_desc.gsub(EnglishPhrasing.split_words(old_name), EnglishPhrasing.split_words(new_name))
|
33
|
+
end
|
34
|
+
klass = options.fetch(:klass) { AliasedMatcher }
|
35
|
+
|
36
|
+
define_method(new_name) do |*args, &block|
|
37
|
+
matcher = __send__(old_name, *args, &block)
|
38
|
+
matcher.matcher_name = new_name if matcher.respond_to?(:matcher_name=)
|
39
|
+
klass.new(matcher, description_override)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# Defines a negated matcher. The returned matcher's `description` and `failure_message`
|
44
|
+
# will be overriden to reflect the phrasing of the new name, and the match logic will
|
45
|
+
# be based on the original matcher but negated.
|
46
|
+
#
|
47
|
+
# @example
|
48
|
+
# RSpec::Matchers.define_negated_matcher :exclude, :include
|
49
|
+
# include(1, 2).description # => "include 1 and 2"
|
50
|
+
# exclude(1, 2).description # => "exclude 1 and 2"
|
51
|
+
#
|
52
|
+
# @param negated_name [Symbol] the name for the negated matcher
|
53
|
+
# @param base_name [Symbol] the name of the original matcher that will be negated
|
54
|
+
# @yield [String] optional block that, when given, is used to define the overriden
|
55
|
+
# logic. The yielded arg is the original description or failure message. If no
|
56
|
+
# block is provided, a default override is used based on the old and new names.
|
57
|
+
# @see RSpec::Matchers
|
58
|
+
def define_negated_matcher(negated_name, base_name, &description_override)
|
59
|
+
alias_matcher(negated_name, base_name, :klass => AliasedNegatedMatcher, &description_override)
|
60
|
+
end
|
61
|
+
|
62
|
+
# Defines a custom matcher.
|
63
|
+
#
|
64
|
+
# @param name [Symbol] the name for the matcher
|
65
|
+
# @yield [Object] block that is used to define the matcher.
|
66
|
+
# The block is evaluated in the context of your custom matcher class.
|
67
|
+
# When args are passed to your matcher, they will be yielded here,
|
68
|
+
# usually representing the expected value(s).
|
69
|
+
# @see RSpec::Matchers
|
70
|
+
def define(name, &declarations)
|
71
|
+
warn_about_block_args(name, declarations)
|
72
|
+
define_method name do |*expected, &block_arg|
|
73
|
+
RSpec::Matchers::DSL::Matcher.new(name, declarations, self, *expected, &block_arg)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
alias_method :matcher, :define
|
77
|
+
|
78
|
+
private
|
79
|
+
|
80
|
+
if Proc.method_defined?(:parameters)
|
81
|
+
def warn_about_block_args(name, declarations)
|
82
|
+
declarations.parameters.each do |type, arg_name|
|
83
|
+
next unless type == :block
|
84
|
+
RSpec.warning("Your `#{name}` custom matcher receives a block argument (`#{arg_name}`), " \
|
85
|
+
"but due to limitations in ruby, RSpec cannot provide the block. Instead, " \
|
86
|
+
"use the `block_arg` method to access the block")
|
87
|
+
end
|
88
|
+
end
|
89
|
+
else
|
90
|
+
# :nocov:
|
91
|
+
def warn_about_block_args(*)
|
92
|
+
# There's no way to detect block params on 1.8 since the method reflection APIs don't expose it
|
93
|
+
end
|
94
|
+
# :nocov:
|
95
|
+
end
|
96
|
+
|
97
|
+
RSpec.configure { |c| c.extend self } if RSpec.respond_to?(:configure)
|
98
|
+
|
99
|
+
# Contains the methods that are available from within the
|
100
|
+
# `RSpec::Matchers.define` DSL for creating custom matchers.
|
101
|
+
module Macros
|
102
|
+
# Stores the block that is used to determine whether this matcher passes
|
103
|
+
# or fails. The block should return a boolean value. When the matcher is
|
104
|
+
# passed to `expect(...).to` and the block returns `true`, then the expectation
|
105
|
+
# passes. Similarly, when the matcher is passed to `expect(...).not_to` and the
|
106
|
+
# block returns `false`, then the expectation passes.
|
107
|
+
#
|
108
|
+
# @example
|
109
|
+
#
|
110
|
+
# RSpec::Matchers.define :be_even do
|
111
|
+
# match do |actual|
|
112
|
+
# actual.even?
|
113
|
+
# end
|
114
|
+
# end
|
115
|
+
#
|
116
|
+
# expect(4).to be_even # passes
|
117
|
+
# expect(3).not_to be_even # passes
|
118
|
+
# expect(3).to be_even # fails
|
119
|
+
# expect(4).not_to be_even # fails
|
120
|
+
#
|
121
|
+
# By default the match block will swallow expectation errors (e.g.
|
122
|
+
# caused by using an expectation such as `expect(1).to eq 2`), if you
|
123
|
+
# with to allow these to bubble up, pass in the option
|
124
|
+
# `:notify_expectation_failures => true`.
|
125
|
+
#
|
126
|
+
# @param [Hash] options for defining the behavior of the match block.
|
127
|
+
# @yield [Object] actual the actual value (i.e. the value wrapped by `expect`)
|
128
|
+
def match(options={}, &match_block)
|
129
|
+
define_user_override(:matches?, match_block) do |actual|
|
130
|
+
@actual = actual
|
131
|
+
RSpec::Support.with_failure_notifier(RAISE_NOTIFIER) do
|
132
|
+
begin
|
133
|
+
super(*actual_arg_for(match_block))
|
134
|
+
rescue RSpec::Expectations::ExpectationNotMetError
|
135
|
+
raise if options[:notify_expectation_failures]
|
136
|
+
false
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
# @private
|
143
|
+
RAISE_NOTIFIER = Proc.new { |err, _opts| raise err }
|
144
|
+
|
145
|
+
# Use this to define the block for a negative expectation (`expect(...).not_to`)
|
146
|
+
# when the positive and negative forms require different handling. This
|
147
|
+
# is rarely necessary, but can be helpful, for example, when specifying
|
148
|
+
# asynchronous processes that require different timeouts.
|
149
|
+
#
|
150
|
+
# @yield [Object] actual the actual value (i.e. the value wrapped by `expect`)
|
151
|
+
def match_when_negated(&match_block)
|
152
|
+
define_user_override(:does_not_match?, match_block) do |actual|
|
153
|
+
begin
|
154
|
+
@actual = actual
|
155
|
+
RSpec::Support.with_failure_notifier(RAISE_NOTIFIER) do
|
156
|
+
super(*actual_arg_for(match_block))
|
157
|
+
end
|
158
|
+
rescue RSpec::Expectations::ExpectationNotMetError
|
159
|
+
false
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
# Use this instead of `match` when the block will raise an exception
|
165
|
+
# rather than returning false to indicate a failure.
|
166
|
+
#
|
167
|
+
# @example
|
168
|
+
#
|
169
|
+
# RSpec::Matchers.define :accept_as_valid do |candidate_address|
|
170
|
+
# match_unless_raises ValidationException do |validator|
|
171
|
+
# validator.validate(candidate_address)
|
172
|
+
# end
|
173
|
+
# end
|
174
|
+
#
|
175
|
+
# expect(email_validator).to accept_as_valid("person@company.com")
|
176
|
+
#
|
177
|
+
# @yield [Object] actual the actual object (i.e. the value wrapped by `expect`)
|
178
|
+
def match_unless_raises(expected_exception=Exception, &match_block)
|
179
|
+
define_user_override(:matches?, match_block) do |actual|
|
180
|
+
@actual = actual
|
181
|
+
begin
|
182
|
+
super(*actual_arg_for(match_block))
|
183
|
+
rescue expected_exception => @rescued_exception
|
184
|
+
false
|
185
|
+
else
|
186
|
+
true
|
187
|
+
end
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
# Customizes the failure messsage to use when this matcher is
|
192
|
+
# asked to positively match. Only use this when the message
|
193
|
+
# generated by default doesn't suit your needs.
|
194
|
+
#
|
195
|
+
# @example
|
196
|
+
#
|
197
|
+
# RSpec::Matchers.define :have_strength do |expected|
|
198
|
+
# match { your_match_logic }
|
199
|
+
#
|
200
|
+
# failure_message do |actual|
|
201
|
+
# "Expected strength of #{expected}, but had #{actual.strength}"
|
202
|
+
# end
|
203
|
+
# end
|
204
|
+
#
|
205
|
+
# @yield [Object] actual the actual object (i.e. the value wrapped by `expect`)
|
206
|
+
def failure_message(&definition)
|
207
|
+
define_user_override(__method__, definition)
|
208
|
+
end
|
209
|
+
|
210
|
+
# Customize the failure messsage to use when this matcher is asked
|
211
|
+
# to negatively match. Only use this when the message generated by
|
212
|
+
# default doesn't suit your needs.
|
213
|
+
#
|
214
|
+
# @example
|
215
|
+
#
|
216
|
+
# RSpec::Matchers.define :have_strength do |expected|
|
217
|
+
# match { your_match_logic }
|
218
|
+
#
|
219
|
+
# failure_message_when_negated do |actual|
|
220
|
+
# "Expected not to have strength of #{expected}, but did"
|
221
|
+
# end
|
222
|
+
# end
|
223
|
+
#
|
224
|
+
# @yield [Object] actual the actual object (i.e. the value wrapped by `expect`)
|
225
|
+
def failure_message_when_negated(&definition)
|
226
|
+
define_user_override(__method__, definition)
|
227
|
+
end
|
228
|
+
|
229
|
+
# Customize the description to use for one-liners. Only use this when
|
230
|
+
# the description generated by default doesn't suit your needs.
|
231
|
+
#
|
232
|
+
# @example
|
233
|
+
#
|
234
|
+
# RSpec::Matchers.define :qualify_for do |expected|
|
235
|
+
# match { your_match_logic }
|
236
|
+
#
|
237
|
+
# description do
|
238
|
+
# "qualify for #{expected}"
|
239
|
+
# end
|
240
|
+
# end
|
241
|
+
#
|
242
|
+
# @yield [Object] actual the actual object (i.e. the value wrapped by `expect`)
|
243
|
+
def description(&definition)
|
244
|
+
define_user_override(__method__, definition)
|
245
|
+
end
|
246
|
+
|
247
|
+
# Tells the matcher to diff the actual and expected values in the failure
|
248
|
+
# message.
|
249
|
+
def diffable
|
250
|
+
define_method(:diffable?) { true }
|
251
|
+
end
|
252
|
+
|
253
|
+
# Declares that the matcher can be used in a block expectation.
|
254
|
+
# Users will not be able to use your matcher in a block
|
255
|
+
# expectation without declaring this.
|
256
|
+
# (e.g. `expect { do_something }.to matcher`).
|
257
|
+
def supports_block_expectations
|
258
|
+
define_method(:supports_block_expectations?) { true }
|
259
|
+
end
|
260
|
+
|
261
|
+
# Convenience for defining methods on this matcher to create a fluent
|
262
|
+
# interface. The trick about fluent interfaces is that each method must
|
263
|
+
# return self in order to chain methods together. `chain` handles that
|
264
|
+
# for you. If the method is invoked and the
|
265
|
+
# `include_chain_clauses_in_custom_matcher_descriptions` config option
|
266
|
+
# hash been enabled, the chained method name and args will be added to the
|
267
|
+
# default description and failure message.
|
268
|
+
#
|
269
|
+
# In the common case where you just want the chained method to store some
|
270
|
+
# value(s) for later use (e.g. in `match`), you can provide one or more
|
271
|
+
# attribute names instead of a block; the chained method will store its
|
272
|
+
# arguments in instance variables with those names, and the values will
|
273
|
+
# be exposed via getters.
|
274
|
+
#
|
275
|
+
# @example
|
276
|
+
#
|
277
|
+
# RSpec::Matchers.define :have_errors_on do |key|
|
278
|
+
# chain :with do |message|
|
279
|
+
# @message = message
|
280
|
+
# end
|
281
|
+
#
|
282
|
+
# match do |actual|
|
283
|
+
# actual.errors[key] == @message
|
284
|
+
# end
|
285
|
+
# end
|
286
|
+
#
|
287
|
+
# expect(minor).to have_errors_on(:age).with("Not old enough to participate")
|
288
|
+
def chain(method_name, *attr_names, &definition)
|
289
|
+
unless block_given? ^ attr_names.any?
|
290
|
+
raise ArgumentError, "You must pass either a block or some attribute names (but not both) to `chain`."
|
291
|
+
end
|
292
|
+
|
293
|
+
definition = assign_attributes(attr_names) if attr_names.any?
|
294
|
+
|
295
|
+
define_user_override(method_name, definition) do |*args, &block|
|
296
|
+
super(*args, &block)
|
297
|
+
@chained_method_clauses.push([method_name, args])
|
298
|
+
self
|
299
|
+
end
|
300
|
+
end
|
301
|
+
|
302
|
+
def assign_attributes(attr_names)
|
303
|
+
attr_reader(*attr_names)
|
304
|
+
private(*attr_names)
|
305
|
+
|
306
|
+
lambda do |*attr_values|
|
307
|
+
attr_names.zip(attr_values) do |attr_name, attr_value|
|
308
|
+
instance_variable_set(:"@#{attr_name}", attr_value)
|
309
|
+
end
|
310
|
+
end
|
311
|
+
end
|
312
|
+
|
313
|
+
# assign_attributes isn't defined in the private section below because
|
314
|
+
# that makes MRI 1.9.2 emit a warning about private attributes.
|
315
|
+
private :assign_attributes
|
316
|
+
|
317
|
+
private
|
318
|
+
|
319
|
+
# Does the following:
|
320
|
+
#
|
321
|
+
# - Defines the named method using a user-provided block
|
322
|
+
# in @user_method_defs, which is included as an ancestor
|
323
|
+
# in the singleton class in which we eval the `define` block.
|
324
|
+
# - Defines an overriden definition for the same method
|
325
|
+
# usign the provided `our_def` block.
|
326
|
+
# - Provides a default `our_def` block for the common case
|
327
|
+
# of needing to call the user's definition with `@actual`
|
328
|
+
# as an arg, but only if their block's arity can handle it.
|
329
|
+
#
|
330
|
+
# This compiles the user block into an actual method, allowing
|
331
|
+
# them to use normal method constructs like `return`
|
332
|
+
# (e.g. for an early guard statement), while allowing us to define
|
333
|
+
# an override that can provide the wrapped handling
|
334
|
+
# (e.g. assigning `@actual`, rescueing errors, etc) and
|
335
|
+
# can `super` to the user's definition.
|
336
|
+
def define_user_override(method_name, user_def, &our_def)
|
337
|
+
@user_method_defs.__send__(:define_method, method_name, &user_def)
|
338
|
+
our_def ||= lambda { super(*actual_arg_for(user_def)) }
|
339
|
+
define_method(method_name, &our_def)
|
340
|
+
end
|
341
|
+
|
342
|
+
# Defines deprecated macro methods from RSpec 2 for backwards compatibility.
|
343
|
+
# @deprecated Use the methods from {Macros} instead.
|
344
|
+
module Deprecated
|
345
|
+
# @deprecated Use {Macros#match} instead.
|
346
|
+
def match_for_should(&definition)
|
347
|
+
RSpec.deprecate("`match_for_should`", :replacement => "`match`")
|
348
|
+
match(&definition)
|
349
|
+
end
|
350
|
+
|
351
|
+
# @deprecated Use {Macros#match_when_negated} instead.
|
352
|
+
def match_for_should_not(&definition)
|
353
|
+
RSpec.deprecate("`match_for_should_not`", :replacement => "`match_when_negated`")
|
354
|
+
match_when_negated(&definition)
|
355
|
+
end
|
356
|
+
|
357
|
+
# @deprecated Use {Macros#failure_message} instead.
|
358
|
+
def failure_message_for_should(&definition)
|
359
|
+
RSpec.deprecate("`failure_message_for_should`", :replacement => "`failure_message`")
|
360
|
+
failure_message(&definition)
|
361
|
+
end
|
362
|
+
|
363
|
+
# @deprecated Use {Macros#failure_message_when_negated} instead.
|
364
|
+
def failure_message_for_should_not(&definition)
|
365
|
+
RSpec.deprecate("`failure_message_for_should_not`", :replacement => "`failure_message_when_negated`")
|
366
|
+
failure_message_when_negated(&definition)
|
367
|
+
end
|
368
|
+
end
|
369
|
+
end
|
370
|
+
|
371
|
+
# Defines default implementations of the matcher
|
372
|
+
# protocol methods for custom matchers. You can
|
373
|
+
# override any of these using the {RSpec::Matchers::DSL::Macros Macros} methods
|
374
|
+
# from within an `RSpec::Matchers.define` block.
|
375
|
+
module DefaultImplementations
|
376
|
+
include BuiltIn::BaseMatcher::DefaultFailureMessages
|
377
|
+
|
378
|
+
# @api private
|
379
|
+
# Used internally by objects returns by `should` and `should_not`.
|
380
|
+
def diffable?
|
381
|
+
false
|
382
|
+
end
|
383
|
+
|
384
|
+
# The default description.
|
385
|
+
def description
|
386
|
+
english_name = EnglishPhrasing.split_words(name)
|
387
|
+
expected_list = EnglishPhrasing.list(expected)
|
388
|
+
"#{english_name}#{expected_list}#{chained_method_clause_sentences}"
|
389
|
+
end
|
390
|
+
|
391
|
+
# Matchers do not support block expectations by default. You
|
392
|
+
# must opt-in.
|
393
|
+
def supports_block_expectations?
|
394
|
+
false
|
395
|
+
end
|
396
|
+
|
397
|
+
# Most matchers do not expect call stack jumps.
|
398
|
+
def expects_call_stack_jump?
|
399
|
+
false
|
400
|
+
end
|
401
|
+
|
402
|
+
private
|
403
|
+
|
404
|
+
def chained_method_clause_sentences
|
405
|
+
return '' unless Expectations.configuration.include_chain_clauses_in_custom_matcher_descriptions?
|
406
|
+
|
407
|
+
@chained_method_clauses.map do |(method_name, method_args)|
|
408
|
+
english_name = EnglishPhrasing.split_words(method_name)
|
409
|
+
arg_list = EnglishPhrasing.list(method_args)
|
410
|
+
" #{english_name}#{arg_list}"
|
411
|
+
end.join
|
412
|
+
end
|
413
|
+
end
|
414
|
+
|
415
|
+
# The class used for custom matchers. The block passed to
|
416
|
+
# `RSpec::Matchers.define` will be evaluated in the context
|
417
|
+
# of the singleton class of an instance, and will have the
|
418
|
+
# {RSpec::Matchers::DSL::Macros Macros} methods available.
|
419
|
+
class Matcher
|
420
|
+
# Provides default implementations for the matcher protocol methods.
|
421
|
+
include DefaultImplementations
|
422
|
+
|
423
|
+
# Allows expectation expressions to be used in the match block.
|
424
|
+
include RSpec::Matchers
|
425
|
+
|
426
|
+
# Supports the matcher composability features of RSpec 3+.
|
427
|
+
include Composable
|
428
|
+
|
429
|
+
# Makes the macro methods available to an `RSpec::Matchers.define` block.
|
430
|
+
extend Macros
|
431
|
+
extend Macros::Deprecated
|
432
|
+
|
433
|
+
# Exposes the value being matched against -- generally the object
|
434
|
+
# object wrapped by `expect`.
|
435
|
+
attr_reader :actual
|
436
|
+
|
437
|
+
# Exposes the exception raised during the matching by `match_unless_raises`.
|
438
|
+
# Could be useful to extract details for a failure message.
|
439
|
+
attr_reader :rescued_exception
|
440
|
+
|
441
|
+
# The block parameter used in the expectation
|
442
|
+
attr_reader :block_arg
|
443
|
+
|
444
|
+
# The name of the matcher.
|
445
|
+
attr_reader :name
|
446
|
+
|
447
|
+
# @api private
|
448
|
+
def initialize(name, declarations, matcher_execution_context, *expected, &block_arg)
|
449
|
+
@name = name
|
450
|
+
@actual = nil
|
451
|
+
@expected_as_array = expected
|
452
|
+
@matcher_execution_context = matcher_execution_context
|
453
|
+
@chained_method_clauses = []
|
454
|
+
@block_arg = block_arg
|
455
|
+
|
456
|
+
class << self
|
457
|
+
# See `Macros#define_user_override` above, for an explanation.
|
458
|
+
include(@user_method_defs = Module.new)
|
459
|
+
self
|
460
|
+
end.class_exec(*expected, &declarations)
|
461
|
+
end
|
462
|
+
|
463
|
+
# Provides the expected value. This will return an array if
|
464
|
+
# multiple arguments were passed to the matcher; otherwise it
|
465
|
+
# will return a single value.
|
466
|
+
# @see #expected_as_array
|
467
|
+
def expected
|
468
|
+
if expected_as_array.size == 1
|
469
|
+
expected_as_array[0]
|
470
|
+
else
|
471
|
+
expected_as_array
|
472
|
+
end
|
473
|
+
end
|
474
|
+
|
475
|
+
# Returns the expected value as an an array. This exists primarily
|
476
|
+
# to aid in upgrading from RSpec 2.x, since in RSpec 2, `expected`
|
477
|
+
# always returned an array.
|
478
|
+
# @see #expected
|
479
|
+
attr_reader :expected_as_array
|
480
|
+
|
481
|
+
# Adds the name (rather than a cryptic hex number)
|
482
|
+
# so we can identify an instance of
|
483
|
+
# the matcher in error messages (e.g. for `NoMethodError`)
|
484
|
+
def inspect
|
485
|
+
"#<#{self.class.name} #{name}>"
|
486
|
+
end
|
487
|
+
|
488
|
+
if RUBY_VERSION.to_f >= 1.9
|
489
|
+
# Indicates that this matcher responds to messages
|
490
|
+
# from the `@matcher_execution_context` as well.
|
491
|
+
# Also, supports getting a method object for such methods.
|
492
|
+
def respond_to_missing?(method, include_private=false)
|
493
|
+
super || @matcher_execution_context.respond_to?(method, include_private)
|
494
|
+
end
|
495
|
+
else # for 1.8.7
|
496
|
+
# :nocov:
|
497
|
+
# Indicates that this matcher responds to messages
|
498
|
+
# from the `@matcher_execution_context` as well.
|
499
|
+
def respond_to?(method, include_private=false)
|
500
|
+
super || @matcher_execution_context.respond_to?(method, include_private)
|
501
|
+
end
|
502
|
+
# :nocov:
|
503
|
+
end
|
504
|
+
|
505
|
+
private
|
506
|
+
|
507
|
+
def actual_arg_for(block)
|
508
|
+
block.arity.zero? ? [] : [@actual]
|
509
|
+
end
|
510
|
+
|
511
|
+
# Takes care of forwarding unhandled messages to the
|
512
|
+
# `@matcher_execution_context` (typically the current
|
513
|
+
# running `RSpec::Core::Example`). This is needed by
|
514
|
+
# rspec-rails so that it can define matchers that wrap
|
515
|
+
# Rails' test helper methods, but it's also a useful
|
516
|
+
# feature in its own right.
|
517
|
+
def method_missing(method, *args, &block)
|
518
|
+
if @matcher_execution_context.respond_to?(method)
|
519
|
+
@matcher_execution_context.__send__ method, *args, &block
|
520
|
+
else
|
521
|
+
super(method, *args, &block)
|
522
|
+
end
|
523
|
+
end
|
524
|
+
end
|
525
|
+
end
|
526
|
+
end
|
527
|
+
end
|