bibtex_to_scrapbox 0.2.0 → 0.2.1
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 +5 -5
- data/bibtex_to_scrapbox.gemspec +2 -2
- data/lib/bibtex_to_scrapbox/version.rb +1 -1
- metadata +11 -622
- data/gems/bin/htmldiff +0 -29
- data/gems/bin/ldiff +0 -29
- data/gems/bin/rake +0 -27
- data/gems/bin/rspec +0 -27
- data/gems/bin/thor +0 -27
- data/gems/extensions/x86_64-darwin-16/2.4.0-static/unicode-0.4.4.4/gem.build_complete +0 -0
- data/gems/extensions/x86_64-darwin-16/2.4.0-static/unicode-0.4.4.4/gem_make.out +0 -288
- data/gems/extensions/x86_64-darwin-16/2.4.0-static/unicode-0.4.4.4/unicode/unicode_native.bundle +0 -0
- data/gems/gems/bibtex-ruby-4.4.4/Gemfile +0 -66
- data/gems/gems/bibtex-ruby-4.4.4/Guardfile +0 -22
- data/gems/gems/bibtex-ruby-4.4.4/History.txt +0 -306
- data/gems/gems/bibtex-ruby-4.4.4/LICENSE +0 -621
- data/gems/gems/bibtex-ruby-4.4.4/Manifest +0 -100
- data/gems/gems/bibtex-ruby-4.4.4/README.md +0 -615
- data/gems/gems/bibtex-ruby-4.4.4/Rakefile +0 -123
- data/gems/gems/bibtex-ruby-4.4.4/bibtex-ruby.gemspec +0 -38
- data/gems/gems/bibtex-ruby-4.4.4/examples/bib2html.rb +0 -42
- data/gems/gems/bibtex-ruby-4.4.4/examples/bib2yaml.rb +0 -12
- data/gems/gems/bibtex-ruby-4.4.4/examples/markdown.bib +0 -39
- data/gems/gems/bibtex-ruby-4.4.4/features/bibtex.feature +0 -96
- data/gems/gems/bibtex-ruby-4.4.4/features/entries.feature +0 -67
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/braced_strings.feature +0 -48
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/crossref.feature +0 -62
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/latex_filter.feature +0 -171
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/multiline_strings.feature +0 -14
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/name_parsing.feature +0 -19
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/non_ascii_default_keys.feature +0 -20
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/non_ascii_keys.feature +0 -17
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/number_keys.feature +0 -45
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/parse_months.feature +0 -43
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/slash_keys.feature +0 -21
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/trailing_comma.feature +0 -21
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/whitespace_keys.feature +0 -23
- data/gems/gems/bibtex-ruby-4.4.4/features/names.feature +0 -86
- data/gems/gems/bibtex-ruby-4.4.4/features/preambles.feature +0 -27
- data/gems/gems/bibtex-ruby-4.4.4/features/query.feature +0 -102
- data/gems/gems/bibtex-ruby-4.4.4/features/replacement.feature +0 -68
- data/gems/gems/bibtex-ruby-4.4.4/features/step_definitions/bibtex_steps.rb +0 -119
- data/gems/gems/bibtex-ruby-4.4.4/features/step_definitions/name_steps.rb +0 -18
- data/gems/gems/bibtex-ruby-4.4.4/features/strings.feature +0 -53
- data/gems/gems/bibtex-ruby-4.4.4/features/support/env.rb +0 -21
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex.rb +0 -83
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/bibliography.rb +0 -594
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/bibliography/rdf_converter.rb +0 -27
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/bibtex.y +0 -141
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/compatibility.rb +0 -25
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/elements.rb +0 -376
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/entry.rb +0 -690
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/entry/bibtexml_converter.rb +0 -44
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/entry/citeproc_converter.rb +0 -164
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/entry/rdf_converter.rb +0 -588
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/error.rb +0 -49
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/extensions.rb +0 -25
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/filters.rb +0 -55
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/filters/latex.rb +0 -13
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/filters/linebreaks.rb +0 -11
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/lexer.rb +0 -358
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/name_parser.rb +0 -563
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/names.rb +0 -315
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/names.y +0 -267
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/parser.rb +0 -474
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/replaceable.rb +0 -52
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/ruby.rb +0 -1
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/utilities.rb +0 -59
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/value.rb +0 -305
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/version.rb +0 -28
- data/gems/gems/bibtex-ruby-4.4.4/test/benchmark.rb +0 -84
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/entry/test_rdf_converter.rb +0 -341
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_bibliography.rb +0 -446
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_elements.rb +0 -64
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_entry.rb +0 -698
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_filters.rb +0 -36
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_lexer.rb +0 -42
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_name_parser.rb +0 -29
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_names.rb +0 -168
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_parser.rb +0 -210
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_string.rb +0 -83
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_utilities.rb +0 -34
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_value.rb +0 -189
- data/gems/gems/bibtex-ruby-4.4.4/test/fixtures/bibdesk.bib +0 -50
- data/gems/gems/bibtex-ruby-4.4.4/test/fixtures/comment.bib +0 -15
- data/gems/gems/bibtex-ruby-4.4.4/test/fixtures/decoret.bib +0 -83
- data/gems/gems/bibtex-ruby-4.4.4/test/fixtures/empty.bib +0 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/fixtures/entry.bib +0 -24
- data/gems/gems/bibtex-ruby-4.4.4/test/fixtures/errors.bib +0 -67
- data/gems/gems/bibtex-ruby-4.4.4/test/fixtures/no_bibtex.bib +0 -9
- data/gems/gems/bibtex-ruby-4.4.4/test/fixtures/preamble.bib +0 -12
- data/gems/gems/bibtex-ruby-4.4.4/test/fixtures/roundtrip.bib +0 -11
- data/gems/gems/bibtex-ruby-4.4.4/test/helper.rb +0 -43
- data/gems/gems/bibtex-ruby-4.4.4/test/macruby.d +0 -21
- data/gems/gems/bibtex-ruby-4.4.4/test/macruby.rb +0 -22
- data/gems/gems/bibtex-ruby-4.4.4/test/profile.rb +0 -28
- data/gems/gems/bibtex-ruby-4.4.4/test/test_bibtex.rb +0 -127
- data/gems/gems/bibtex-ruby-4.4.4/test/test_export.rb +0 -33
- data/gems/gems/diff-lcs-1.3/.rspec +0 -1
- data/gems/gems/diff-lcs-1.3/Code-of-Conduct.md +0 -74
- data/gems/gems/diff-lcs-1.3/Contributing.md +0 -83
- data/gems/gems/diff-lcs-1.3/History.md +0 -220
- data/gems/gems/diff-lcs-1.3/License.md +0 -39
- data/gems/gems/diff-lcs-1.3/Manifest.txt +0 -37
- data/gems/gems/diff-lcs-1.3/README.rdoc +0 -84
- data/gems/gems/diff-lcs-1.3/Rakefile +0 -57
- data/gems/gems/diff-lcs-1.3/autotest/discover.rb +0 -1
- data/gems/gems/diff-lcs-1.3/bin/htmldiff +0 -32
- data/gems/gems/diff-lcs-1.3/bin/ldiff +0 -6
- data/gems/gems/diff-lcs-1.3/docs/COPYING.txt +0 -339
- data/gems/gems/diff-lcs-1.3/docs/artistic.txt +0 -127
- data/gems/gems/diff-lcs-1.3/lib/diff-lcs.rb +0 -3
- data/gems/gems/diff-lcs-1.3/lib/diff/lcs.rb +0 -725
- data/gems/gems/diff-lcs-1.3/lib/diff/lcs/array.rb +0 -7
- data/gems/gems/diff-lcs-1.3/lib/diff/lcs/block.rb +0 -37
- data/gems/gems/diff-lcs-1.3/lib/diff/lcs/callbacks.rb +0 -322
- data/gems/gems/diff-lcs-1.3/lib/diff/lcs/change.rb +0 -181
- data/gems/gems/diff-lcs-1.3/lib/diff/lcs/htmldiff.rb +0 -149
- data/gems/gems/diff-lcs-1.3/lib/diff/lcs/hunk.rb +0 -276
- data/gems/gems/diff-lcs-1.3/lib/diff/lcs/internals.rb +0 -307
- data/gems/gems/diff-lcs-1.3/lib/diff/lcs/ldiff.rb +0 -167
- data/gems/gems/diff-lcs-1.3/lib/diff/lcs/string.rb +0 -5
- data/gems/gems/diff-lcs-1.3/spec/change_spec.rb +0 -65
- data/gems/gems/diff-lcs-1.3/spec/diff_spec.rb +0 -47
- data/gems/gems/diff-lcs-1.3/spec/fixtures/ds1.csv +0 -50
- data/gems/gems/diff-lcs-1.3/spec/fixtures/ds2.csv +0 -51
- data/gems/gems/diff-lcs-1.3/spec/hunk_spec.rb +0 -72
- data/gems/gems/diff-lcs-1.3/spec/issues_spec.rb +0 -49
- data/gems/gems/diff-lcs-1.3/spec/lcs_spec.rb +0 -56
- data/gems/gems/diff-lcs-1.3/spec/ldiff_spec.rb +0 -47
- data/gems/gems/diff-lcs-1.3/spec/patch_spec.rb +0 -422
- data/gems/gems/diff-lcs-1.3/spec/sdiff_spec.rb +0 -214
- data/gems/gems/diff-lcs-1.3/spec/spec_helper.rb +0 -321
- data/gems/gems/diff-lcs-1.3/spec/traverse_balanced_spec.rb +0 -310
- data/gems/gems/diff-lcs-1.3/spec/traverse_sequences_spec.rb +0 -139
- data/gems/gems/latex-decode-0.2.2/.gitignore +0 -6
- data/gems/gems/latex-decode-0.2.2/.travis.yml +0 -18
- data/gems/gems/latex-decode-0.2.2/Gemfile +0 -21
- data/gems/gems/latex-decode-0.2.2/LICENSE +0 -621
- data/gems/gems/latex-decode-0.2.2/README.md +0 -65
- data/gems/gems/latex-decode-0.2.2/Rakefile +0 -41
- data/gems/gems/latex-decode-0.2.2/cucumber.yml +0 -1
- data/gems/gems/latex-decode-0.2.2/features/brackets.feature +0 -11
- data/gems/gems/latex-decode-0.2.2/features/diacritics.feature +0 -40
- data/gems/gems/latex-decode-0.2.2/features/greek.feature +0 -13
- data/gems/gems/latex-decode-0.2.2/features/maths.feature +0 -9
- data/gems/gems/latex-decode-0.2.2/features/non-latex.feature +0 -15
- data/gems/gems/latex-decode-0.2.2/features/punctuation.feature +0 -50
- data/gems/gems/latex-decode-0.2.2/features/special_characters.feature +0 -21
- data/gems/gems/latex-decode-0.2.2/features/step_definitions/latex.rb +0 -7
- data/gems/gems/latex-decode-0.2.2/features/support/env.rb +0 -14
- data/gems/gems/latex-decode-0.2.2/features/symbols.feature +0 -21
- data/gems/gems/latex-decode-0.2.2/features/umlauts.feature +0 -11
- data/gems/gems/latex-decode-0.2.2/latex-decode.gemspec +0 -33
- data/gems/gems/latex-decode-0.2.2/lib/latex/decode.rb +0 -54
- data/gems/gems/latex-decode-0.2.2/lib/latex/decode/accents.rb +0 -36
- data/gems/gems/latex-decode-0.2.2/lib/latex/decode/base.rb +0 -62
- data/gems/gems/latex-decode-0.2.2/lib/latex/decode/compatibility.rb +0 -89
- data/gems/gems/latex-decode-0.2.2/lib/latex/decode/diacritics.rb +0 -46
- data/gems/gems/latex-decode-0.2.2/lib/latex/decode/greek.rb +0 -61
- data/gems/gems/latex-decode-0.2.2/lib/latex/decode/maths.rb +0 -21
- data/gems/gems/latex-decode-0.2.2/lib/latex/decode/punctuation.rb +0 -59
- data/gems/gems/latex-decode-0.2.2/lib/latex/decode/symbols.rb +0 -225
- data/gems/gems/latex-decode-0.2.2/lib/latex/decode/version.rb +0 -5
- data/gems/gems/rake-10.5.0/.autotest +0 -7
- data/gems/gems/rake-10.5.0/.rubocop.yml +0 -27
- data/gems/gems/rake-10.5.0/.togglerc +0 -7
- data/gems/gems/rake-10.5.0/CONTRIBUTING.rdoc +0 -38
- data/gems/gems/rake-10.5.0/History.rdoc +0 -659
- data/gems/gems/rake-10.5.0/MIT-LICENSE +0 -21
- data/gems/gems/rake-10.5.0/Manifest.txt +0 -166
- data/gems/gems/rake-10.5.0/README.rdoc +0 -139
- data/gems/gems/rake-10.5.0/Rakefile +0 -81
- data/gems/gems/rake-10.5.0/bin/rake +0 -33
- data/gems/gems/rake-10.5.0/doc/command_line_usage.rdoc +0 -158
- data/gems/gems/rake-10.5.0/doc/example/Rakefile1 +0 -38
- data/gems/gems/rake-10.5.0/doc/example/Rakefile2 +0 -35
- data/gems/gems/rake-10.5.0/doc/example/a.c +0 -6
- data/gems/gems/rake-10.5.0/doc/example/b.c +0 -6
- data/gems/gems/rake-10.5.0/doc/example/main.c +0 -11
- data/gems/gems/rake-10.5.0/doc/glossary.rdoc +0 -42
- data/gems/gems/rake-10.5.0/doc/jamis.rb +0 -591
- data/gems/gems/rake-10.5.0/doc/proto_rake.rdoc +0 -127
- data/gems/gems/rake-10.5.0/doc/rake.1 +0 -141
- data/gems/gems/rake-10.5.0/doc/rakefile.rdoc +0 -624
- data/gems/gems/rake-10.5.0/doc/rational.rdoc +0 -151
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.4.14.rdoc +0 -23
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.4.15.rdoc +0 -35
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.5.0.rdoc +0 -53
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.5.3.rdoc +0 -78
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.5.4.rdoc +0 -46
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.6.0.rdoc +0 -141
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.7.0.rdoc +0 -119
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.7.1.rdoc +0 -59
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.7.2.rdoc +0 -121
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.7.3.rdoc +0 -47
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.8.0.rdoc +0 -114
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.8.2.rdoc +0 -165
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.8.3.rdoc +0 -112
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.8.4.rdoc +0 -147
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.8.5.rdoc +0 -53
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.8.6.rdoc +0 -37
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.8.7.rdoc +0 -55
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.9.0.rdoc +0 -112
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.9.1.rdoc +0 -52
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.2.rdoc +0 -55
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.rdoc +0 -49
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.9.3.rdoc +0 -102
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.9.4.rdoc +0 -60
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.9.5.rdoc +0 -55
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.9.6.rdoc +0 -64
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-10.0.0.rdoc +0 -178
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-10.0.1.rdoc +0 -58
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-10.0.2.rdoc +0 -53
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-10.0.3.rdoc +0 -191
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-10.1.0.rdoc +0 -61
- data/gems/gems/rake-10.5.0/lib/rake.rb +0 -79
- data/gems/gems/rake-10.5.0/lib/rake/alt_system.rb +0 -110
- data/gems/gems/rake-10.5.0/lib/rake/application.rb +0 -790
- data/gems/gems/rake-10.5.0/lib/rake/backtrace.rb +0 -23
- data/gems/gems/rake-10.5.0/lib/rake/clean.rb +0 -76
- data/gems/gems/rake-10.5.0/lib/rake/cloneable.rb +0 -16
- data/gems/gems/rake-10.5.0/lib/rake/contrib/.document +0 -1
- data/gems/gems/rake-10.5.0/lib/rake/contrib/compositepublisher.rb +0 -21
- data/gems/gems/rake-10.5.0/lib/rake/contrib/ftptools.rb +0 -137
- data/gems/gems/rake-10.5.0/lib/rake/contrib/publisher.rb +0 -81
- data/gems/gems/rake-10.5.0/lib/rake/contrib/rubyforgepublisher.rb +0 -18
- data/gems/gems/rake-10.5.0/lib/rake/contrib/sshpublisher.rb +0 -61
- data/gems/gems/rake-10.5.0/lib/rake/contrib/sys.rb +0 -4
- data/gems/gems/rake-10.5.0/lib/rake/cpu_counter.rb +0 -125
- data/gems/gems/rake-10.5.0/lib/rake/default_loader.rb +0 -14
- data/gems/gems/rake-10.5.0/lib/rake/dsl_definition.rb +0 -201
- data/gems/gems/rake-10.5.0/lib/rake/early_time.rb +0 -21
- data/gems/gems/rake-10.5.0/lib/rake/ext/core.rb +0 -25
- data/gems/gems/rake-10.5.0/lib/rake/ext/module.rb +0 -2
- data/gems/gems/rake-10.5.0/lib/rake/ext/pathname.rb +0 -25
- data/gems/gems/rake-10.5.0/lib/rake/ext/string.rb +0 -175
- data/gems/gems/rake-10.5.0/lib/rake/ext/time.rb +0 -18
- data/gems/gems/rake-10.5.0/lib/rake/file_creation_task.rb +0 -24
- data/gems/gems/rake-10.5.0/lib/rake/file_list.rb +0 -428
- data/gems/gems/rake-10.5.0/lib/rake/file_task.rb +0 -46
- data/gems/gems/rake-10.5.0/lib/rake/file_utils.rb +0 -128
- data/gems/gems/rake-10.5.0/lib/rake/file_utils_ext.rb +0 -144
- data/gems/gems/rake-10.5.0/lib/rake/gempackagetask.rb +0 -4
- data/gems/gems/rake-10.5.0/lib/rake/invocation_chain.rb +0 -56
- data/gems/gems/rake-10.5.0/lib/rake/invocation_exception_mixin.rb +0 -16
- data/gems/gems/rake-10.5.0/lib/rake/late_time.rb +0 -17
- data/gems/gems/rake-10.5.0/lib/rake/linked_list.rb +0 -103
- data/gems/gems/rake-10.5.0/lib/rake/loaders/makefile.rb +0 -53
- data/gems/gems/rake-10.5.0/lib/rake/multi_task.rb +0 -13
- data/gems/gems/rake-10.5.0/lib/rake/name_space.rb +0 -38
- data/gems/gems/rake-10.5.0/lib/rake/packagetask.rb +0 -199
- data/gems/gems/rake-10.5.0/lib/rake/pathmap.rb +0 -3
- data/gems/gems/rake-10.5.0/lib/rake/phony.rb +0 -15
- data/gems/gems/rake-10.5.0/lib/rake/private_reader.rb +0 -20
- data/gems/gems/rake-10.5.0/lib/rake/promise.rb +0 -99
- data/gems/gems/rake-10.5.0/lib/rake/pseudo_status.rb +0 -29
- data/gems/gems/rake-10.5.0/lib/rake/rake_module.rb +0 -38
- data/gems/gems/rake-10.5.0/lib/rake/rake_test_loader.rb +0 -22
- data/gems/gems/rake-10.5.0/lib/rake/rdoctask.rb +0 -4
- data/gems/gems/rake-10.5.0/lib/rake/ruby182_test_unit_fix.rb +0 -29
- data/gems/gems/rake-10.5.0/lib/rake/rule_recursion_overflow_error.rb +0 -20
- data/gems/gems/rake-10.5.0/lib/rake/runtest.rb +0 -27
- data/gems/gems/rake-10.5.0/lib/rake/scope.rb +0 -42
- data/gems/gems/rake-10.5.0/lib/rake/task.rb +0 -383
- data/gems/gems/rake-10.5.0/lib/rake/task_argument_error.rb +0 -7
- data/gems/gems/rake-10.5.0/lib/rake/task_arguments.rb +0 -98
- data/gems/gems/rake-10.5.0/lib/rake/task_manager.rb +0 -307
- data/gems/gems/rake-10.5.0/lib/rake/tasklib.rb +0 -24
- data/gems/gems/rake-10.5.0/lib/rake/testtask.rb +0 -213
- data/gems/gems/rake-10.5.0/lib/rake/thread_history_display.rb +0 -48
- data/gems/gems/rake-10.5.0/lib/rake/thread_pool.rb +0 -164
- data/gems/gems/rake-10.5.0/lib/rake/trace_output.rb +0 -22
- data/gems/gems/rake-10.5.0/lib/rake/version.rb +0 -7
- data/gems/gems/rake-10.5.0/lib/rake/win32.rb +0 -56
- data/gems/gems/rake-10.5.0/rakelib/publish.rake +0 -20
- data/gems/gems/rake-10.5.0/rakelib/test_times.rake +0 -25
- data/gems/gems/rake-10.5.0/test/file_creation.rb +0 -34
- data/gems/gems/rake-10.5.0/test/helper.rb +0 -129
- data/gems/gems/rake-10.5.0/test/support/rakefile_definitions.rb +0 -478
- data/gems/gems/rake-10.5.0/test/support/ruby_runner.rb +0 -34
- data/gems/gems/rake-10.5.0/test/test_private_reader.rb +0 -42
- data/gems/gems/rake-10.5.0/test/test_rake.rb +0 -40
- data/gems/gems/rake-10.5.0/test/test_rake_application.rb +0 -643
- data/gems/gems/rake-10.5.0/test/test_rake_application_options.rb +0 -468
- data/gems/gems/rake-10.5.0/test/test_rake_backtrace.rb +0 -119
- data/gems/gems/rake-10.5.0/test/test_rake_clean.rb +0 -61
- data/gems/gems/rake-10.5.0/test/test_rake_cpu_counter.rb +0 -68
- data/gems/gems/rake-10.5.0/test/test_rake_definitions.rb +0 -84
- data/gems/gems/rake-10.5.0/test/test_rake_directory_task.rb +0 -76
- data/gems/gems/rake-10.5.0/test/test_rake_dsl.rb +0 -40
- data/gems/gems/rake-10.5.0/test/test_rake_early_time.rb +0 -31
- data/gems/gems/rake-10.5.0/test/test_rake_extension.rb +0 -59
- data/gems/gems/rake-10.5.0/test/test_rake_file_creation_task.rb +0 -56
- data/gems/gems/rake-10.5.0/test/test_rake_file_list.rb +0 -670
- data/gems/gems/rake-10.5.0/test/test_rake_file_list_path_map.rb +0 -8
- data/gems/gems/rake-10.5.0/test/test_rake_file_task.rb +0 -197
- data/gems/gems/rake-10.5.0/test/test_rake_file_utils.rb +0 -314
- data/gems/gems/rake-10.5.0/test/test_rake_ftp_file.rb +0 -74
- data/gems/gems/rake-10.5.0/test/test_rake_functional.rb +0 -482
- data/gems/gems/rake-10.5.0/test/test_rake_invocation_chain.rb +0 -64
- data/gems/gems/rake-10.5.0/test/test_rake_late_time.rb +0 -18
- data/gems/gems/rake-10.5.0/test/test_rake_linked_list.rb +0 -84
- data/gems/gems/rake-10.5.0/test/test_rake_makefile_loader.rb +0 -46
- data/gems/gems/rake-10.5.0/test/test_rake_multi_task.rb +0 -64
- data/gems/gems/rake-10.5.0/test/test_rake_name_space.rb +0 -57
- data/gems/gems/rake-10.5.0/test/test_rake_package_task.rb +0 -79
- data/gems/gems/rake-10.5.0/test/test_rake_path_map.rb +0 -168
- data/gems/gems/rake-10.5.0/test/test_rake_path_map_explode.rb +0 -34
- data/gems/gems/rake-10.5.0/test/test_rake_path_map_partial.rb +0 -18
- data/gems/gems/rake-10.5.0/test/test_rake_pathname_extensions.rb +0 -15
- data/gems/gems/rake-10.5.0/test/test_rake_pseudo_status.rb +0 -21
- data/gems/gems/rake-10.5.0/test/test_rake_rake_test_loader.rb +0 -20
- data/gems/gems/rake-10.5.0/test/test_rake_reduce_compat.rb +0 -26
- data/gems/gems/rake-10.5.0/test/test_rake_require.rb +0 -40
- data/gems/gems/rake-10.5.0/test/test_rake_rules.rb +0 -388
- data/gems/gems/rake-10.5.0/test/test_rake_scope.rb +0 -44
- data/gems/gems/rake-10.5.0/test/test_rake_task.rb +0 -393
- data/gems/gems/rake-10.5.0/test/test_rake_task_argument_parsing.rb +0 -119
- data/gems/gems/rake-10.5.0/test/test_rake_task_arguments.rb +0 -127
- data/gems/gems/rake-10.5.0/test/test_rake_task_lib.rb +0 -9
- data/gems/gems/rake-10.5.0/test/test_rake_task_manager.rb +0 -178
- data/gems/gems/rake-10.5.0/test/test_rake_task_manager_argument_resolution.rb +0 -19
- data/gems/gems/rake-10.5.0/test/test_rake_task_with_arguments.rb +0 -172
- data/gems/gems/rake-10.5.0/test/test_rake_test_task.rb +0 -146
- data/gems/gems/rake-10.5.0/test/test_rake_thread_pool.rb +0 -145
- data/gems/gems/rake-10.5.0/test/test_rake_top_level_functions.rb +0 -71
- data/gems/gems/rake-10.5.0/test/test_rake_win32.rb +0 -72
- data/gems/gems/rake-10.5.0/test/test_thread_history_display.rb +0 -101
- data/gems/gems/rake-10.5.0/test/test_trace_output.rb +0 -52
- data/gems/gems/rspec-3.6.0/LICENSE.md +0 -27
- data/gems/gems/rspec-3.6.0/README.md +0 -39
- data/gems/gems/rspec-3.6.0/lib/rspec.rb +0 -3
- data/gems/gems/rspec-3.6.0/lib/rspec/version.rb +0 -5
- data/gems/gems/rspec-core-3.6.0/.document +0 -5
- data/gems/gems/rspec-core-3.6.0/.yardopts +0 -8
- data/gems/gems/rspec-core-3.6.0/Changelog.md +0 -2167
- data/gems/gems/rspec-core-3.6.0/LICENSE.md +0 -26
- data/gems/gems/rspec-core-3.6.0/README.md +0 -384
- data/gems/gems/rspec-core-3.6.0/exe/rspec +0 -4
- data/gems/gems/rspec-core-3.6.0/lib/rspec/autorun.rb +0 -3
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core.rb +0 -185
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/backtrace_formatter.rb +0 -65
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/bisect/coordinator.rb +0 -66
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/bisect/example_minimizer.rb +0 -169
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/bisect/runner.rb +0 -169
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/bisect/server.rb +0 -70
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/configuration.rb +0 -2177
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/configuration_options.rb +0 -196
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/drb.rb +0 -113
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/dsl.rb +0 -98
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/example.rb +0 -653
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/example_group.rb +0 -883
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/example_status_persister.rb +0 -235
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/filter_manager.rb +0 -231
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/flat_map.rb +0 -20
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters.rb +0 -265
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/base_formatter.rb +0 -70
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/base_text_formatter.rb +0 -75
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/bisect_formatter.rb +0 -69
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/bisect_progress_formatter.rb +0 -144
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/console_codes.rb +0 -68
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/deprecation_formatter.rb +0 -223
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/documentation_formatter.rb +0 -70
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/exception_presenter.rb +0 -496
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/fallback_message_formatter.rb +0 -28
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/helpers.rb +0 -110
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/html_formatter.rb +0 -153
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/html_printer.rb +0 -414
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/html_snippet_extractor.rb +0 -118
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/json_formatter.rb +0 -101
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/profile_formatter.rb +0 -68
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/progress_formatter.rb +0 -29
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/protocol.rb +0 -182
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/snippet_extractor.rb +0 -134
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/syntax_highlighter.rb +0 -91
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/hooks.rb +0 -624
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/invocations.rb +0 -85
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/memoized_helpers.rb +0 -535
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/metadata.rb +0 -499
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/metadata_filter.rb +0 -255
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/minitest_assertions_adapter.rb +0 -31
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/mocking_adapters/flexmock.rb +0 -31
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/mocking_adapters/mocha.rb +0 -57
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/mocking_adapters/null.rb +0 -14
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/mocking_adapters/rr.rb +0 -31
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/mocking_adapters/rspec.rb +0 -32
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/notifications.rb +0 -514
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/option_parser.rb +0 -309
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/ordering.rb +0 -158
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/output_wrapper.rb +0 -29
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/pending.rb +0 -165
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/profiler.rb +0 -32
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/project_initializer.rb +0 -48
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/project_initializer/.rspec +0 -1
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/project_initializer/spec/spec_helper.rb +0 -100
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/rake_task.rb +0 -168
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/reporter.rb +0 -260
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/ruby_project.rb +0 -53
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb +0 -193
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/sandbox.rb +0 -37
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/set.rb +0 -54
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/shared_context.rb +0 -55
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/shared_example_group.rb +0 -271
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/shell_escape.rb +0 -49
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/test_unit_assertions_adapter.rb +0 -30
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/version.rb +0 -9
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/warnings.rb +0 -40
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/world.rb +0 -264
- data/gems/gems/rspec-expectations-3.6.0/.document +0 -5
- data/gems/gems/rspec-expectations-3.6.0/.yardopts +0 -6
- data/gems/gems/rspec-expectations-3.6.0/Changelog.md +0 -1072
- data/gems/gems/rspec-expectations-3.6.0/LICENSE.md +0 -25
- data/gems/gems/rspec-expectations-3.6.0/README.md +0 -305
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/expectations.rb +0 -82
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/expectations/block_snippet_extractor.rb +0 -253
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/expectations/configuration.rb +0 -201
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/expectations/expectation_target.rb +0 -127
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/expectations/fail_with.rb +0 -39
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/expectations/failure_aggregator.rb +0 -194
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/expectations/handler.rb +0 -170
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/expectations/minitest_integration.rb +0 -58
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/expectations/syntax.rb +0 -132
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/expectations/version.rb +0 -8
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers.rb +0 -1025
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/aliased_matcher.rb +0 -116
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in.rb +0 -52
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/all.rb +0 -85
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/base_matcher.rb +0 -193
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/be.rb +0 -288
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/be_between.rb +0 -77
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/be_instance_of.rb +0 -22
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/be_kind_of.rb +0 -16
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/be_within.rb +0 -72
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/change.rb +0 -387
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/compound.rb +0 -272
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/contain_exactly.rb +0 -301
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/cover.rb +0 -24
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/eq.rb +0 -40
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/eql.rb +0 -34
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/equal.rb +0 -81
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/exist.rb +0 -90
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/has.rb +0 -103
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/have_attributes.rb +0 -114
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/include.rb +0 -143
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/match.rb +0 -106
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/operators.rb +0 -128
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/output.rb +0 -200
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/raise_error.rb +0 -230
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/respond_to.rb +0 -165
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/satisfy.rb +0 -60
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/start_or_end_with.rb +0 -94
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/throw_symbol.rb +0 -132
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/yield.rb +0 -432
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/composable.rb +0 -169
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/dsl.rb +0 -527
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/english_phrasing.rb +0 -58
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +0 -73
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/fail_matchers.rb +0 -42
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/generated_descriptions.rb +0 -42
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/matcher_delegator.rb +0 -35
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/matcher_protocol.rb +0 -99
- data/gems/gems/rspec-mocks-3.6.0/.document +0 -5
- data/gems/gems/rspec-mocks-3.6.0/.yardopts +0 -6
- data/gems/gems/rspec-mocks-3.6.0/Changelog.md +0 -1073
- data/gems/gems/rspec-mocks-3.6.0/LICENSE.md +0 -25
- data/gems/gems/rspec-mocks-3.6.0/README.md +0 -460
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks.rb +0 -130
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/any_instance.rb +0 -11
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/any_instance/chain.rb +0 -110
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/any_instance/error_generator.rb +0 -31
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/any_instance/expect_chain_chain.rb +0 -31
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/any_instance/expectation_chain.rb +0 -50
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/any_instance/message_chains.rb +0 -83
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/any_instance/proxy.rb +0 -116
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/any_instance/recorder.rb +0 -289
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/any_instance/stub_chain.rb +0 -51
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/any_instance/stub_chain_chain.rb +0 -23
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/argument_list_matcher.rb +0 -100
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/argument_matchers.rb +0 -320
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/configuration.rb +0 -212
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/error_generator.rb +0 -369
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/example_methods.rb +0 -434
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/instance_method_stasher.rb +0 -146
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/marshal_extension.rb +0 -41
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/matchers/expectation_customization.rb +0 -20
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/matchers/have_received.rb +0 -130
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/matchers/receive.rb +0 -132
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/matchers/receive_message_chain.rb +0 -82
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/matchers/receive_messages.rb +0 -77
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/message_chain.rb +0 -87
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/message_expectation.rb +0 -740
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/method_double.rb +0 -287
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/method_reference.rb +0 -202
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/minitest_integration.rb +0 -68
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/mutate_const.rb +0 -339
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/object_reference.rb +0 -149
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/order_group.rb +0 -81
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/proxy.rb +0 -484
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/space.rb +0 -238
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/standalone.rb +0 -3
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/syntax.rb +0 -325
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/targets.rb +0 -124
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/test_double.rb +0 -171
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/verifying_double.rb +0 -129
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/verifying_message_expectation.rb +0 -54
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/verifying_proxy.rb +0 -220
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/version.rb +0 -9
- data/gems/gems/rspec-support-3.6.0/Changelog.md +0 -211
- data/gems/gems/rspec-support-3.6.0/LICENSE.md +0 -23
- data/gems/gems/rspec-support-3.6.0/README.md +0 -40
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support.rb +0 -139
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/caller_filter.rb +0 -83
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/comparable_version.rb +0 -46
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/differ.rb +0 -215
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/directory_maker.rb +0 -63
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/encoded_string.rb +0 -165
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/fuzzy_matcher.rb +0 -48
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/hunk_generator.rb +0 -47
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/matcher_definition.rb +0 -42
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/method_signature_verifier.rb +0 -392
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/mutex.rb +0 -73
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/object_formatter.rb +0 -268
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/recursive_const_methods.rb +0 -76
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/reentrant_mutex.rb +0 -53
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/ruby_features.rb +0 -162
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/source.rb +0 -75
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/source/location.rb +0 -21
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/source/node.rb +0 -107
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/source/token.rb +0 -87
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/spec.rb +0 -81
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/spec/deprecation_helpers.rb +0 -64
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/spec/formatting_support.rb +0 -9
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/spec/in_sub_process.rb +0 -69
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/spec/library_wide_checks.rb +0 -150
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/spec/shell_out.rb +0 -84
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/spec/stderr_splitter.rb +0 -63
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/spec/string_matcher.rb +0 -46
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/spec/with_isolated_directory.rb +0 -13
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/spec/with_isolated_stderr.rb +0 -13
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/version.rb +0 -7
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/warnings.rb +0 -39
- data/gems/gems/thor-0.19.4/.document +0 -5
- data/gems/gems/thor-0.19.4/CHANGELOG.md +0 -163
- data/gems/gems/thor-0.19.4/CONTRIBUTING.md +0 -15
- data/gems/gems/thor-0.19.4/LICENSE.md +0 -20
- data/gems/gems/thor-0.19.4/README.md +0 -47
- data/gems/gems/thor-0.19.4/bin/thor +0 -6
- data/gems/gems/thor-0.19.4/lib/thor.rb +0 -492
- data/gems/gems/thor-0.19.4/lib/thor/actions.rb +0 -318
- data/gems/gems/thor-0.19.4/lib/thor/actions/create_file.rb +0 -103
- data/gems/gems/thor-0.19.4/lib/thor/actions/create_link.rb +0 -59
- data/gems/gems/thor-0.19.4/lib/thor/actions/directory.rb +0 -118
- data/gems/gems/thor-0.19.4/lib/thor/actions/empty_directory.rb +0 -135
- data/gems/gems/thor-0.19.4/lib/thor/actions/file_manipulation.rb +0 -327
- data/gems/gems/thor-0.19.4/lib/thor/actions/inject_into_file.rb +0 -103
- data/gems/gems/thor-0.19.4/lib/thor/base.rb +0 -656
- data/gems/gems/thor-0.19.4/lib/thor/command.rb +0 -133
- data/gems/gems/thor-0.19.4/lib/thor/core_ext/hash_with_indifferent_access.rb +0 -85
- data/gems/gems/thor-0.19.4/lib/thor/core_ext/io_binary_read.rb +0 -12
- data/gems/gems/thor-0.19.4/lib/thor/core_ext/ordered_hash.rb +0 -129
- data/gems/gems/thor-0.19.4/lib/thor/error.rb +0 -32
- data/gems/gems/thor-0.19.4/lib/thor/group.rb +0 -281
- data/gems/gems/thor-0.19.4/lib/thor/invocation.rb +0 -177
- data/gems/gems/thor-0.19.4/lib/thor/line_editor.rb +0 -17
- data/gems/gems/thor-0.19.4/lib/thor/line_editor/basic.rb +0 -35
- data/gems/gems/thor-0.19.4/lib/thor/line_editor/readline.rb +0 -88
- data/gems/gems/thor-0.19.4/lib/thor/parser.rb +0 -4
- data/gems/gems/thor-0.19.4/lib/thor/parser/argument.rb +0 -70
- data/gems/gems/thor-0.19.4/lib/thor/parser/arguments.rb +0 -175
- data/gems/gems/thor-0.19.4/lib/thor/parser/option.rb +0 -146
- data/gems/gems/thor-0.19.4/lib/thor/parser/options.rb +0 -220
- data/gems/gems/thor-0.19.4/lib/thor/rake_compat.rb +0 -71
- data/gems/gems/thor-0.19.4/lib/thor/runner.rb +0 -322
- data/gems/gems/thor-0.19.4/lib/thor/shell.rb +0 -81
- data/gems/gems/thor-0.19.4/lib/thor/shell/basic.rb +0 -436
- data/gems/gems/thor-0.19.4/lib/thor/shell/color.rb +0 -149
- data/gems/gems/thor-0.19.4/lib/thor/shell/html.rb +0 -126
- data/gems/gems/thor-0.19.4/lib/thor/util.rb +0 -268
- data/gems/gems/thor-0.19.4/lib/thor/version.rb +0 -3
- data/gems/gems/thor-0.19.4/thor.gemspec +0 -21
- data/gems/gems/unicode-0.4.4.4/README +0 -156
- data/gems/gems/unicode-0.4.4.4/Rakefile +0 -103
- data/gems/gems/unicode-0.4.4.4/ext/unicode/.sitearchdir.-.unicode.time +0 -0
- data/gems/gems/unicode-0.4.4.4/ext/unicode/Makefile +0 -264
- data/gems/gems/unicode-0.4.4.4/ext/unicode/extconf.rb +0 -3
- data/gems/gems/unicode-0.4.4.4/ext/unicode/unicode.c +0 -1325
- data/gems/gems/unicode-0.4.4.4/ext/unicode/unicode.o +0 -0
- data/gems/gems/unicode-0.4.4.4/ext/unicode/unicode_native.bundle +0 -0
- data/gems/gems/unicode-0.4.4.4/ext/unicode/unidata.map +0 -24555
- data/gems/gems/unicode-0.4.4.4/ext/unicode/ustring.c +0 -208
- data/gems/gems/unicode-0.4.4.4/ext/unicode/ustring.h +0 -48
- data/gems/gems/unicode-0.4.4.4/ext/unicode/ustring.o +0 -0
- data/gems/gems/unicode-0.4.4.4/ext/unicode/wstring.c +0 -257
- data/gems/gems/unicode-0.4.4.4/ext/unicode/wstring.h +0 -43
- data/gems/gems/unicode-0.4.4.4/ext/unicode/wstring.o +0 -0
- data/gems/gems/unicode-0.4.4.4/lib/unicode.rb +0 -6
- data/gems/gems/unicode-0.4.4.4/lib/unicode/unicode_native.bundle +0 -0
- data/gems/gems/unicode-0.4.4.4/test/test.rb +0 -69
- data/gems/gems/unicode-0.4.4.4/tools/README +0 -7
- data/gems/gems/unicode-0.4.4.4/tools/mkunidata.rb +0 -293
- data/gems/gems/unicode-0.4.4.4/tools/normtest.rb +0 -111
- data/gems/gems/unicode-0.4.4.4/unicode.gemspec +0 -30
- data/gems/specifications/bibtex-ruby-4.4.4.gemspec +0 -32
- data/gems/specifications/diff-lcs-1.3.gemspec +0 -61
- data/gems/specifications/latex-decode-0.2.2.gemspec +0 -35
- data/gems/specifications/rake-10.5.0.gemspec +0 -43
- data/gems/specifications/rspec-3.6.0.gemspec +0 -42
- data/gems/specifications/rspec-core-3.6.0.gemspec +0 -62
- data/gems/specifications/rspec-expectations-3.6.0.gemspec +0 -50
- data/gems/specifications/rspec-mocks-3.6.0.gemspec +0 -50
- data/gems/specifications/rspec-support-3.6.0.gemspec +0 -41
- data/gems/specifications/thor-0.19.4.gemspec +0 -35
- data/gems/specifications/unicode-0.4.4.4.gemspec +0 -25
@@ -1,82 +0,0 @@
|
|
1
|
-
RSpec::Support.require_rspec_mocks 'matchers/expectation_customization'
|
2
|
-
|
3
|
-
module RSpec
|
4
|
-
module Mocks
|
5
|
-
module Matchers
|
6
|
-
# @private
|
7
|
-
class ReceiveMessageChain
|
8
|
-
include Matcher
|
9
|
-
|
10
|
-
def initialize(chain, &block)
|
11
|
-
@chain = chain
|
12
|
-
@block = block
|
13
|
-
@recorded_customizations = []
|
14
|
-
end
|
15
|
-
|
16
|
-
[:with, :and_return, :and_throw, :and_raise, :and_yield, :and_call_original].each do |msg|
|
17
|
-
define_method(msg) do |*args, &block|
|
18
|
-
@recorded_customizations << ExpectationCustomization.new(msg, args, block)
|
19
|
-
self
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
def name
|
24
|
-
"receive_message_chain"
|
25
|
-
end
|
26
|
-
|
27
|
-
def description
|
28
|
-
"receive message chain #{formatted_chain}"
|
29
|
-
end
|
30
|
-
|
31
|
-
def setup_allowance(subject, &block)
|
32
|
-
chain = StubChain.stub_chain_on(subject, *@chain, &(@block || block))
|
33
|
-
replay_customizations(chain)
|
34
|
-
end
|
35
|
-
|
36
|
-
def setup_any_instance_allowance(subject, &block)
|
37
|
-
proxy = ::RSpec::Mocks.space.any_instance_proxy_for(subject)
|
38
|
-
chain = proxy.stub_chain(*@chain, &(@block || block))
|
39
|
-
replay_customizations(chain)
|
40
|
-
end
|
41
|
-
|
42
|
-
def setup_any_instance_expectation(subject, &block)
|
43
|
-
proxy = ::RSpec::Mocks.space.any_instance_proxy_for(subject)
|
44
|
-
chain = proxy.expect_chain(*@chain, &(@block || block))
|
45
|
-
replay_customizations(chain)
|
46
|
-
end
|
47
|
-
|
48
|
-
def setup_expectation(subject, &block)
|
49
|
-
chain = ExpectChain.expect_chain_on(subject, *@chain, &(@block || block))
|
50
|
-
replay_customizations(chain)
|
51
|
-
end
|
52
|
-
|
53
|
-
def setup_negative_expectation(*_args)
|
54
|
-
raise NegationUnsupportedError,
|
55
|
-
"`expect(...).not_to receive_message_chain` is not supported " \
|
56
|
-
"since it doesn't really make sense. What would it even mean?"
|
57
|
-
end
|
58
|
-
|
59
|
-
alias matches? setup_expectation
|
60
|
-
alias does_not_match? setup_negative_expectation
|
61
|
-
|
62
|
-
private
|
63
|
-
|
64
|
-
def replay_customizations(chain)
|
65
|
-
@recorded_customizations.each do |customization|
|
66
|
-
customization.playback_onto(chain)
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
def formatted_chain
|
71
|
-
@formatted_chain ||= @chain.map do |part|
|
72
|
-
if Hash === part
|
73
|
-
part.keys.first.to_s
|
74
|
-
else
|
75
|
-
part.to_s
|
76
|
-
end
|
77
|
-
end.join(".")
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
81
|
-
end
|
82
|
-
end
|
@@ -1,77 +0,0 @@
|
|
1
|
-
module RSpec
|
2
|
-
module Mocks
|
3
|
-
module Matchers
|
4
|
-
# @private
|
5
|
-
class ReceiveMessages
|
6
|
-
include Matcher
|
7
|
-
|
8
|
-
def initialize(message_return_value_hash)
|
9
|
-
@message_return_value_hash = message_return_value_hash
|
10
|
-
@backtrace_line = CallerFilter.first_non_rspec_line
|
11
|
-
end
|
12
|
-
|
13
|
-
def name
|
14
|
-
"receive_messages"
|
15
|
-
end
|
16
|
-
|
17
|
-
def description
|
18
|
-
"receive messages: #{@message_return_value_hash.inspect}"
|
19
|
-
end
|
20
|
-
|
21
|
-
def setup_expectation(subject)
|
22
|
-
warn_about_block if block_given?
|
23
|
-
each_message_on(proxy_on(subject)) do |host, message, return_value|
|
24
|
-
host.add_simple_expectation(message, return_value, @backtrace_line)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
alias matches? setup_expectation
|
28
|
-
|
29
|
-
def setup_negative_expectation(_subject)
|
30
|
-
raise NegationUnsupportedError,
|
31
|
-
"`expect(...).to_not receive_messages` is not supported since it " \
|
32
|
-
"doesn't really make sense. What would it even mean?"
|
33
|
-
end
|
34
|
-
alias does_not_match? setup_negative_expectation
|
35
|
-
|
36
|
-
def setup_allowance(subject)
|
37
|
-
warn_about_block if block_given?
|
38
|
-
each_message_on(proxy_on(subject)) do |host, message, return_value|
|
39
|
-
host.add_simple_stub(message, return_value)
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
def setup_any_instance_expectation(subject)
|
44
|
-
warn_about_block if block_given?
|
45
|
-
each_message_on(any_instance_of(subject)) do |host, message, return_value|
|
46
|
-
host.should_receive(message).and_return(return_value)
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
def setup_any_instance_allowance(subject)
|
51
|
-
warn_about_block if block_given?
|
52
|
-
any_instance_of(subject).stub(@message_return_value_hash)
|
53
|
-
end
|
54
|
-
|
55
|
-
def warn_about_block
|
56
|
-
raise "Implementation blocks aren't supported with `receive_messages`"
|
57
|
-
end
|
58
|
-
|
59
|
-
private
|
60
|
-
|
61
|
-
def proxy_on(subject)
|
62
|
-
::RSpec::Mocks.space.proxy_for(subject)
|
63
|
-
end
|
64
|
-
|
65
|
-
def any_instance_of(subject)
|
66
|
-
::RSpec::Mocks.space.any_instance_proxy_for(subject)
|
67
|
-
end
|
68
|
-
|
69
|
-
def each_message_on(host)
|
70
|
-
@message_return_value_hash.each do |message, value|
|
71
|
-
yield host, message, value
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|
@@ -1,87 +0,0 @@
|
|
1
|
-
module RSpec
|
2
|
-
module Mocks
|
3
|
-
# @private
|
4
|
-
class MessageChain
|
5
|
-
attr_reader :object, :chain, :block
|
6
|
-
|
7
|
-
def initialize(object, *chain, &blk)
|
8
|
-
@object = object
|
9
|
-
@chain, @block = format_chain(*chain, &blk)
|
10
|
-
end
|
11
|
-
|
12
|
-
# @api private
|
13
|
-
def setup_chain
|
14
|
-
if chain.length > 1
|
15
|
-
if (matching_stub = find_matching_stub)
|
16
|
-
chain.shift
|
17
|
-
chain_on(matching_stub.invoke(nil), *chain, &@block)
|
18
|
-
elsif (matching_expectation = find_matching_expectation)
|
19
|
-
chain.shift
|
20
|
-
chain_on(matching_expectation.invoke_without_incrementing_received_count(nil), *chain, &@block)
|
21
|
-
else
|
22
|
-
next_in_chain = Double.new
|
23
|
-
expectation(object, chain.shift) { next_in_chain }
|
24
|
-
chain_on(next_in_chain, *chain, &@block)
|
25
|
-
end
|
26
|
-
else
|
27
|
-
expectation(object, chain.shift, &@block)
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
private
|
32
|
-
|
33
|
-
def chain_on(object, *chain, &block)
|
34
|
-
initialize(object, *chain, &block)
|
35
|
-
setup_chain
|
36
|
-
end
|
37
|
-
|
38
|
-
def format_chain(*chain, &blk)
|
39
|
-
if Hash === chain.last
|
40
|
-
hash = chain.pop
|
41
|
-
hash.each do |k, v|
|
42
|
-
chain << k
|
43
|
-
blk = Proc.new { v }
|
44
|
-
end
|
45
|
-
end
|
46
|
-
return chain.join('.').split('.'), blk
|
47
|
-
end
|
48
|
-
|
49
|
-
def find_matching_stub
|
50
|
-
::RSpec::Mocks.space.proxy_for(object).
|
51
|
-
__send__(:find_matching_method_stub, chain.first.to_sym)
|
52
|
-
end
|
53
|
-
|
54
|
-
def find_matching_expectation
|
55
|
-
::RSpec::Mocks.space.proxy_for(object).
|
56
|
-
__send__(:find_matching_expectation, chain.first.to_sym)
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
# @private
|
61
|
-
class ExpectChain < MessageChain
|
62
|
-
# @api private
|
63
|
-
def self.expect_chain_on(object, *chain, &blk)
|
64
|
-
new(object, *chain, &blk).setup_chain
|
65
|
-
end
|
66
|
-
|
67
|
-
private
|
68
|
-
|
69
|
-
def expectation(object, message, &return_block)
|
70
|
-
::RSpec::Mocks.expect_message(object, message, {}, &return_block)
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
# @private
|
75
|
-
class StubChain < MessageChain
|
76
|
-
def self.stub_chain_on(object, *chain, &blk)
|
77
|
-
new(object, *chain, &blk).setup_chain
|
78
|
-
end
|
79
|
-
|
80
|
-
private
|
81
|
-
|
82
|
-
def expectation(object, message, &return_block)
|
83
|
-
::RSpec::Mocks.allow_message(object, message, {}, &return_block)
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|
@@ -1,740 +0,0 @@
|
|
1
|
-
module RSpec
|
2
|
-
module Mocks
|
3
|
-
# A message expectation that only allows concrete return values to be set
|
4
|
-
# for a message. While this same effect can be achieved using a standard
|
5
|
-
# MessageExpectation, this version is much faster and so can be used as an
|
6
|
-
# optimization.
|
7
|
-
#
|
8
|
-
# @private
|
9
|
-
class SimpleMessageExpectation
|
10
|
-
def initialize(message, response, error_generator, backtrace_line=nil)
|
11
|
-
@message, @response, @error_generator, @backtrace_line = message.to_sym, response, error_generator, backtrace_line
|
12
|
-
@received = false
|
13
|
-
end
|
14
|
-
|
15
|
-
def invoke(*_)
|
16
|
-
@received = true
|
17
|
-
@response
|
18
|
-
end
|
19
|
-
|
20
|
-
def matches?(message, *_)
|
21
|
-
@message == message.to_sym
|
22
|
-
end
|
23
|
-
|
24
|
-
def called_max_times?
|
25
|
-
false
|
26
|
-
end
|
27
|
-
|
28
|
-
def verify_messages_received
|
29
|
-
return if @received
|
30
|
-
@error_generator.raise_expectation_error(
|
31
|
-
@message, 1, ArgumentListMatcher::MATCH_ALL, 0, nil, [], @backtrace_line
|
32
|
-
)
|
33
|
-
end
|
34
|
-
|
35
|
-
def unadvise(_)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
# Represents an individual method stub or message expectation. The methods
|
40
|
-
# defined here can be used to configure how it behaves. The methods return
|
41
|
-
# `self` so that they can be chained together to form a fluent interface.
|
42
|
-
class MessageExpectation
|
43
|
-
# @!group Configuring Responses
|
44
|
-
|
45
|
-
# @overload and_return(value)
|
46
|
-
# @overload and_return(first_value, second_value)
|
47
|
-
#
|
48
|
-
# Tells the object to return a value when it receives the message. Given
|
49
|
-
# more than one value, the first value is returned the first time the
|
50
|
-
# message is received, the second value is returned the next time, etc,
|
51
|
-
# etc.
|
52
|
-
#
|
53
|
-
# If the message is received more times than there are values, the last
|
54
|
-
# value is received for every subsequent call.
|
55
|
-
#
|
56
|
-
# @return [nil] No further chaining is supported after this.
|
57
|
-
# @example
|
58
|
-
# allow(counter).to receive(:count).and_return(1)
|
59
|
-
# counter.count # => 1
|
60
|
-
# counter.count # => 1
|
61
|
-
#
|
62
|
-
# allow(counter).to receive(:count).and_return(1,2,3)
|
63
|
-
# counter.count # => 1
|
64
|
-
# counter.count # => 2
|
65
|
-
# counter.count # => 3
|
66
|
-
# counter.count # => 3
|
67
|
-
# counter.count # => 3
|
68
|
-
# # etc
|
69
|
-
def and_return(first_value, *values)
|
70
|
-
raise_already_invoked_error_if_necessary(__method__)
|
71
|
-
if negative?
|
72
|
-
raise "`and_return` is not supported with negative message expectations"
|
73
|
-
end
|
74
|
-
|
75
|
-
if block_given?
|
76
|
-
raise ArgumentError, "Implementation blocks aren't supported with `and_return`"
|
77
|
-
end
|
78
|
-
|
79
|
-
values.unshift(first_value)
|
80
|
-
@expected_received_count = [@expected_received_count, values.size].max unless ignoring_args? || (@expected_received_count == 0 && @at_least)
|
81
|
-
self.terminal_implementation_action = AndReturnImplementation.new(values)
|
82
|
-
|
83
|
-
nil
|
84
|
-
end
|
85
|
-
|
86
|
-
# Tells the object to delegate to the original unmodified method
|
87
|
-
# when it receives the message.
|
88
|
-
#
|
89
|
-
# @note This is only available on partial doubles.
|
90
|
-
#
|
91
|
-
# @return [nil] No further chaining is supported after this.
|
92
|
-
# @example
|
93
|
-
# expect(counter).to receive(:increment).and_call_original
|
94
|
-
# original_count = counter.count
|
95
|
-
# counter.increment
|
96
|
-
# expect(counter.count).to eq(original_count + 1)
|
97
|
-
def and_call_original
|
98
|
-
wrap_original(__method__) do |original, *args, &block|
|
99
|
-
original.call(*args, &block)
|
100
|
-
end
|
101
|
-
end
|
102
|
-
|
103
|
-
# Decorates the stubbed method with the supplied block. The original
|
104
|
-
# unmodified method is passed to the block along with any method call
|
105
|
-
# arguments so you can delegate to it, whilst still being able to
|
106
|
-
# change what args are passed to it and/or change the return value.
|
107
|
-
#
|
108
|
-
# @note This is only available on partial doubles.
|
109
|
-
#
|
110
|
-
# @return [nil] No further chaining is supported after this.
|
111
|
-
# @example
|
112
|
-
# expect(api).to receive(:large_list).and_wrap_original do |original_method, *args, &block|
|
113
|
-
# original_method.call(*args, &block).first(10)
|
114
|
-
# end
|
115
|
-
def and_wrap_original(&block)
|
116
|
-
wrap_original(__method__, &block)
|
117
|
-
end
|
118
|
-
|
119
|
-
# @overload and_raise
|
120
|
-
# @overload and_raise(ExceptionClass)
|
121
|
-
# @overload and_raise(ExceptionClass, message)
|
122
|
-
# @overload and_raise(exception_instance)
|
123
|
-
#
|
124
|
-
# Tells the object to raise an exception when the message is received.
|
125
|
-
#
|
126
|
-
# @return [nil] No further chaining is supported after this.
|
127
|
-
# @note
|
128
|
-
# When you pass an exception class, the MessageExpectation will raise
|
129
|
-
# an instance of it, creating it with `exception` and passing `message`
|
130
|
-
# if specified. If the exception class initializer requires more than
|
131
|
-
# one parameters, you must pass in an instance and not the class,
|
132
|
-
# otherwise this method will raise an ArgumentError exception.
|
133
|
-
#
|
134
|
-
# @example
|
135
|
-
# allow(car).to receive(:go).and_raise
|
136
|
-
# allow(car).to receive(:go).and_raise(OutOfGas)
|
137
|
-
# allow(car).to receive(:go).and_raise(OutOfGas, "At least 2 oz of gas needed to drive")
|
138
|
-
# allow(car).to receive(:go).and_raise(OutOfGas.new(2, :oz))
|
139
|
-
def and_raise(*args)
|
140
|
-
raise_already_invoked_error_if_necessary(__method__)
|
141
|
-
self.terminal_implementation_action = Proc.new { raise(*args) }
|
142
|
-
nil
|
143
|
-
end
|
144
|
-
|
145
|
-
# @overload and_throw(symbol)
|
146
|
-
# @overload and_throw(symbol, object)
|
147
|
-
#
|
148
|
-
# Tells the object to throw a symbol (with the object if that form is
|
149
|
-
# used) when the message is received.
|
150
|
-
#
|
151
|
-
# @return [nil] No further chaining is supported after this.
|
152
|
-
# @example
|
153
|
-
# allow(car).to receive(:go).and_throw(:out_of_gas)
|
154
|
-
# allow(car).to receive(:go).and_throw(:out_of_gas, :level => 0.1)
|
155
|
-
def and_throw(*args)
|
156
|
-
raise_already_invoked_error_if_necessary(__method__)
|
157
|
-
self.terminal_implementation_action = Proc.new { throw(*args) }
|
158
|
-
nil
|
159
|
-
end
|
160
|
-
|
161
|
-
# Tells the object to yield one or more args to a block when the message
|
162
|
-
# is received.
|
163
|
-
#
|
164
|
-
# @return [MessageExpectation] self, to support further chaining.
|
165
|
-
# @example
|
166
|
-
# stream.stub(:open).and_yield(StringIO.new)
|
167
|
-
def and_yield(*args, &block)
|
168
|
-
raise_already_invoked_error_if_necessary(__method__)
|
169
|
-
yield @eval_context = Object.new if block
|
170
|
-
|
171
|
-
# Initialize args to yield now that it's being used, see also: comment
|
172
|
-
# in constructor.
|
173
|
-
@args_to_yield ||= []
|
174
|
-
|
175
|
-
@args_to_yield << args
|
176
|
-
self.initial_implementation_action = AndYieldImplementation.new(@args_to_yield, @eval_context, @error_generator)
|
177
|
-
self
|
178
|
-
end
|
179
|
-
# @!endgroup
|
180
|
-
|
181
|
-
# @!group Constraining Receive Counts
|
182
|
-
|
183
|
-
# Constrain a message expectation to be received a specific number of
|
184
|
-
# times.
|
185
|
-
#
|
186
|
-
# @return [MessageExpectation] self, to support further chaining.
|
187
|
-
# @example
|
188
|
-
# expect(dealer).to receive(:deal_card).exactly(10).times
|
189
|
-
def exactly(n, &block)
|
190
|
-
raise_already_invoked_error_if_necessary(__method__)
|
191
|
-
self.inner_implementation_action = block
|
192
|
-
set_expected_received_count :exactly, n
|
193
|
-
self
|
194
|
-
end
|
195
|
-
|
196
|
-
# Constrain a message expectation to be received at least a specific
|
197
|
-
# number of times.
|
198
|
-
#
|
199
|
-
# @return [MessageExpectation] self, to support further chaining.
|
200
|
-
# @example
|
201
|
-
# expect(dealer).to receive(:deal_card).at_least(9).times
|
202
|
-
def at_least(n, &block)
|
203
|
-
raise_already_invoked_error_if_necessary(__method__)
|
204
|
-
set_expected_received_count :at_least, n
|
205
|
-
|
206
|
-
if n == 0
|
207
|
-
raise "at_least(0) has been removed, use allow(...).to receive(:message) instead"
|
208
|
-
end
|
209
|
-
|
210
|
-
self.inner_implementation_action = block
|
211
|
-
|
212
|
-
self
|
213
|
-
end
|
214
|
-
|
215
|
-
# Constrain a message expectation to be received at most a specific
|
216
|
-
# number of times.
|
217
|
-
#
|
218
|
-
# @return [MessageExpectation] self, to support further chaining.
|
219
|
-
# @example
|
220
|
-
# expect(dealer).to receive(:deal_card).at_most(10).times
|
221
|
-
def at_most(n, &block)
|
222
|
-
raise_already_invoked_error_if_necessary(__method__)
|
223
|
-
self.inner_implementation_action = block
|
224
|
-
set_expected_received_count :at_most, n
|
225
|
-
self
|
226
|
-
end
|
227
|
-
|
228
|
-
# Syntactic sugar for `exactly`, `at_least` and `at_most`
|
229
|
-
#
|
230
|
-
# @return [MessageExpectation] self, to support further chaining.
|
231
|
-
# @example
|
232
|
-
# expect(dealer).to receive(:deal_card).exactly(10).times
|
233
|
-
# expect(dealer).to receive(:deal_card).at_least(10).times
|
234
|
-
# expect(dealer).to receive(:deal_card).at_most(10).times
|
235
|
-
def times(&block)
|
236
|
-
self.inner_implementation_action = block
|
237
|
-
self
|
238
|
-
end
|
239
|
-
|
240
|
-
# Expect a message not to be received at all.
|
241
|
-
#
|
242
|
-
# @return [MessageExpectation] self, to support further chaining.
|
243
|
-
# @example
|
244
|
-
# expect(car).to receive(:stop).never
|
245
|
-
def never
|
246
|
-
error_generator.raise_double_negation_error("expect(obj)") if negative?
|
247
|
-
@expected_received_count = 0
|
248
|
-
self
|
249
|
-
end
|
250
|
-
|
251
|
-
# Expect a message to be received exactly one time.
|
252
|
-
#
|
253
|
-
# @return [MessageExpectation] self, to support further chaining.
|
254
|
-
# @example
|
255
|
-
# expect(car).to receive(:go).once
|
256
|
-
def once(&block)
|
257
|
-
self.inner_implementation_action = block
|
258
|
-
set_expected_received_count :exactly, 1
|
259
|
-
self
|
260
|
-
end
|
261
|
-
|
262
|
-
# Expect a message to be received exactly two times.
|
263
|
-
#
|
264
|
-
# @return [MessageExpectation] self, to support further chaining.
|
265
|
-
# @example
|
266
|
-
# expect(car).to receive(:go).twice
|
267
|
-
def twice(&block)
|
268
|
-
self.inner_implementation_action = block
|
269
|
-
set_expected_received_count :exactly, 2
|
270
|
-
self
|
271
|
-
end
|
272
|
-
|
273
|
-
# Expect a message to be received exactly three times.
|
274
|
-
#
|
275
|
-
# @return [MessageExpectation] self, to support further chaining.
|
276
|
-
# @example
|
277
|
-
# expect(car).to receive(:go).thrice
|
278
|
-
def thrice(&block)
|
279
|
-
self.inner_implementation_action = block
|
280
|
-
set_expected_received_count :exactly, 3
|
281
|
-
self
|
282
|
-
end
|
283
|
-
# @!endgroup
|
284
|
-
|
285
|
-
# @!group Other Constraints
|
286
|
-
|
287
|
-
# Constrains a stub or message expectation to invocations with specific
|
288
|
-
# arguments.
|
289
|
-
#
|
290
|
-
# With a stub, if the message might be received with other args as well,
|
291
|
-
# you should stub a default value first, and then stub or mock the same
|
292
|
-
# message using `with` to constrain to specific arguments.
|
293
|
-
#
|
294
|
-
# A message expectation will fail if the message is received with different
|
295
|
-
# arguments.
|
296
|
-
#
|
297
|
-
# @return [MessageExpectation] self, to support further chaining.
|
298
|
-
# @example
|
299
|
-
# allow(cart).to receive(:add) { :failure }
|
300
|
-
# allow(cart).to receive(:add).with(Book.new(:isbn => 1934356379)) { :success }
|
301
|
-
# cart.add(Book.new(:isbn => 1234567890))
|
302
|
-
# # => :failure
|
303
|
-
# cart.add(Book.new(:isbn => 1934356379))
|
304
|
-
# # => :success
|
305
|
-
#
|
306
|
-
# expect(cart).to receive(:add).with(Book.new(:isbn => 1934356379)) { :success }
|
307
|
-
# cart.add(Book.new(:isbn => 1234567890))
|
308
|
-
# # => failed expectation
|
309
|
-
# cart.add(Book.new(:isbn => 1934356379))
|
310
|
-
# # => passes
|
311
|
-
def with(*args, &block)
|
312
|
-
raise_already_invoked_error_if_necessary(__method__)
|
313
|
-
if args.empty?
|
314
|
-
raise ArgumentError,
|
315
|
-
"`with` must have at least one argument. Use `no_args` matcher to set the expectation of receiving no arguments."
|
316
|
-
end
|
317
|
-
|
318
|
-
self.inner_implementation_action = block
|
319
|
-
@argument_list_matcher = ArgumentListMatcher.new(*args)
|
320
|
-
self
|
321
|
-
end
|
322
|
-
|
323
|
-
# Expect messages to be received in a specific order.
|
324
|
-
#
|
325
|
-
# @return [MessageExpectation] self, to support further chaining.
|
326
|
-
# @example
|
327
|
-
# expect(api).to receive(:prepare).ordered
|
328
|
-
# expect(api).to receive(:run).ordered
|
329
|
-
# expect(api).to receive(:finish).ordered
|
330
|
-
def ordered(&block)
|
331
|
-
if type == :stub
|
332
|
-
RSpec.warning(
|
333
|
-
"`allow(...).to receive(..).ordered` is not supported and will " \
|
334
|
-
"have no effect, use `and_return(*ordered_values)` instead."
|
335
|
-
)
|
336
|
-
end
|
337
|
-
|
338
|
-
self.inner_implementation_action = block
|
339
|
-
additional_expected_calls.times do
|
340
|
-
@order_group.register(self)
|
341
|
-
end
|
342
|
-
@ordered = true
|
343
|
-
self
|
344
|
-
end
|
345
|
-
|
346
|
-
# @return [String] a nice representation of the message expectation
|
347
|
-
def to_s
|
348
|
-
args_description = error_generator.method_call_args_description(@argument_list_matcher.expected_args, "", "") { true }
|
349
|
-
args_description = "(#{args_description})" unless args_description.start_with?("(")
|
350
|
-
"#<#{self.class} #{error_generator.intro}.#{message}#{args_description}>"
|
351
|
-
end
|
352
|
-
alias inspect to_s
|
353
|
-
|
354
|
-
# @private
|
355
|
-
# Contains the parts of `MessageExpectation` that aren't part of
|
356
|
-
# rspec-mocks' public API. The class is very big and could really use
|
357
|
-
# some collaborators it delegates to for this stuff but for now this was
|
358
|
-
# the simplest way to split the public from private stuff to make it
|
359
|
-
# easier to publish the docs for the APIs we want published.
|
360
|
-
module ImplementationDetails
|
361
|
-
attr_accessor :error_generator, :implementation
|
362
|
-
attr_reader :message
|
363
|
-
attr_reader :orig_object
|
364
|
-
attr_writer :expected_received_count, :expected_from, :argument_list_matcher
|
365
|
-
protected :expected_received_count=, :expected_from=, :error_generator, :error_generator=, :implementation=
|
366
|
-
|
367
|
-
# @private
|
368
|
-
attr_reader :type
|
369
|
-
|
370
|
-
# rubocop:disable Style/ParameterLists
|
371
|
-
def initialize(error_generator, expectation_ordering, expected_from, method_double,
|
372
|
-
type=:expectation, opts={}, &implementation_block)
|
373
|
-
@type = type
|
374
|
-
@error_generator = error_generator
|
375
|
-
@error_generator.opts = opts
|
376
|
-
@expected_from = expected_from
|
377
|
-
@method_double = method_double
|
378
|
-
@orig_object = @method_double.object
|
379
|
-
@message = @method_double.method_name
|
380
|
-
@actual_received_count = 0
|
381
|
-
@expected_received_count = type == :expectation ? 1 : :any
|
382
|
-
@argument_list_matcher = ArgumentListMatcher::MATCH_ALL
|
383
|
-
@order_group = expectation_ordering
|
384
|
-
@order_group.register(self) unless type == :stub
|
385
|
-
@expectation_type = type
|
386
|
-
@ordered = false
|
387
|
-
@at_least = @at_most = @exactly = nil
|
388
|
-
|
389
|
-
# Initialized to nil so that we don't allocate an array for every
|
390
|
-
# mock or stub. See also comment in `and_yield`.
|
391
|
-
@args_to_yield = nil
|
392
|
-
@eval_context = nil
|
393
|
-
@yield_receiver_to_implementation_block = false
|
394
|
-
|
395
|
-
@implementation = Implementation.new
|
396
|
-
self.inner_implementation_action = implementation_block
|
397
|
-
end
|
398
|
-
# rubocop:enable Style/ParameterLists
|
399
|
-
|
400
|
-
def expected_args
|
401
|
-
@argument_list_matcher.expected_args
|
402
|
-
end
|
403
|
-
|
404
|
-
def and_yield_receiver_to_implementation
|
405
|
-
@yield_receiver_to_implementation_block = true
|
406
|
-
self
|
407
|
-
end
|
408
|
-
|
409
|
-
def yield_receiver_to_implementation_block?
|
410
|
-
@yield_receiver_to_implementation_block
|
411
|
-
end
|
412
|
-
|
413
|
-
def matches?(message, *args)
|
414
|
-
@message == message && @argument_list_matcher.args_match?(*args)
|
415
|
-
end
|
416
|
-
|
417
|
-
def safe_invoke(parent_stub, *args, &block)
|
418
|
-
invoke_incrementing_actual_calls_by(1, false, parent_stub, *args, &block)
|
419
|
-
end
|
420
|
-
|
421
|
-
def invoke(parent_stub, *args, &block)
|
422
|
-
invoke_incrementing_actual_calls_by(1, true, parent_stub, *args, &block)
|
423
|
-
end
|
424
|
-
|
425
|
-
def invoke_without_incrementing_received_count(parent_stub, *args, &block)
|
426
|
-
invoke_incrementing_actual_calls_by(0, true, parent_stub, *args, &block)
|
427
|
-
end
|
428
|
-
|
429
|
-
def negative?
|
430
|
-
@expected_received_count == 0 && !@at_least
|
431
|
-
end
|
432
|
-
|
433
|
-
def called_max_times?
|
434
|
-
@expected_received_count != :any &&
|
435
|
-
!@at_least &&
|
436
|
-
@expected_received_count > 0 &&
|
437
|
-
@actual_received_count >= @expected_received_count
|
438
|
-
end
|
439
|
-
|
440
|
-
def matches_name_but_not_args(message, *args)
|
441
|
-
@message == message && !@argument_list_matcher.args_match?(*args)
|
442
|
-
end
|
443
|
-
|
444
|
-
def verify_messages_received
|
445
|
-
return if expected_messages_received?
|
446
|
-
generate_error
|
447
|
-
end
|
448
|
-
|
449
|
-
def expected_messages_received?
|
450
|
-
ignoring_args? || matches_exact_count? || matches_at_least_count? || matches_at_most_count?
|
451
|
-
end
|
452
|
-
|
453
|
-
def ensure_expected_ordering_received!
|
454
|
-
@order_group.verify_invocation_order(self) if @ordered
|
455
|
-
true
|
456
|
-
end
|
457
|
-
|
458
|
-
def ignoring_args?
|
459
|
-
@expected_received_count == :any
|
460
|
-
end
|
461
|
-
|
462
|
-
def matches_at_least_count?
|
463
|
-
@at_least && @actual_received_count >= @expected_received_count
|
464
|
-
end
|
465
|
-
|
466
|
-
def matches_at_most_count?
|
467
|
-
@at_most && @actual_received_count <= @expected_received_count
|
468
|
-
end
|
469
|
-
|
470
|
-
def matches_exact_count?
|
471
|
-
@expected_received_count == @actual_received_count
|
472
|
-
end
|
473
|
-
|
474
|
-
def similar_messages
|
475
|
-
@similar_messages ||= []
|
476
|
-
end
|
477
|
-
|
478
|
-
def advise(*args)
|
479
|
-
similar_messages << args
|
480
|
-
end
|
481
|
-
|
482
|
-
def unadvise(args)
|
483
|
-
similar_messages.delete_if { |message| args.include?(message) }
|
484
|
-
end
|
485
|
-
|
486
|
-
def generate_error
|
487
|
-
if similar_messages.empty?
|
488
|
-
@error_generator.raise_expectation_error(
|
489
|
-
@message, @expected_received_count, @argument_list_matcher,
|
490
|
-
@actual_received_count, expectation_count_type, expected_args,
|
491
|
-
@expected_from, exception_source_id
|
492
|
-
)
|
493
|
-
else
|
494
|
-
@error_generator.raise_similar_message_args_error(
|
495
|
-
self, @similar_messages, @expected_from
|
496
|
-
)
|
497
|
-
end
|
498
|
-
end
|
499
|
-
|
500
|
-
def raise_unexpected_message_args_error(args_for_multiple_calls)
|
501
|
-
@error_generator.raise_unexpected_message_args_error(self, args_for_multiple_calls, exception_source_id)
|
502
|
-
end
|
503
|
-
|
504
|
-
def expectation_count_type
|
505
|
-
return :at_least if @at_least
|
506
|
-
return :at_most if @at_most
|
507
|
-
nil
|
508
|
-
end
|
509
|
-
|
510
|
-
def description_for(verb)
|
511
|
-
@error_generator.describe_expectation(
|
512
|
-
verb, @message, @expected_received_count,
|
513
|
-
@actual_received_count, expected_args
|
514
|
-
)
|
515
|
-
end
|
516
|
-
|
517
|
-
def raise_out_of_order_error
|
518
|
-
@error_generator.raise_out_of_order_error @message
|
519
|
-
end
|
520
|
-
|
521
|
-
def additional_expected_calls
|
522
|
-
return 0 if @expectation_type == :stub || !@exactly
|
523
|
-
@expected_received_count - 1
|
524
|
-
end
|
525
|
-
|
526
|
-
def ordered?
|
527
|
-
@ordered
|
528
|
-
end
|
529
|
-
|
530
|
-
def negative_expectation_for?(message)
|
531
|
-
@message == message && negative?
|
532
|
-
end
|
533
|
-
|
534
|
-
def actual_received_count_matters?
|
535
|
-
@at_least || @at_most || @exactly
|
536
|
-
end
|
537
|
-
|
538
|
-
def increase_actual_received_count!
|
539
|
-
@actual_received_count += 1
|
540
|
-
end
|
541
|
-
|
542
|
-
private
|
543
|
-
|
544
|
-
def exception_source_id
|
545
|
-
@exception_source_id ||= "#{self.class.name} #{__id__}"
|
546
|
-
end
|
547
|
-
|
548
|
-
def invoke_incrementing_actual_calls_by(increment, allowed_to_fail, parent_stub, *args, &block)
|
549
|
-
args.unshift(orig_object) if yield_receiver_to_implementation_block?
|
550
|
-
|
551
|
-
if negative? || (allowed_to_fail && (@exactly || @at_most) && (@actual_received_count == @expected_received_count))
|
552
|
-
# args are the args we actually received, @argument_list_matcher is the
|
553
|
-
# list of args we were expecting
|
554
|
-
@error_generator.raise_expectation_error(
|
555
|
-
@message, @expected_received_count,
|
556
|
-
@argument_list_matcher,
|
557
|
-
@actual_received_count + increment,
|
558
|
-
expectation_count_type, args, nil, exception_source_id
|
559
|
-
)
|
560
|
-
end
|
561
|
-
|
562
|
-
@order_group.handle_order_constraint self
|
563
|
-
|
564
|
-
if implementation.present?
|
565
|
-
implementation.call(*args, &block)
|
566
|
-
elsif parent_stub
|
567
|
-
parent_stub.invoke(nil, *args, &block)
|
568
|
-
end
|
569
|
-
ensure
|
570
|
-
@actual_received_count += increment
|
571
|
-
end
|
572
|
-
|
573
|
-
def has_been_invoked?
|
574
|
-
@actual_received_count > 0
|
575
|
-
end
|
576
|
-
|
577
|
-
def raise_already_invoked_error_if_necessary(calling_customization)
|
578
|
-
return unless has_been_invoked?
|
579
|
-
|
580
|
-
error_generator.raise_already_invoked_error(message, calling_customization)
|
581
|
-
end
|
582
|
-
|
583
|
-
def set_expected_received_count(relativity, n)
|
584
|
-
@at_least = (relativity == :at_least)
|
585
|
-
@at_most = (relativity == :at_most)
|
586
|
-
@exactly = (relativity == :exactly)
|
587
|
-
@expected_received_count = case n
|
588
|
-
when Numeric then n
|
589
|
-
when :once then 1
|
590
|
-
when :twice then 2
|
591
|
-
when :thrice then 3
|
592
|
-
end
|
593
|
-
end
|
594
|
-
|
595
|
-
def initial_implementation_action=(action)
|
596
|
-
implementation.initial_action = action
|
597
|
-
end
|
598
|
-
|
599
|
-
def inner_implementation_action=(action)
|
600
|
-
return unless action
|
601
|
-
warn_about_stub_override if implementation.inner_action
|
602
|
-
implementation.inner_action = action
|
603
|
-
end
|
604
|
-
|
605
|
-
def terminal_implementation_action=(action)
|
606
|
-
implementation.terminal_action = action
|
607
|
-
end
|
608
|
-
|
609
|
-
def warn_about_stub_override
|
610
|
-
RSpec.warning(
|
611
|
-
"You're overriding a previous stub implementation of `#{@message}`. " \
|
612
|
-
"Called from #{CallerFilter.first_non_rspec_line}."
|
613
|
-
)
|
614
|
-
end
|
615
|
-
|
616
|
-
def wrap_original(method_name, &block)
|
617
|
-
if RSpec::Mocks::TestDouble === @method_double.object
|
618
|
-
@error_generator.raise_only_valid_on_a_partial_double(method_name)
|
619
|
-
else
|
620
|
-
warn_about_stub_override if implementation.inner_action
|
621
|
-
@implementation = AndWrapOriginalImplementation.new(@method_double.original_implementation_callable, block)
|
622
|
-
@yield_receiver_to_implementation_block = false
|
623
|
-
end
|
624
|
-
|
625
|
-
nil
|
626
|
-
end
|
627
|
-
end
|
628
|
-
|
629
|
-
include ImplementationDetails
|
630
|
-
end
|
631
|
-
|
632
|
-
# Handles the implementation of an `and_yield` declaration.
|
633
|
-
# @private
|
634
|
-
class AndYieldImplementation
|
635
|
-
def initialize(args_to_yield, eval_context, error_generator)
|
636
|
-
@args_to_yield = args_to_yield
|
637
|
-
@eval_context = eval_context
|
638
|
-
@error_generator = error_generator
|
639
|
-
end
|
640
|
-
|
641
|
-
def call(*_args_to_ignore, &block)
|
642
|
-
return if @args_to_yield.empty? && @eval_context.nil?
|
643
|
-
|
644
|
-
@error_generator.raise_missing_block_error @args_to_yield unless block
|
645
|
-
value = nil
|
646
|
-
block_signature = Support::BlockSignature.new(block)
|
647
|
-
|
648
|
-
@args_to_yield.each do |args|
|
649
|
-
unless Support::StrictSignatureVerifier.new(block_signature, args).valid?
|
650
|
-
@error_generator.raise_wrong_arity_error(args, block_signature)
|
651
|
-
end
|
652
|
-
|
653
|
-
value = @eval_context ? @eval_context.instance_exec(*args, &block) : block.call(*args)
|
654
|
-
end
|
655
|
-
value
|
656
|
-
end
|
657
|
-
end
|
658
|
-
|
659
|
-
# Handles the implementation of an `and_return` implementation.
|
660
|
-
# @private
|
661
|
-
class AndReturnImplementation
|
662
|
-
def initialize(values_to_return)
|
663
|
-
@values_to_return = values_to_return
|
664
|
-
end
|
665
|
-
|
666
|
-
def call(*_args_to_ignore, &_block)
|
667
|
-
if @values_to_return.size > 1
|
668
|
-
@values_to_return.shift
|
669
|
-
else
|
670
|
-
@values_to_return.first
|
671
|
-
end
|
672
|
-
end
|
673
|
-
end
|
674
|
-
|
675
|
-
# Represents a configured implementation. Takes into account
|
676
|
-
# any number of sub-implementations.
|
677
|
-
# @private
|
678
|
-
class Implementation
|
679
|
-
attr_accessor :initial_action, :inner_action, :terminal_action
|
680
|
-
|
681
|
-
def call(*args, &block)
|
682
|
-
actions.map do |action|
|
683
|
-
action.call(*args, &block)
|
684
|
-
end.last
|
685
|
-
end
|
686
|
-
|
687
|
-
def present?
|
688
|
-
actions.any?
|
689
|
-
end
|
690
|
-
|
691
|
-
private
|
692
|
-
|
693
|
-
def actions
|
694
|
-
[initial_action, inner_action, terminal_action].compact
|
695
|
-
end
|
696
|
-
end
|
697
|
-
|
698
|
-
# Represents an `and_call_original` implementation.
|
699
|
-
# @private
|
700
|
-
class AndWrapOriginalImplementation
|
701
|
-
def initialize(method, block)
|
702
|
-
@method = method
|
703
|
-
@block = block
|
704
|
-
end
|
705
|
-
|
706
|
-
CannotModifyFurtherError = Class.new(StandardError)
|
707
|
-
|
708
|
-
def initial_action=(_value)
|
709
|
-
raise cannot_modify_further_error
|
710
|
-
end
|
711
|
-
|
712
|
-
def inner_action=(_value)
|
713
|
-
raise cannot_modify_further_error
|
714
|
-
end
|
715
|
-
|
716
|
-
def terminal_action=(_value)
|
717
|
-
raise cannot_modify_further_error
|
718
|
-
end
|
719
|
-
|
720
|
-
def present?
|
721
|
-
true
|
722
|
-
end
|
723
|
-
|
724
|
-
def inner_action
|
725
|
-
true
|
726
|
-
end
|
727
|
-
|
728
|
-
def call(*args, &block)
|
729
|
-
@block.call(@method, *args, &block)
|
730
|
-
end
|
731
|
-
|
732
|
-
private
|
733
|
-
|
734
|
-
def cannot_modify_further_error
|
735
|
-
CannotModifyFurtherError.new "This method has already been configured " \
|
736
|
-
"to call the original implementation, and cannot be modified further."
|
737
|
-
end
|
738
|
-
end
|
739
|
-
end
|
740
|
-
end
|