lunchmoney 1.3.0 → 1.4.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 +4 -4
- data/.github/dependabot.yml +7 -0
- data/.github/workflows/build_and_publish_yard_docs.yml +2 -2
- data/.github/workflows/ci.yml +1 -1
- data/.ruby-version +1 -1
- data/.simplecov +2 -2
- data/Gemfile +2 -3
- data/Gemfile.lock +90 -84
- data/lib/lunchmoney/api.rb +1 -0
- data/lib/lunchmoney/calls/categories.rb +0 -2
- data/lib/lunchmoney/calls/transactions.rb +0 -1
- data/lib/lunchmoney/deprecate.rb +35 -0
- data/lib/lunchmoney/objects/asset.rb +6 -1
- data/lib/lunchmoney/objects/plaid_account.rb +6 -1
- data/lib/lunchmoney/objects/transaction.rb +9 -1
- data/lib/lunchmoney/version.rb +1 -1
- data/sorbet/rbi/annotations/activesupport.rbi +36 -0
- data/sorbet/rbi/annotations/minitest.rbi +119 -0
- data/sorbet/rbi/gems/{activesupport@7.1.3.2.rbi → activesupport@7.2.2.1.rbi} +1407 -1292
- data/sorbet/rbi/gems/{addressable@2.8.6.rbi → addressable@2.8.7.rbi} +2 -1
- data/sorbet/rbi/gems/benchmark@0.4.0.rbi +618 -0
- data/sorbet/rbi/gems/{bigdecimal@3.1.7.rbi → bigdecimal@3.1.9.rbi} +1 -0
- data/sorbet/rbi/gems/{chef-utils@18.4.2.rbi → chef-utils@18.5.0.rbi} +1 -0
- data/sorbet/rbi/gems/{concurrent-ruby@1.2.3.rbi → concurrent-ruby@1.3.5.rbi} +108 -41
- data/sorbet/rbi/gems/{connection_pool@2.4.1.rbi → connection_pool@2.5.0.rbi} +1 -0
- data/sorbet/rbi/gems/{docile@1.4.0.rbi → docile@1.4.1.rbi} +1 -0
- data/sorbet/rbi/gems/{dotenv@3.1.2.rbi → dotenv@3.1.7.rbi} +21 -29
- data/sorbet/rbi/gems/{erubi@1.12.0.rbi → erubi@1.13.1.rbi} +25 -15
- data/sorbet/rbi/gems/{faraday-net_http@3.1.0.rbi → faraday-net_http@3.4.0.rbi} +30 -29
- data/sorbet/rbi/gems/{faraday@2.9.0.rbi → faraday@2.12.2.rbi} +104 -49
- data/sorbet/rbi/gems/{hashdiff@1.1.0.rbi → hashdiff@1.1.2.rbi} +3 -2
- data/sorbet/rbi/gems/{i18n@1.14.4.rbi → i18n@1.14.7.rbi} +109 -80
- data/sorbet/rbi/gems/{json@2.7.2.rbi → json@2.10.2.rbi} +697 -146
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.4.rbi +9 -0
- data/sorbet/rbi/gems/logger@1.6.6.rbi +940 -0
- data/sorbet/rbi/gems/{minitest@5.22.3.rbi → minitest@5.25.5.rbi} +319 -302
- data/sorbet/rbi/gems/{mixlib-shellout@3.2.7.rbi → mixlib-shellout@3.2.8.rbi} +1 -0
- data/sorbet/rbi/gems/{mocha@2.2.0.rbi → mocha@2.7.1.rbi} +174 -149
- data/sorbet/rbi/gems/{net-http@0.4.1.rbi → net-http@0.6.0.rbi} +360 -181
- data/sorbet/rbi/gems/{parallel@1.24.0.rbi → parallel@1.26.3.rbi} +32 -21
- data/sorbet/rbi/gems/{parser@3.3.1.0.rbi → parser@3.3.7.1.rbi} +256 -203
- data/sorbet/rbi/gems/{prism@0.29.0.rbi → prism@1.4.0.rbi} +15882 -12137
- data/sorbet/rbi/gems/{public_suffix@5.0.4.rbi → public_suffix@6.0.1.rbi} +1 -0
- data/sorbet/rbi/gems/{racc@1.7.3.rbi → racc@1.8.1.rbi} +34 -33
- data/sorbet/rbi/gems/{rack@3.0.10.rbi → rack@3.1.9.rbi} +704 -989
- data/sorbet/rbi/gems/{rake@13.1.0.rbi → rake@13.2.1.rbi} +56 -55
- data/sorbet/rbi/gems/rbi@0.3.1.rbi +6599 -0
- data/sorbet/rbi/gems/rbs@3.9.0.rbi +6978 -0
- data/sorbet/rbi/gems/{regexp_parser@2.9.1.rbi → regexp_parser@2.10.0.rbi} +195 -172
- data/sorbet/rbi/gems/{rexml@3.2.6.rbi → rexml@3.4.1.rbi} +844 -279
- data/sorbet/rbi/gems/{rubocop-ast@1.31.3.rbi → rubocop-ast@1.38.0.rbi} +1380 -732
- data/sorbet/rbi/gems/{rubocop-minitest@0.35.0.rbi → rubocop-minitest@0.36.0.rbi} +13 -10
- data/sorbet/rbi/gems/{rubocop-rails@2.24.1.rbi → rubocop-rails@2.29.1.rbi} +9604 -6343
- data/sorbet/rbi/gems/{rubocop-sorbet@0.8.3.rbi → rubocop-sorbet@0.8.7.rbi} +168 -67
- data/sorbet/rbi/gems/{rubocop@1.63.5.rbi → rubocop@1.71.2.rbi} +6831 -4378
- data/sorbet/rbi/gems/securerandom@0.4.1.rbi +75 -0
- data/sorbet/rbi/gems/spoom@1.6.1.rbi +7274 -0
- data/sorbet/rbi/gems/{tapioca@0.14.1.rbi → tapioca@0.16.11.rbi} +471 -384
- data/sorbet/rbi/gems/{thor@1.3.1.rbi → thor@1.3.2.rbi} +58 -31
- data/sorbet/rbi/gems/{toys-core@0.15.5.rbi → toys-core@0.15.6.rbi} +1 -0
- data/sorbet/rbi/gems/{toys@0.15.5.rbi → toys@0.15.6.rbi} +4 -3
- data/sorbet/rbi/gems/unicode-display_width@3.1.4.rbi +132 -0
- data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +251 -0
- data/sorbet/rbi/gems/{uri@0.13.0.rbi → uri@1.0.3.rbi} +278 -256
- data/sorbet/rbi/gems/{vcr@6.2.0.rbi → vcr@6.3.1.rbi} +72 -68
- data/sorbet/rbi/gems/{webmock@3.23.0.rbi → webmock@3.25.1.rbi} +102 -78
- data/sorbet/rbi/gems/{yard-sorbet@0.8.1.rbi → yard-sorbet@0.9.0.rbi} +36 -29
- data/sorbet/rbi/gems/{yard@0.9.36.rbi → yard@0.9.37.rbi} +394 -235
- metadata +55 -58
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -3426
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +0 -14237
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -272
- data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +0 -93
- data/sorbet/rbi/gems/pry-sorbet@0.2.1.rbi +0 -966
- data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -10077
- data/sorbet/rbi/gems/rbi@0.1.13.rbi +0 -3078
- data/sorbet/rbi/gems/spoom@1.3.2.rbi +0 -4421
- data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +0 -65
@@ -4,7 +4,8 @@
|
|
4
4
|
# This is an autogenerated file for types exported from the `mocha` gem.
|
5
5
|
# Please instead update this file by running `bin/tapioca gem mocha`.
|
6
6
|
|
7
|
-
|
7
|
+
|
8
|
+
# source://mocha//lib/mocha/inspect.rb#56
|
8
9
|
class Array
|
9
10
|
include ::Enumerable
|
10
11
|
include ::Mocha::Inspect::ArrayMethods
|
@@ -14,23 +15,16 @@ class Class < ::Module
|
|
14
15
|
include ::Mocha::ClassMethods
|
15
16
|
end
|
16
17
|
|
17
|
-
# source://mocha//lib/mocha/inspect.rb#
|
18
|
+
# source://mocha//lib/mocha/inspect.rb#68
|
18
19
|
class Date
|
19
20
|
include ::Comparable
|
20
21
|
include ::Mocha::Inspect::DateMethods
|
21
22
|
end
|
22
23
|
|
23
|
-
#
|
24
|
-
#
|
25
|
-
# source://mocha//lib/mocha/parameter_matchers/instance_methods.rb#22
|
24
|
+
# source://mocha//lib/mocha/inspect.rb#60
|
26
25
|
class Hash
|
27
26
|
include ::Enumerable
|
28
27
|
include ::Mocha::Inspect::HashMethods
|
29
|
-
|
30
|
-
# @private
|
31
|
-
#
|
32
|
-
# source://mocha//lib/mocha/parameter_matchers/instance_methods.rb#24
|
33
|
-
def to_matcher(expectation = T.unsafe(nil)); end
|
34
28
|
end
|
35
29
|
|
36
30
|
class Minitest::Test < ::Minitest::Runnable
|
@@ -45,7 +39,7 @@ module Mocha
|
|
45
39
|
class << self
|
46
40
|
# @private
|
47
41
|
#
|
48
|
-
# source://mocha//lib/mocha/configuration.rb#
|
42
|
+
# source://mocha//lib/mocha/configuration.rb#25
|
49
43
|
def configuration; end
|
50
44
|
|
51
45
|
# Allows setting of configuration options. See {Configuration} for the available options.
|
@@ -61,7 +55,7 @@ module Mocha
|
|
61
55
|
# @see Configuration
|
62
56
|
# @yieldparam configuration [Configuration] the configuration for modification
|
63
57
|
#
|
64
|
-
# source://mocha//lib/mocha/configuration.rb#
|
58
|
+
# source://mocha//lib/mocha/configuration.rb#20
|
65
59
|
def configure; end
|
66
60
|
end
|
67
61
|
end
|
@@ -325,15 +319,15 @@ class Mocha::Cardinality
|
|
325
319
|
# source://mocha//lib/mocha/cardinality.rb#29
|
326
320
|
def <<(invocation); end
|
327
321
|
|
328
|
-
# source://mocha//lib/mocha/cardinality.rb#
|
322
|
+
# source://mocha//lib/mocha/cardinality.rb#83
|
329
323
|
def actual_invocations; end
|
330
324
|
|
331
325
|
# @return [Boolean]
|
332
326
|
#
|
333
|
-
# source://mocha//lib/mocha/cardinality.rb#
|
327
|
+
# source://mocha//lib/mocha/cardinality.rb#53
|
334
328
|
def allowed_any_number_of_times?; end
|
335
329
|
|
336
|
-
# source://mocha//lib/mocha/cardinality.rb#
|
330
|
+
# source://mocha//lib/mocha/cardinality.rb#62
|
337
331
|
def anticipated_times; end
|
338
332
|
|
339
333
|
# source://mocha//lib/mocha/cardinality.rb#14
|
@@ -350,17 +344,22 @@ class Mocha::Cardinality
|
|
350
344
|
# source://mocha//lib/mocha/cardinality.rb#33
|
351
345
|
def invocations_allowed?; end
|
352
346
|
|
353
|
-
#
|
347
|
+
# @return [Boolean]
|
348
|
+
#
|
349
|
+
# source://mocha//lib/mocha/cardinality.rb#37
|
350
|
+
def invocations_never_allowed?; end
|
351
|
+
|
352
|
+
# source://mocha//lib/mocha/cardinality.rb#79
|
354
353
|
def invoked_times; end
|
355
354
|
|
356
355
|
# @return [Boolean]
|
357
356
|
#
|
358
|
-
# source://mocha//lib/mocha/cardinality.rb#
|
357
|
+
# source://mocha//lib/mocha/cardinality.rb#45
|
359
358
|
def needs_verifying?; end
|
360
359
|
|
361
360
|
# @return [Boolean]
|
362
361
|
#
|
363
|
-
# source://mocha//lib/mocha/cardinality.rb#
|
362
|
+
# source://mocha//lib/mocha/cardinality.rb#41
|
364
363
|
def satisfied?; end
|
365
364
|
|
366
365
|
# source://mocha//lib/mocha/cardinality.rb#22
|
@@ -368,35 +367,35 @@ class Mocha::Cardinality
|
|
368
367
|
|
369
368
|
# @return [Boolean]
|
370
369
|
#
|
371
|
-
# source://mocha//lib/mocha/cardinality.rb#
|
370
|
+
# source://mocha//lib/mocha/cardinality.rb#57
|
372
371
|
def used?; end
|
373
372
|
|
374
373
|
# @return [Boolean]
|
375
374
|
#
|
376
|
-
# source://mocha//lib/mocha/cardinality.rb#
|
375
|
+
# source://mocha//lib/mocha/cardinality.rb#49
|
377
376
|
def verified?; end
|
378
377
|
|
379
378
|
protected
|
380
379
|
|
381
|
-
# source://mocha//lib/mocha/cardinality.rb#
|
380
|
+
# source://mocha//lib/mocha/cardinality.rb#91
|
382
381
|
def count(number); end
|
383
382
|
|
384
383
|
# @return [Boolean]
|
385
384
|
#
|
386
|
-
# source://mocha//lib/mocha/cardinality.rb#
|
385
|
+
# source://mocha//lib/mocha/cardinality.rb#106
|
387
386
|
def infinite?(number); end
|
388
387
|
|
389
388
|
# Returns the value of attribute maximum.
|
390
389
|
#
|
391
|
-
# source://mocha//lib/mocha/cardinality.rb#
|
390
|
+
# source://mocha//lib/mocha/cardinality.rb#89
|
392
391
|
def maximum; end
|
393
392
|
|
394
393
|
# Returns the value of attribute required.
|
395
394
|
#
|
396
|
-
# source://mocha//lib/mocha/cardinality.rb#
|
395
|
+
# source://mocha//lib/mocha/cardinality.rb#89
|
397
396
|
def required; end
|
398
397
|
|
399
|
-
# source://mocha//lib/mocha/cardinality.rb#
|
398
|
+
# source://mocha//lib/mocha/cardinality.rb#100
|
400
399
|
def update(required, maximum); end
|
401
400
|
end
|
402
401
|
|
@@ -527,12 +526,12 @@ end
|
|
527
526
|
# c.stubbing_method_on_nil = :allow
|
528
527
|
# end
|
529
528
|
#
|
530
|
-
# source://mocha//lib/mocha/configuration.rb#
|
529
|
+
# source://mocha//lib/mocha/configuration.rb#40
|
531
530
|
class Mocha::Configuration
|
532
531
|
# @private
|
533
532
|
# @return [Configuration] a new instance of Configuration
|
534
533
|
#
|
535
|
-
# source://mocha//lib/mocha/configuration.rb#
|
534
|
+
# source://mocha//lib/mocha/configuration.rb#56
|
536
535
|
def initialize(options = T.unsafe(nil)); end
|
537
536
|
|
538
537
|
# Display matching invocations alongside expectations on Mocha-related test failure.
|
@@ -560,18 +559,18 @@ class Mocha::Configuration
|
|
560
559
|
# - #<Mock:foo>.baz(5, 6) # => threw (:tag, "value")
|
561
560
|
# @param value [Boolean] +true+ to enable display of matching invocations; disabled by default.
|
562
561
|
#
|
563
|
-
# source://mocha//lib/mocha/configuration.rb#
|
562
|
+
# source://mocha//lib/mocha/configuration.rb#251
|
564
563
|
def display_matching_invocations_on_failure=(value); end
|
565
564
|
|
566
565
|
# @private
|
567
566
|
# @return [Boolean]
|
568
567
|
#
|
569
|
-
# source://mocha//lib/mocha/configuration.rb#
|
568
|
+
# source://mocha//lib/mocha/configuration.rb#256
|
570
569
|
def display_matching_invocations_on_failure?; end
|
571
570
|
|
572
571
|
# @private
|
573
572
|
#
|
574
|
-
# source://mocha//lib/mocha/configuration.rb#
|
573
|
+
# source://mocha//lib/mocha/configuration.rb#66
|
575
574
|
def merge(other); end
|
576
575
|
|
577
576
|
# Perform strict keyword argument comparison. Only supported in Ruby >= v2.7.
|
@@ -610,18 +609,18 @@ class Mocha::Configuration
|
|
610
609
|
# # This now fails as expected
|
611
610
|
# @param value [Boolean] +true+ to enable strict keyword argument matching; +false+ by default.
|
612
611
|
#
|
613
|
-
# source://mocha//lib/mocha/configuration.rb#
|
612
|
+
# source://mocha//lib/mocha/configuration.rb#297
|
614
613
|
def strict_keyword_argument_matching=(value); end
|
615
614
|
|
616
615
|
# @private
|
617
616
|
# @return [Boolean]
|
618
617
|
#
|
619
|
-
# source://mocha//lib/mocha/configuration.rb#
|
618
|
+
# source://mocha//lib/mocha/configuration.rb#303
|
620
619
|
def strict_keyword_argument_matching?; end
|
621
620
|
|
622
621
|
# @private
|
623
622
|
#
|
624
|
-
# source://mocha//lib/mocha/configuration.rb#
|
623
|
+
# source://mocha//lib/mocha/configuration.rb#222
|
625
624
|
def stubbing_method_on_nil; end
|
626
625
|
|
627
626
|
# Configure whether stubbing methods on the +nil+ object is allowed.
|
@@ -634,14 +633,15 @@ class Mocha::Configuration
|
|
634
633
|
# When +value+ is +:warn+, display a warning.
|
635
634
|
# When +value+ is +:prevent+, raise a {StubbingError}. This is the default.
|
636
635
|
#
|
636
|
+
# @deprecated This method is deprecated and will be removed in a future release. +nil+ is frozen in Ruby >= v2.2 and Mocha will be dropping support for Ruby v2.1. At that point it won't be possible to stub methods on +nil+ any more.
|
637
637
|
# @param value [Symbol] one of +:allow+, +:warn+, +:prevent+.
|
638
638
|
#
|
639
|
-
# source://mocha//lib/mocha/configuration.rb#
|
639
|
+
# source://mocha//lib/mocha/configuration.rb#212
|
640
640
|
def stubbing_method_on_nil=(value); end
|
641
641
|
|
642
642
|
# @private
|
643
643
|
#
|
644
|
-
# source://mocha//lib/mocha/configuration.rb#
|
644
|
+
# source://mocha//lib/mocha/configuration.rb#128
|
645
645
|
def stubbing_method_on_non_mock_object; end
|
646
646
|
|
647
647
|
# Configure whether stubbing methods on non-mock objects is allowed.
|
@@ -667,12 +667,12 @@ class Mocha::Configuration
|
|
667
667
|
# # => #<Example:0x593620>.example_method
|
668
668
|
# @param value [Symbol] one of +:allow+, +:warn+, +:prevent+.
|
669
669
|
#
|
670
|
-
# source://mocha//lib/mocha/configuration.rb#
|
670
|
+
# source://mocha//lib/mocha/configuration.rb#123
|
671
671
|
def stubbing_method_on_non_mock_object=(value); end
|
672
672
|
|
673
673
|
# @private
|
674
674
|
#
|
675
|
-
# source://mocha//lib/mocha/configuration.rb#
|
675
|
+
# source://mocha//lib/mocha/configuration.rb#95
|
676
676
|
def stubbing_method_unnecessarily; end
|
677
677
|
|
678
678
|
# Configure whether stubbing methods unnecessarily is allowed.
|
@@ -694,12 +694,12 @@ class Mocha::Configuration
|
|
694
694
|
# # => #<Mock:example>.unused_stub(any_parameters)
|
695
695
|
# @param value [Symbol] one of +:allow+, +:warn+, +:prevent+.
|
696
696
|
#
|
697
|
-
# source://mocha//lib/mocha/configuration.rb#
|
697
|
+
# source://mocha//lib/mocha/configuration.rb#90
|
698
698
|
def stubbing_method_unnecessarily=(value); end
|
699
699
|
|
700
700
|
# @private
|
701
701
|
#
|
702
|
-
# source://mocha//lib/mocha/configuration.rb#
|
702
|
+
# source://mocha//lib/mocha/configuration.rb#161
|
703
703
|
def stubbing_non_existent_method; end
|
704
704
|
|
705
705
|
# Configure whether stubbing of non-existent methods is allowed.
|
@@ -725,12 +725,12 @@ class Mocha::Configuration
|
|
725
725
|
# # => #<Example:0x593760>.method_that_doesnt_exist
|
726
726
|
# @param value [Symbol] one of +:allow+, +:warn+, +:prevent+.
|
727
727
|
#
|
728
|
-
# source://mocha//lib/mocha/configuration.rb#
|
728
|
+
# source://mocha//lib/mocha/configuration.rb#156
|
729
729
|
def stubbing_non_existent_method=(value); end
|
730
730
|
|
731
731
|
# @private
|
732
732
|
#
|
733
|
-
# source://mocha//lib/mocha/configuration.rb#
|
733
|
+
# source://mocha//lib/mocha/configuration.rb#195
|
734
734
|
def stubbing_non_public_method; end
|
735
735
|
|
736
736
|
# Configure whether stubbing of non-public methods is allowed.
|
@@ -757,27 +757,27 @@ class Mocha::Configuration
|
|
757
757
|
# # => #<Example:0x593530>.internal_method
|
758
758
|
# @param value [Symbol] one of +:allow+, +:warn+, +:prevent+.
|
759
759
|
#
|
760
|
-
# source://mocha//lib/mocha/configuration.rb#
|
760
|
+
# source://mocha//lib/mocha/configuration.rb#190
|
761
761
|
def stubbing_non_public_method=(value); end
|
762
762
|
|
763
763
|
protected
|
764
764
|
|
765
765
|
# Returns the value of attribute options.
|
766
766
|
#
|
767
|
-
# source://mocha//lib/mocha/configuration.rb#
|
767
|
+
# source://mocha//lib/mocha/configuration.rb#52
|
768
768
|
def options; end
|
769
769
|
|
770
770
|
private
|
771
771
|
|
772
772
|
# @private
|
773
773
|
#
|
774
|
-
# source://mocha//lib/mocha/configuration.rb#
|
774
|
+
# source://mocha//lib/mocha/configuration.rb#61
|
775
775
|
def initialize_copy(other); end
|
776
776
|
|
777
777
|
class << self
|
778
778
|
# @private
|
779
779
|
#
|
780
|
-
# source://mocha//lib/mocha/configuration.rb#
|
780
|
+
# source://mocha//lib/mocha/configuration.rb#334
|
781
781
|
def configuration; end
|
782
782
|
|
783
783
|
# Temporarily modify {Configuration} options.
|
@@ -792,31 +792,31 @@ class Mocha::Configuration
|
|
792
792
|
# @param temporary_options [Hash] the configuration options to apply for the duration of the block.
|
793
793
|
# @yield block during which the configuration change will be in force.
|
794
794
|
#
|
795
|
-
# source://mocha//lib/mocha/configuration.rb#
|
795
|
+
# source://mocha//lib/mocha/configuration.rb#325
|
796
796
|
def override(temporary_options); end
|
797
797
|
|
798
798
|
# @private
|
799
799
|
#
|
800
|
-
# source://mocha//lib/mocha/configuration.rb#
|
800
|
+
# source://mocha//lib/mocha/configuration.rb#309
|
801
801
|
def reset_configuration; end
|
802
802
|
|
803
803
|
private
|
804
804
|
|
805
805
|
# @private
|
806
806
|
#
|
807
|
-
# source://mocha//lib/mocha/configuration.rb#
|
807
|
+
# source://mocha//lib/mocha/configuration.rb#341
|
808
808
|
def change_config(action, new_value, &block); end
|
809
809
|
|
810
810
|
# @private
|
811
811
|
#
|
812
|
-
# source://mocha//lib/mocha/configuration.rb#
|
812
|
+
# source://mocha//lib/mocha/configuration.rb#350
|
813
813
|
def temporarily_change_config(action, new_value); end
|
814
814
|
end
|
815
815
|
end
|
816
816
|
|
817
817
|
# @private
|
818
818
|
#
|
819
|
-
# source://mocha//lib/mocha/configuration.rb#
|
819
|
+
# source://mocha//lib/mocha/configuration.rb#42
|
820
820
|
Mocha::Configuration::DEFAULTS = T.let(T.unsafe(nil), Hash)
|
821
821
|
|
822
822
|
# source://mocha//lib/mocha/debug.rb#2
|
@@ -929,22 +929,22 @@ class Mocha::Expectation
|
|
929
929
|
# @private
|
930
930
|
# @return [Expectation] a new instance of Expectation
|
931
931
|
#
|
932
|
-
# source://mocha//lib/mocha/expectation.rb#
|
932
|
+
# source://mocha//lib/mocha/expectation.rb#618
|
933
933
|
def initialize(mock, expected_method_name, backtrace = T.unsafe(nil)); end
|
934
934
|
|
935
935
|
# @private
|
936
936
|
#
|
937
|
-
# source://mocha//lib/mocha/expectation.rb#
|
937
|
+
# source://mocha//lib/mocha/expectation.rb#637
|
938
938
|
def add_in_sequence_ordering_constraint(sequence); end
|
939
939
|
|
940
940
|
# @private
|
941
941
|
#
|
942
|
-
# source://mocha//lib/mocha/expectation.rb#
|
942
|
+
# source://mocha//lib/mocha/expectation.rb#632
|
943
943
|
def add_ordering_constraint(ordering_constraint); end
|
944
944
|
|
945
945
|
# @private
|
946
946
|
#
|
947
|
-
# source://mocha//lib/mocha/expectation.rb#
|
947
|
+
# source://mocha//lib/mocha/expectation.rb#642
|
948
948
|
def add_side_effect(side_effect); end
|
949
949
|
|
950
950
|
# Modifies expectation so that the expected method must be called at least a +minimum_number_of_times+.
|
@@ -1016,18 +1016,18 @@ class Mocha::Expectation
|
|
1016
1016
|
|
1017
1017
|
# @private
|
1018
1018
|
#
|
1019
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1019
|
+
# source://mocha//lib/mocha/expectation.rb#615
|
1020
1020
|
def backtrace; end
|
1021
1021
|
|
1022
1022
|
# @private
|
1023
1023
|
#
|
1024
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1024
|
+
# source://mocha//lib/mocha/expectation.rb#730
|
1025
1025
|
def definition_location; end
|
1026
1026
|
|
1027
1027
|
# @private
|
1028
1028
|
# @return [Boolean]
|
1029
1029
|
#
|
1030
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1030
|
+
# source://mocha//lib/mocha/expectation.rb#652
|
1031
1031
|
def in_correct_order?; end
|
1032
1032
|
|
1033
1033
|
# Constrains the expectation so that it must be invoked at the current point in the +sequence+.
|
@@ -1052,45 +1052,51 @@ class Mocha::Expectation
|
|
1052
1052
|
# @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained.
|
1053
1053
|
# @see API#sequence
|
1054
1054
|
#
|
1055
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1055
|
+
# source://mocha//lib/mocha/expectation.rb#609
|
1056
1056
|
def in_sequence(sequence, *sequences); end
|
1057
1057
|
|
1058
1058
|
# @private
|
1059
1059
|
#
|
1060
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1060
|
+
# source://mocha//lib/mocha/expectation.rb#706
|
1061
1061
|
def inspect; end
|
1062
1062
|
|
1063
1063
|
# @private
|
1064
1064
|
# @return [Boolean]
|
1065
1065
|
#
|
1066
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1066
|
+
# source://mocha//lib/mocha/expectation.rb#673
|
1067
1067
|
def invocations_allowed?; end
|
1068
1068
|
|
1069
1069
|
# @private
|
1070
|
+
# @return [Boolean]
|
1070
1071
|
#
|
1071
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1072
|
+
# source://mocha//lib/mocha/expectation.rb#678
|
1073
|
+
def invocations_never_allowed?; end
|
1074
|
+
|
1075
|
+
# @private
|
1076
|
+
#
|
1077
|
+
# source://mocha//lib/mocha/expectation.rb#688
|
1072
1078
|
def invoke(invocation); end
|
1073
1079
|
|
1074
1080
|
# @private
|
1075
1081
|
# @return [Boolean]
|
1076
1082
|
#
|
1077
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1083
|
+
# source://mocha//lib/mocha/expectation.rb#667
|
1078
1084
|
def match?(invocation, ignoring_order: T.unsafe(nil)); end
|
1079
1085
|
|
1080
1086
|
# @private
|
1081
1087
|
# @return [Boolean]
|
1082
1088
|
#
|
1083
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1089
|
+
# source://mocha//lib/mocha/expectation.rb#662
|
1084
1090
|
def matches_method?(method_name); end
|
1085
1091
|
|
1086
1092
|
# @private
|
1087
1093
|
#
|
1088
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1094
|
+
# source://mocha//lib/mocha/expectation.rb#723
|
1089
1095
|
def method_signature; end
|
1090
1096
|
|
1091
1097
|
# @private
|
1092
1098
|
#
|
1093
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1099
|
+
# source://mocha//lib/mocha/expectation.rb#713
|
1094
1100
|
def mocha_inspect; end
|
1095
1101
|
|
1096
1102
|
# Modifies expectation so that when the expected method is called, it yields multiple times per invocation with the specified +parameter_groups+.
|
@@ -1116,7 +1122,7 @@ class Mocha::Expectation
|
|
1116
1122
|
# @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained.
|
1117
1123
|
# @see #then
|
1118
1124
|
#
|
1119
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1125
|
+
# source://mocha//lib/mocha/expectation.rb#396
|
1120
1126
|
def multiple_yields(*parameter_groups); end
|
1121
1127
|
|
1122
1128
|
# Modifies expectation so that the expected method must never be called.
|
@@ -1159,12 +1165,12 @@ class Mocha::Expectation
|
|
1159
1165
|
|
1160
1166
|
# @private
|
1161
1167
|
#
|
1162
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1168
|
+
# source://mocha//lib/mocha/expectation.rb#657
|
1163
1169
|
def ordering_constraints_not_allowing_invocation_now; end
|
1164
1170
|
|
1165
1171
|
# @private
|
1166
1172
|
#
|
1167
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1173
|
+
# source://mocha//lib/mocha/expectation.rb#647
|
1168
1174
|
def perform_side_effects; end
|
1169
1175
|
|
1170
1176
|
# Modifies expectation so that when the expected method is called, it raises the specified +exception+ with the specified +message+ i.e. calls +Kernel#raise(exception, message)+.
|
@@ -1197,7 +1203,7 @@ class Mocha::Expectation
|
|
1197
1203
|
# @see Kernel#raise
|
1198
1204
|
# @see #then
|
1199
1205
|
#
|
1200
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1206
|
+
# source://mocha//lib/mocha/expectation.rb#483
|
1201
1207
|
def raises(exception = T.unsafe(nil), message = T.unsafe(nil)); end
|
1202
1208
|
|
1203
1209
|
# Modifies expectation so that when the expected method is called, it returns the specified +value+.
|
@@ -1235,13 +1241,13 @@ class Mocha::Expectation
|
|
1235
1241
|
# @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained.
|
1236
1242
|
# @see #then
|
1237
1243
|
#
|
1238
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1244
|
+
# source://mocha//lib/mocha/expectation.rb#443
|
1239
1245
|
def returns(*values); end
|
1240
1246
|
|
1241
1247
|
# @private
|
1242
1248
|
# @return [Boolean]
|
1243
1249
|
#
|
1244
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1250
|
+
# source://mocha//lib/mocha/expectation.rb#683
|
1245
1251
|
def satisfied?; end
|
1246
1252
|
|
1247
1253
|
# @example Using {#then} as syntactic sugar when specifying values to be returned and exceptions to be raised on consecutive invocations of the expected method.
|
@@ -1265,7 +1271,7 @@ class Mocha::Expectation
|
|
1265
1271
|
# @overload then
|
1266
1272
|
# @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained.
|
1267
1273
|
#
|
1268
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1274
|
+
# source://mocha//lib/mocha/expectation.rb#557
|
1269
1275
|
def then(state = T.unsafe(nil)); end
|
1270
1276
|
|
1271
1277
|
# Modifies expectation so that when the expected method is called, it throws the specified +tag+ with the specific return value +object+ i.e. calls +Kernel#throw(tag, object)+.
|
@@ -1297,7 +1303,7 @@ class Mocha::Expectation
|
|
1297
1303
|
# @see Kernel#throw
|
1298
1304
|
# @see #then
|
1299
1305
|
#
|
1300
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1306
|
+
# source://mocha//lib/mocha/expectation.rb#522
|
1301
1307
|
def throws(tag, object = T.unsafe(nil)); end
|
1302
1308
|
|
1303
1309
|
# Modifies expectation so that the number of calls to the expected method must be within a specific +range+.
|
@@ -1355,13 +1361,13 @@ class Mocha::Expectation
|
|
1355
1361
|
# @private
|
1356
1362
|
# @return [Boolean]
|
1357
1363
|
#
|
1358
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1364
|
+
# source://mocha//lib/mocha/expectation.rb#701
|
1359
1365
|
def used?; end
|
1360
1366
|
|
1361
1367
|
# @private
|
1362
1368
|
# @return [Boolean]
|
1363
1369
|
#
|
1364
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1370
|
+
# source://mocha//lib/mocha/expectation.rb#695
|
1365
1371
|
def verified?(assertion_counter = T.unsafe(nil)); end
|
1366
1372
|
|
1367
1373
|
# Constrains the expectation to occur only when the +state_machine+ is in the state specified by +state_predicate+.
|
@@ -1382,13 +1388,18 @@ class Mocha::Expectation
|
|
1382
1388
|
# @see StateMachine
|
1383
1389
|
# @see #then
|
1384
1390
|
#
|
1385
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1391
|
+
# source://mocha//lib/mocha/expectation.rb#581
|
1386
1392
|
def when(state_predicate); end
|
1387
1393
|
|
1388
1394
|
# Modifies expectation so that the expected method must be called with +expected_parameters_or_matchers+.
|
1389
1395
|
#
|
1390
1396
|
# May be used with Ruby literals or variables for exact matching or with parameter matchers for less-specific matching, e.g. {ParameterMatchers#includes}, {ParameterMatchers#has_key}, etc. See {ParameterMatchers} for a list of all available parameter matchers.
|
1391
1397
|
#
|
1398
|
+
# Alternatively a block argument can be passed to {#with} to implement custom parameter matching. The block receives the +*actual_parameters+ as its arguments and should return +true+ if they are acceptable or +false+ otherwise. See the example below where a method is expected to be called with a value divisible by 4.
|
1399
|
+
# The block argument takes precedence over +expected_parameters_or_matchers+. The block may be called multiple times per invocation of the expected method and so it should be idempotent.
|
1400
|
+
#
|
1401
|
+
# Note that if {#with} is called multiple times on the same expectation, the last call takes precedence; other calls are ignored.
|
1402
|
+
#
|
1392
1403
|
# Positional arguments were separated from keyword arguments in Ruby v3 (see {https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0 this article}). In relation to this a new configuration option ({Configuration#strict_keyword_argument_matching=}) is available in Ruby >= 2.7.
|
1393
1404
|
#
|
1394
1405
|
# When {Configuration#strict_keyword_argument_matching=} is set to +false+ (which is currently the default), a positional +Hash+ and a set of keyword arguments passed to {#with} are treated the same for the purposes of parameter matching. However, a deprecation warning will be displayed if a positional +Hash+ matches a set of keyword arguments or vice versa. This is because {Configuration#strict_keyword_argument_matching=} will default to +true+ in the future.
|
@@ -1439,7 +1450,7 @@ class Mocha::Expectation
|
|
1439
1450
|
# example.expects(:foo).with('a', bar: 'b')
|
1440
1451
|
# example.foo('a', { bar: 'b' })
|
1441
1452
|
# # This now fails as expected
|
1442
|
-
# @example
|
1453
|
+
# @example Using a block argument to expect the method to be called with a value divisible by 4.
|
1443
1454
|
# object = mock()
|
1444
1455
|
# object.expects(:expected_method).with() { |value| value % 4 == 0 }
|
1445
1456
|
# object.expected_method(16)
|
@@ -1449,15 +1460,30 @@ class Mocha::Expectation
|
|
1449
1460
|
# object.expects(:expected_method).with() { |value| value % 4 == 0 }
|
1450
1461
|
# object.expected_method(17)
|
1451
1462
|
# # => verify fails
|
1452
|
-
# @
|
1463
|
+
# @example Extracting a custom matcher into an instance method on the test class.
|
1464
|
+
# class MyTest < Minitest::Test
|
1465
|
+
# def test_expected_method_is_called_with_a_value_divisible_by_4
|
1466
|
+
# object = mock()
|
1467
|
+
# object.expects(:expected_method).with(&method(:divisible_by_4))
|
1468
|
+
# object.expected_method(16)
|
1469
|
+
# # => verify succeeds
|
1470
|
+
# end
|
1471
|
+
#
|
1472
|
+
# private
|
1473
|
+
#
|
1474
|
+
# def divisible_by_4(value)
|
1475
|
+
# value % 4 == 0
|
1476
|
+
# end
|
1477
|
+
# end
|
1478
|
+
# @param expected_parameters_or_matchers [Array<Object,ParameterMatchers::Base>] expected parameter values or parameter matchers.
|
1453
1479
|
# @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained.
|
1454
1480
|
# @see ParameterMatchers
|
1455
1481
|
# @see Configuration#strict_keyword_argument_matching=
|
1456
1482
|
# @yield optional block specifying custom matching.
|
1457
|
-
# @yieldparam actual_parameters [
|
1458
|
-
# @yieldreturn [Boolean] +true+ if +actual_parameters+ are acceptable.
|
1483
|
+
# @yieldparam actual_parameters [Array<Object>] parameters with which expected method was invoked.
|
1484
|
+
# @yieldreturn [Boolean] +true+ if +actual_parameters+ are acceptable; +false+ otherwise.
|
1459
1485
|
#
|
1460
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1486
|
+
# source://mocha//lib/mocha/expectation.rb#290
|
1461
1487
|
def with(*expected_parameters_or_matchers, **_arg1, &matching_block); end
|
1462
1488
|
|
1463
1489
|
# Modifies expectation so that the expected method must be called with a block.
|
@@ -1474,7 +1500,7 @@ class Mocha::Expectation
|
|
1474
1500
|
# # => verify fails
|
1475
1501
|
# @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained.
|
1476
1502
|
#
|
1477
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1503
|
+
# source://mocha//lib/mocha/expectation.rb#310
|
1478
1504
|
def with_block_given; end
|
1479
1505
|
|
1480
1506
|
# Modifies expectation so that the expected method must be called without a block.
|
@@ -1491,7 +1517,7 @@ class Mocha::Expectation
|
|
1491
1517
|
# # => verify fails
|
1492
1518
|
# @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained.
|
1493
1519
|
#
|
1494
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1520
|
+
# source://mocha//lib/mocha/expectation.rb#329
|
1495
1521
|
def with_no_block_given; end
|
1496
1522
|
|
1497
1523
|
# Modifies expectation so that when the expected method is called, it yields to the block with the specified +parameters+.
|
@@ -1526,7 +1552,7 @@ class Mocha::Expectation
|
|
1526
1552
|
# @return [Expectation] the same expectation, thereby allowing invocations of other {Expectation} methods to be chained.
|
1527
1553
|
# @see #then
|
1528
1554
|
#
|
1529
|
-
# source://mocha//lib/mocha/expectation.rb#
|
1555
|
+
# source://mocha//lib/mocha/expectation.rb#368
|
1530
1556
|
def yields(*parameters); end
|
1531
1557
|
end
|
1532
1558
|
|
@@ -1600,17 +1626,20 @@ class Mocha::ExpectationList
|
|
1600
1626
|
# source://mocha//lib/mocha/expectation_list.rb#20
|
1601
1627
|
def match(invocation, ignoring_order: T.unsafe(nil)); end
|
1602
1628
|
|
1603
|
-
# source://mocha//lib/mocha/expectation_list.rb#
|
1629
|
+
# source://mocha//lib/mocha/expectation_list.rb#24
|
1604
1630
|
def match_allowing_invocation(invocation); end
|
1605
1631
|
|
1606
|
-
# source://mocha//lib/mocha/expectation_list.rb#
|
1607
|
-
def
|
1632
|
+
# source://mocha//lib/mocha/expectation_list.rb#28
|
1633
|
+
def match_never_allowing_invocation(invocation); end
|
1608
1634
|
|
1609
1635
|
# @return [Boolean]
|
1610
1636
|
#
|
1611
1637
|
# source://mocha//lib/mocha/expectation_list.rb#16
|
1612
1638
|
def matches_method?(method_name); end
|
1613
1639
|
|
1640
|
+
# source://mocha//lib/mocha/expectation_list.rb#56
|
1641
|
+
def matching_expectations(invocation, ignoring_order: T.unsafe(nil)); end
|
1642
|
+
|
1614
1643
|
# source://mocha//lib/mocha/expectation_list.rb#12
|
1615
1644
|
def remove_all_matching_method(method_name); end
|
1616
1645
|
|
@@ -1624,11 +1653,6 @@ class Mocha::ExpectationList
|
|
1624
1653
|
#
|
1625
1654
|
# source://mocha//lib/mocha/expectation_list.rb#32
|
1626
1655
|
def verified?(assertion_counter = T.unsafe(nil)); end
|
1627
|
-
|
1628
|
-
private
|
1629
|
-
|
1630
|
-
# source://mocha//lib/mocha/expectation_list.rb#58
|
1631
|
-
def matching_expectations(invocation, ignoring_order: T.unsafe(nil)); end
|
1632
1656
|
end
|
1633
1657
|
|
1634
1658
|
# Integration hooks for test library authors.
|
@@ -1725,9 +1749,9 @@ module Mocha::Inspect::ArrayMethods
|
|
1725
1749
|
def mocha_inspect(wrapped = T.unsafe(nil)); end
|
1726
1750
|
end
|
1727
1751
|
|
1728
|
-
# source://mocha//lib/mocha/inspect.rb#
|
1752
|
+
# source://mocha//lib/mocha/inspect.rb#44
|
1729
1753
|
module Mocha::Inspect::DateMethods
|
1730
|
-
# source://mocha//lib/mocha/inspect.rb#
|
1754
|
+
# source://mocha//lib/mocha/inspect.rb#45
|
1731
1755
|
def mocha_inspect; end
|
1732
1756
|
end
|
1733
1757
|
|
@@ -1743,9 +1767,9 @@ module Mocha::Inspect::ObjectMethods
|
|
1743
1767
|
def mocha_inspect; end
|
1744
1768
|
end
|
1745
1769
|
|
1746
|
-
# source://mocha//lib/mocha/inspect.rb#
|
1770
|
+
# source://mocha//lib/mocha/inspect.rb#38
|
1747
1771
|
module Mocha::Inspect::TimeMethods
|
1748
|
-
# source://mocha//lib/mocha/inspect.rb#
|
1772
|
+
# source://mocha//lib/mocha/inspect.rb#39
|
1749
1773
|
def mocha_inspect; end
|
1750
1774
|
end
|
1751
1775
|
|
@@ -1941,6 +1965,9 @@ end
|
|
1941
1965
|
# while an +expects(:foo).at_least_once+ expectation will always be matched
|
1942
1966
|
# against invocations.
|
1943
1967
|
#
|
1968
|
+
# However, note that if the expectation that matches the invocation has a
|
1969
|
+
# cardinality of "never", then an unexpected invocation error is reported.
|
1970
|
+
#
|
1944
1971
|
# This scheme allows you to:
|
1945
1972
|
#
|
1946
1973
|
# - Set up default stubs in your the +setup+ method of your test class and
|
@@ -1980,17 +2007,17 @@ end
|
|
1980
2007
|
# object.expected_method # => 2
|
1981
2008
|
# object.expected_method # => raises exception of class Exception1
|
1982
2009
|
#
|
1983
|
-
# source://mocha//lib/mocha/mock.rb#
|
2010
|
+
# source://mocha//lib/mocha/mock.rb#79
|
1984
2011
|
class Mocha::Mock
|
1985
2012
|
# @private
|
1986
2013
|
# @return [Mock] a new instance of Mock
|
1987
2014
|
#
|
1988
|
-
# source://mocha//lib/mocha/mock.rb#
|
2015
|
+
# source://mocha//lib/mocha/mock.rb#279
|
1989
2016
|
def initialize(mockery, name = T.unsafe(nil), receiver = T.unsafe(nil)); end
|
1990
2017
|
|
1991
2018
|
# @private
|
1992
2019
|
#
|
1993
|
-
# source://mocha//lib/mocha/mock.rb#
|
2020
|
+
# source://mocha//lib/mocha/mock.rb#303
|
1994
2021
|
def __expectations__; end
|
1995
2022
|
|
1996
2023
|
# Adds an expectation that the specified method must be called exactly once with any parameters.
|
@@ -2021,12 +2048,12 @@ class Mocha::Mock
|
|
2021
2048
|
# @overload expects
|
2022
2049
|
# @return [Expectation] last-built expectation which can be further modified by methods on {Expectation}.
|
2023
2050
|
#
|
2024
|
-
# source://mocha//lib/mocha/mock.rb#
|
2051
|
+
# source://mocha//lib/mocha/mock.rb#114
|
2025
2052
|
def __expects__(method_name_or_hash, backtrace = T.unsafe(nil)); end
|
2026
2053
|
|
2027
2054
|
# @private
|
2028
2055
|
#
|
2029
|
-
# source://mocha//lib/mocha/mock.rb#
|
2056
|
+
# source://mocha//lib/mocha/mock.rb#363
|
2030
2057
|
def __expire__(origin); end
|
2031
2058
|
|
2032
2059
|
def __singleton_class__; end
|
@@ -2052,34 +2079,34 @@ class Mocha::Mock
|
|
2052
2079
|
# @overload stubs
|
2053
2080
|
# @return [Expectation] last-built expectation which can be further modified by methods on {Expectation}.
|
2054
2081
|
#
|
2055
|
-
# source://mocha//lib/mocha/mock.rb#
|
2082
|
+
# source://mocha//lib/mocha/mock.rb#153
|
2056
2083
|
def __stubs__(method_name_or_hash, backtrace = T.unsafe(nil)); end
|
2057
2084
|
|
2058
2085
|
# @private
|
2059
2086
|
# @return [Boolean]
|
2060
2087
|
#
|
2061
|
-
# source://mocha//lib/mocha/mock.rb#
|
2088
|
+
# source://mocha//lib/mocha/mock.rb#358
|
2062
2089
|
def __verified__?(assertion_counter = T.unsafe(nil)); end
|
2063
2090
|
|
2064
2091
|
# @private
|
2065
2092
|
#
|
2066
|
-
# source://mocha//lib/mocha/mock.rb#
|
2093
|
+
# source://mocha//lib/mocha/mock.rb#313
|
2067
2094
|
def all_expectations; end
|
2068
2095
|
|
2069
2096
|
# @private
|
2070
2097
|
# @return [Boolean]
|
2071
2098
|
#
|
2072
|
-
# source://mocha//lib/mocha/mock.rb#
|
2099
|
+
# source://mocha//lib/mocha/mock.rb#383
|
2073
2100
|
def any_expectations?; end
|
2074
2101
|
|
2075
2102
|
# @private
|
2076
2103
|
#
|
2077
|
-
# source://mocha//lib/mocha/mock.rb#
|
2104
|
+
# source://mocha//lib/mocha/mock.rb#378
|
2078
2105
|
def ensure_method_not_already_defined(method_name); end
|
2079
2106
|
|
2080
2107
|
# @private
|
2081
2108
|
#
|
2082
|
-
# source://mocha//lib/mocha/mock.rb#
|
2109
|
+
# source://mocha//lib/mocha/mock.rb#291
|
2083
2110
|
def everything_stubbed; end
|
2084
2111
|
|
2085
2112
|
# Adds an expectation that the specified method must be called exactly once with any parameters.
|
@@ -2110,27 +2137,27 @@ class Mocha::Mock
|
|
2110
2137
|
# @overload expects
|
2111
2138
|
# @return [Expectation] last-built expectation which can be further modified by methods on {Expectation}.
|
2112
2139
|
#
|
2113
|
-
# source://mocha//lib/mocha/mock.rb#
|
2140
|
+
# source://mocha//lib/mocha/mock.rb#114
|
2114
2141
|
def expects(method_name_or_hash, backtrace = T.unsafe(nil)); end
|
2115
2142
|
|
2116
2143
|
# @private
|
2117
2144
|
#
|
2118
|
-
# source://mocha//lib/mocha/mock.rb#
|
2145
|
+
# source://mocha//lib/mocha/mock.rb#324
|
2119
2146
|
def handle_method_call(symbol, arguments, block); end
|
2120
2147
|
|
2121
2148
|
# @private
|
2122
2149
|
#
|
2123
|
-
# source://mocha//lib/mocha/mock.rb#
|
2150
|
+
# source://mocha//lib/mocha/mock.rb#373
|
2124
2151
|
def inspect; end
|
2125
2152
|
|
2126
2153
|
# @private
|
2127
2154
|
#
|
2128
|
-
# source://mocha//lib/mocha/mock.rb#
|
2155
|
+
# source://mocha//lib/mocha/mock.rb#318
|
2129
2156
|
def method_missing(symbol, *arguments, **_arg2, &block); end
|
2130
2157
|
|
2131
2158
|
# @private
|
2132
2159
|
#
|
2133
|
-
# source://mocha//lib/mocha/mock.rb#
|
2160
|
+
# source://mocha//lib/mocha/mock.rb#368
|
2134
2161
|
def mocha_inspect; end
|
2135
2162
|
|
2136
2163
|
# Constrains the {Mock} instance so that it can only expect or stub methods to which +responder+ responds publicly. The constraint is only applied at method invocation time.
|
@@ -2180,7 +2207,7 @@ class Mocha::Mock
|
|
2180
2207
|
# @return [Mock] the same {Mock} instance, thereby allowing invocations of other {Mock} methods to be chained.
|
2181
2208
|
# @see #responds_like_instance_of
|
2182
2209
|
#
|
2183
|
-
# source://mocha//lib/mocha/mock.rb#
|
2210
|
+
# source://mocha//lib/mocha/mock.rb#241
|
2184
2211
|
def quacks_like(responder); end
|
2185
2212
|
|
2186
2213
|
# Constrains the {Mock} instance so that it can only expect or stub methods to which an instance of the +responder_class+ responds publicly. The constraint is only applied at method invocation time. Note that the responder instance is instantiated using +Class#allocate+.
|
@@ -2211,7 +2238,7 @@ class Mocha::Mock
|
|
2211
2238
|
# @return [Mock] the same {Mock} instance, thereby allowing invocations of other {Mock} methods to be chained.
|
2212
2239
|
# @see #responds_like
|
2213
2240
|
#
|
2214
|
-
# source://mocha//lib/mocha/mock.rb#
|
2241
|
+
# source://mocha//lib/mocha/mock.rb#274
|
2215
2242
|
def quacks_like_instance_of(responder_class); end
|
2216
2243
|
|
2217
2244
|
# Constrains the {Mock} instance so that it can only expect or stub methods to which +responder+ responds publicly. The constraint is only applied at method invocation time.
|
@@ -2261,7 +2288,7 @@ class Mocha::Mock
|
|
2261
2288
|
# @return [Mock] the same {Mock} instance, thereby allowing invocations of other {Mock} methods to be chained.
|
2262
2289
|
# @see #responds_like_instance_of
|
2263
2290
|
#
|
2264
|
-
# source://mocha//lib/mocha/mock.rb#
|
2291
|
+
# source://mocha//lib/mocha/mock.rb#241
|
2265
2292
|
def responds_like(responder); end
|
2266
2293
|
|
2267
2294
|
# Constrains the {Mock} instance so that it can only expect or stub methods to which an instance of the +responder_class+ responds publicly. The constraint is only applied at method invocation time. Note that the responder instance is instantiated using +Class#allocate+.
|
@@ -2292,12 +2319,12 @@ class Mocha::Mock
|
|
2292
2319
|
# @return [Mock] the same {Mock} instance, thereby allowing invocations of other {Mock} methods to be chained.
|
2293
2320
|
# @see #responds_like
|
2294
2321
|
#
|
2295
|
-
# source://mocha//lib/mocha/mock.rb#
|
2322
|
+
# source://mocha//lib/mocha/mock.rb#274
|
2296
2323
|
def responds_like_instance_of(responder_class); end
|
2297
2324
|
|
2298
2325
|
# @private
|
2299
2326
|
#
|
2300
|
-
# source://mocha//lib/mocha/mock.rb#
|
2327
|
+
# source://mocha//lib/mocha/mock.rb#308
|
2301
2328
|
def stub_everything; end
|
2302
2329
|
|
2303
2330
|
# Adds an expectation that the specified method may be called any number of times with any parameters.
|
@@ -2321,7 +2348,7 @@ class Mocha::Mock
|
|
2321
2348
|
# @overload stubs
|
2322
2349
|
# @return [Expectation] last-built expectation which can be further modified by methods on {Expectation}.
|
2323
2350
|
#
|
2324
|
-
# source://mocha//lib/mocha/mock.rb#
|
2351
|
+
# source://mocha//lib/mocha/mock.rb#153
|
2325
2352
|
def stubs(method_name_or_hash, backtrace = T.unsafe(nil)); end
|
2326
2353
|
|
2327
2354
|
# Removes the specified stubbed methods (added by calls to {#expects} or {#stubs}) and all expectations associated with them.
|
@@ -2341,26 +2368,26 @@ class Mocha::Mock
|
|
2341
2368
|
# multiplier.unstub(:triple)
|
2342
2369
|
# @param method_names [Array<Symbol>] names of methods to unstub.
|
2343
2370
|
#
|
2344
|
-
# source://mocha//lib/mocha/mock.rb#
|
2371
|
+
# source://mocha//lib/mocha/mock.rb#186
|
2345
2372
|
def unstub(*method_names); end
|
2346
2373
|
|
2347
2374
|
private
|
2348
2375
|
|
2349
2376
|
# @raise [StubbingError]
|
2350
2377
|
#
|
2351
|
-
# source://mocha//lib/mocha/mock.rb#
|
2378
|
+
# source://mocha//lib/mocha/mock.rb#410
|
2352
2379
|
def check_expiry; end
|
2353
2380
|
|
2354
|
-
# source://mocha//lib/mocha/mock.rb#
|
2381
|
+
# source://mocha//lib/mocha/mock.rb#404
|
2355
2382
|
def check_responder_responds_to(symbol); end
|
2356
2383
|
|
2357
|
-
# source://mocha//lib/mocha/mock.rb#
|
2384
|
+
# source://mocha//lib/mocha/mock.rb#389
|
2358
2385
|
def raise_unexpected_invocation_error(invocation, matching_expectation); end
|
2359
2386
|
|
2360
2387
|
# @private
|
2361
2388
|
# @return [Boolean]
|
2362
2389
|
#
|
2363
|
-
# source://mocha//lib/mocha/mock.rb#
|
2390
|
+
# source://mocha//lib/mocha/mock.rb#349
|
2364
2391
|
def respond_to_missing?(symbol, _include_all); end
|
2365
2392
|
end
|
2366
2393
|
|
@@ -3167,14 +3194,9 @@ class Mocha::ParameterMatchers::Base
|
|
3167
3194
|
# @return [AllOf] parameter matcher.
|
3168
3195
|
# @see Expectation#with
|
3169
3196
|
#
|
3170
|
-
# source://mocha//lib/mocha/parameter_matchers/base.rb#
|
3197
|
+
# source://mocha//lib/mocha/parameter_matchers/base.rb#25
|
3171
3198
|
def &(other); end
|
3172
3199
|
|
3173
|
-
# @private
|
3174
|
-
#
|
3175
|
-
# source://mocha//lib/mocha/parameter_matchers/base.rb#6
|
3176
|
-
def to_matcher(_expectation = T.unsafe(nil)); end
|
3177
|
-
|
3178
3200
|
# A shorthand way of combining two matchers when at least one must match.
|
3179
3201
|
#
|
3180
3202
|
# Returns a new +AnyOf+ parameter matcher combining two matchers using a logical OR.
|
@@ -3199,7 +3221,7 @@ class Mocha::ParameterMatchers::Base
|
|
3199
3221
|
# @return [AnyOf] parameter matcher.
|
3200
3222
|
# @see Expectation#with
|
3201
3223
|
#
|
3202
|
-
# source://mocha//lib/mocha/parameter_matchers/base.rb#
|
3224
|
+
# source://mocha//lib/mocha/parameter_matchers/base.rb#55
|
3203
3225
|
def |(other); end
|
3204
3226
|
end
|
3205
3227
|
|
@@ -3262,17 +3284,17 @@ class Mocha::ParameterMatchers::HasEntries < ::Mocha::ParameterMatchers::Base
|
|
3262
3284
|
# @return [HasEntries] a new instance of HasEntries
|
3263
3285
|
#
|
3264
3286
|
# source://mocha//lib/mocha/parameter_matchers/has_entries.rb#33
|
3265
|
-
def initialize(entries); end
|
3287
|
+
def initialize(entries, exact: T.unsafe(nil)); end
|
3266
3288
|
|
3267
3289
|
# @private
|
3268
3290
|
# @return [Boolean]
|
3269
3291
|
#
|
3270
|
-
# source://mocha//lib/mocha/parameter_matchers/has_entries.rb#
|
3292
|
+
# source://mocha//lib/mocha/parameter_matchers/has_entries.rb#39
|
3271
3293
|
def matches?(available_parameters); end
|
3272
3294
|
|
3273
3295
|
# @private
|
3274
3296
|
#
|
3275
|
-
# source://mocha//lib/mocha/parameter_matchers/has_entries.rb#
|
3297
|
+
# source://mocha//lib/mocha/parameter_matchers/has_entries.rb#50
|
3276
3298
|
def mocha_inspect; end
|
3277
3299
|
end
|
3278
3300
|
|
@@ -3389,12 +3411,12 @@ end
|
|
3389
3411
|
|
3390
3412
|
# @private
|
3391
3413
|
#
|
3392
|
-
# source://mocha//lib/mocha/parameter_matchers/instance_methods.rb#
|
3414
|
+
# source://mocha//lib/mocha/parameter_matchers/instance_methods.rb#8
|
3393
3415
|
module Mocha::ParameterMatchers::InstanceMethods
|
3394
3416
|
# @private
|
3395
3417
|
#
|
3396
|
-
# source://mocha//lib/mocha/parameter_matchers/instance_methods.rb#
|
3397
|
-
def to_matcher(
|
3418
|
+
# source://mocha//lib/mocha/parameter_matchers/instance_methods.rb#10
|
3419
|
+
def to_matcher(expectation: T.unsafe(nil), top_level: T.unsafe(nil)); end
|
3398
3420
|
end
|
3399
3421
|
|
3400
3422
|
# Parameter matcher which matches when actual parameter is an instance of the specified class.
|
@@ -3509,43 +3531,43 @@ end
|
|
3509
3531
|
|
3510
3532
|
# @private
|
3511
3533
|
#
|
3512
|
-
# source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#
|
3534
|
+
# source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#9
|
3513
3535
|
class Mocha::ParameterMatchers::PositionalOrKeywordHash < ::Mocha::ParameterMatchers::Base
|
3514
3536
|
# @return [PositionalOrKeywordHash] a new instance of PositionalOrKeywordHash
|
3515
3537
|
#
|
3516
|
-
# source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#
|
3538
|
+
# source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#10
|
3517
3539
|
def initialize(value, expectation); end
|
3518
3540
|
|
3519
3541
|
# @return [Boolean]
|
3520
3542
|
#
|
3521
|
-
# source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#
|
3543
|
+
# source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#15
|
3522
3544
|
def matches?(available_parameters); end
|
3523
3545
|
|
3524
|
-
# source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#
|
3546
|
+
# source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#29
|
3525
3547
|
def mocha_inspect; end
|
3526
3548
|
|
3527
3549
|
private
|
3528
3550
|
|
3529
|
-
# source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#
|
3551
|
+
# source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#43
|
3530
3552
|
def deprecation_warning(actual, expected); end
|
3531
3553
|
|
3532
|
-
# source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#
|
3554
|
+
# source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#59
|
3533
3555
|
def expectation_definition; end
|
3534
3556
|
|
3535
|
-
# source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#
|
3557
|
+
# source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#35
|
3536
3558
|
def extract_parameter(available_parameters); end
|
3537
3559
|
|
3538
|
-
# source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#
|
3560
|
+
# source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#51
|
3539
3561
|
def hash_type(hash); end
|
3540
3562
|
|
3541
3563
|
# @return [Boolean]
|
3542
3564
|
#
|
3543
|
-
# source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#
|
3565
|
+
# source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#55
|
3544
3566
|
def ruby2_keywords_hash?(hash); end
|
3545
3567
|
|
3546
3568
|
# @return [Boolean]
|
3547
3569
|
#
|
3548
|
-
# source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#
|
3570
|
+
# source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#39
|
3549
3571
|
def same_type_of_hash?(actual, expected); end
|
3550
3572
|
end
|
3551
3573
|
|
@@ -3627,7 +3649,7 @@ class Mocha::ParametersMatcher
|
|
3627
3649
|
# source://mocha//lib/mocha/parameters_matcher.rb#12
|
3628
3650
|
def match?(actual_parameters = T.unsafe(nil)); end
|
3629
3651
|
|
3630
|
-
# source://mocha//lib/mocha/parameters_matcher.rb#
|
3652
|
+
# source://mocha//lib/mocha/parameters_matcher.rb#34
|
3631
3653
|
def matchers; end
|
3632
3654
|
|
3633
3655
|
# source://mocha//lib/mocha/parameters_matcher.rb#24
|
@@ -3642,6 +3664,9 @@ end
|
|
3642
3664
|
# source://mocha//lib/mocha/ruby_version.rb#2
|
3643
3665
|
Mocha::RUBY_V27_PLUS = T.let(T.unsafe(nil), TrueClass)
|
3644
3666
|
|
3667
|
+
# source://mocha//lib/mocha/ruby_version.rb#3
|
3668
|
+
Mocha::RUBY_V34_PLUS = T.let(T.unsafe(nil), FalseClass)
|
3669
|
+
|
3645
3670
|
# source://mocha//lib/mocha/raised_exception.rb#2
|
3646
3671
|
class Mocha::RaisedException
|
3647
3672
|
# @return [RaisedException] a new instance of RaisedException
|
@@ -3954,7 +3979,7 @@ end
|
|
3954
3979
|
|
3955
3980
|
# @private
|
3956
3981
|
#
|
3957
|
-
# source://mocha//lib/mocha/parameter_matchers/instance_methods.rb#
|
3982
|
+
# source://mocha//lib/mocha/parameter_matchers/instance_methods.rb#24
|
3958
3983
|
class Object < ::BasicObject
|
3959
3984
|
include ::Kernel
|
3960
3985
|
include ::PP::ObjectMixin
|
@@ -3963,7 +3988,7 @@ class Object < ::BasicObject
|
|
3963
3988
|
include ::Mocha::ObjectMethods
|
3964
3989
|
end
|
3965
3990
|
|
3966
|
-
# source://mocha//lib/mocha/inspect.rb#
|
3991
|
+
# source://mocha//lib/mocha/inspect.rb#64
|
3967
3992
|
class Time
|
3968
3993
|
include ::Comparable
|
3969
3994
|
include ::Mocha::Inspect::TimeMethods
|