packwerk 2.2.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +29 -20
  3. data/.github/workflows/cla.yml +22 -0
  4. data/.rubocop.yml +48 -19
  5. data/Gemfile +7 -2
  6. data/Gemfile.lock +201 -175
  7. data/README.md +1 -1
  8. data/RESOLVING_VIOLATIONS.md +81 -0
  9. data/Rakefile +1 -1
  10. data/USAGE.md +14 -5
  11. data/bin/m +1 -1
  12. data/bin/rake +1 -1
  13. data/bin/rubocop +1 -1
  14. data/bin/srb +1 -1
  15. data/bin/tapioca +1 -1
  16. data/gemfiles/Gemfile-rails-6-0 +1 -1
  17. data/gemfiles/Gemfile-rails-6-1 +22 -0
  18. data/lib/packwerk/application_validator.rb +7 -6
  19. data/lib/packwerk/association_inspector.rb +17 -15
  20. data/lib/packwerk/cache.rb +36 -29
  21. data/lib/packwerk/cli.rb +5 -6
  22. data/lib/packwerk/const_node_inspector.rb +8 -7
  23. data/lib/packwerk/constant_name_inspector.rb +2 -2
  24. data/lib/packwerk/deprecated_references.rb +34 -19
  25. data/lib/packwerk/file_processor.rb +14 -14
  26. data/lib/packwerk/files_for_processing.rb +27 -31
  27. data/lib/packwerk/formatters/offenses_formatter.rb +3 -3
  28. data/lib/packwerk/formatters/progress_formatter.rb +2 -2
  29. data/lib/packwerk/node.rb +1 -294
  30. data/lib/packwerk/node_helpers.rb +335 -0
  31. data/lib/packwerk/node_processor.rb +6 -5
  32. data/lib/packwerk/node_processor_factory.rb +3 -3
  33. data/lib/packwerk/node_visitor.rb +1 -1
  34. data/lib/packwerk/offense_collection.rb +6 -3
  35. data/lib/packwerk/offenses_formatter.rb +2 -2
  36. data/lib/packwerk/package.rb +3 -0
  37. data/lib/packwerk/package_set.rb +2 -0
  38. data/lib/packwerk/parse_run.rb +15 -13
  39. data/lib/packwerk/parsed_constant_definitions.rb +23 -20
  40. data/lib/packwerk/parsers/erb.rb +3 -3
  41. data/lib/packwerk/reference_checking/checkers/checker.rb +16 -3
  42. data/lib/packwerk/reference_checking/checkers/dependency_checker.rb +16 -0
  43. data/lib/packwerk/reference_checking/checkers/privacy_checker.rb +18 -0
  44. data/lib/packwerk/reference_checking/reference_checker.rb +3 -1
  45. data/lib/packwerk/reference_extractor.rb +51 -48
  46. data/lib/packwerk/reference_offense.rb +3 -27
  47. data/lib/packwerk/run_context.rb +3 -3
  48. data/lib/packwerk/spring_command.rb +1 -1
  49. data/lib/packwerk/version.rb +1 -1
  50. data/lib/packwerk.rb +1 -0
  51. data/packwerk.gemspec +4 -12
  52. data/sorbet/rbi/gems/actioncable@7.0.3.1.rbi +2754 -0
  53. data/sorbet/rbi/gems/actionmailbox@7.0.3.1.rbi +1496 -0
  54. data/sorbet/rbi/gems/actionmailer@7.0.3.1.rbi +2362 -0
  55. data/sorbet/rbi/gems/actionpack@7.0.3.1.rbi +19397 -0
  56. data/sorbet/rbi/gems/actiontext@7.0.3.1.rbi +1569 -0
  57. data/sorbet/rbi/gems/actionview@7.0.3.1.rbi +14907 -0
  58. data/sorbet/rbi/gems/activejob@7.0.3.1.rbi +2553 -0
  59. data/sorbet/rbi/gems/activemodel@7.0.3.1.rbi +5999 -0
  60. data/sorbet/rbi/gems/activerecord@7.0.3.1.rbi +37832 -0
  61. data/sorbet/rbi/gems/activestorage@7.0.3.1.rbi +2321 -0
  62. data/sorbet/rbi/gems/activesupport@7.0.3.1.rbi +18818 -0
  63. data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +11722 -0
  64. data/sorbet/rbi/gems/constant_resolver@0.2.0.rbi +90 -0
  65. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1079 -0
  66. data/sorbet/rbi/gems/digest@3.1.0.rbi +189 -0
  67. data/sorbet/rbi/gems/erubi@1.11.0.rbi +140 -0
  68. data/sorbet/rbi/gems/globalid@1.0.0.rbi +572 -0
  69. data/sorbet/rbi/gems/i18n@1.12.0.rbi +2296 -0
  70. data/sorbet/rbi/gems/json@2.6.2.rbi +1548 -0
  71. data/sorbet/rbi/gems/language_server-protocol@3.16.0.3.rbi +8 -0
  72. data/sorbet/rbi/gems/loofah@2.18.0.rbi +877 -0
  73. data/sorbet/rbi/gems/m@1.6.0.rbi +257 -0
  74. data/sorbet/rbi/gems/marcel@1.0.2.rbi +220 -0
  75. data/sorbet/rbi/gems/mini_mime@1.1.2.rbi +170 -0
  76. data/sorbet/rbi/gems/mini_portile2@2.8.0.rbi +8 -0
  77. data/sorbet/rbi/gems/minitest-focus@1.3.1.rbi +104 -0
  78. data/sorbet/rbi/gems/minitest@5.16.2.rbi +2136 -0
  79. data/sorbet/rbi/gems/mocha@1.14.0.rbi +4177 -0
  80. data/sorbet/rbi/gems/net-imap@0.2.3.rbi +2147 -0
  81. data/sorbet/rbi/gems/net-pop@0.1.1.rbi +926 -0
  82. data/sorbet/rbi/gems/net-protocol@0.1.3.rbi +11 -0
  83. data/sorbet/rbi/gems/net-smtp@0.3.1.rbi +1108 -0
  84. data/sorbet/rbi/gems/netrc@0.11.0.rbi +153 -0
  85. data/sorbet/rbi/gems/nio4r@2.5.8.rbi +292 -0
  86. data/sorbet/rbi/gems/nokogiri@1.13.8.rbi +6478 -0
  87. data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
  88. data/sorbet/rbi/gems/parser@3.1.2.1.rbi +9029 -0
  89. data/sorbet/rbi/gems/prettier_print@0.1.0.rbi +8 -0
  90. data/sorbet/rbi/gems/pry@0.14.1.rbi +8 -0
  91. data/sorbet/rbi/gems/racc@1.6.0.rbi +152 -0
  92. data/sorbet/rbi/gems/rack-test@2.0.2.rbi +953 -0
  93. data/sorbet/rbi/gems/rack@2.2.4.rbi +5636 -0
  94. data/sorbet/rbi/gems/rails-html-sanitizer@1.4.3.rbi +688 -0
  95. data/sorbet/rbi/gems/rails@7.0.3.1.rbi +8 -0
  96. data/sorbet/rbi/gems/railties@7.0.3.1.rbi +3507 -0
  97. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +392 -0
  98. data/sorbet/rbi/gems/rake@13.0.6.rbi +2924 -0
  99. data/sorbet/rbi/gems/rbi@0.0.15.rbi +3007 -0
  100. data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +3383 -0
  101. data/sorbet/rbi/gems/rexml@3.2.5.rbi +4714 -0
  102. data/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi +6961 -0
  103. data/sorbet/rbi/gems/rubocop-performance@1.14.3.rbi +2986 -0
  104. data/sorbet/rbi/gems/{rubocop-shopify@2.0.1.rbi → rubocop-shopify@2.9.0.rbi} +4 -4
  105. data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +992 -0
  106. data/sorbet/rbi/gems/rubocop@1.34.1.rbi +51820 -0
  107. data/sorbet/rbi/gems/ruby-lsp@0.2.1.rbi +11 -0
  108. data/sorbet/rbi/gems/smart_properties@1.17.0.rbi +474 -0
  109. data/sorbet/rbi/gems/spoom@1.1.11.rbi +2181 -0
  110. data/sorbet/rbi/gems/spring@4.0.0.rbi +411 -0
  111. data/sorbet/rbi/gems/strscan@3.0.4.rbi +8 -0
  112. data/sorbet/rbi/gems/syntax_tree@3.3.0.rbi +8 -0
  113. data/sorbet/rbi/gems/tapioca@0.9.2.rbi +3181 -0
  114. data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
  115. data/sorbet/rbi/gems/timeout@0.3.0.rbi +142 -0
  116. data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +5896 -0
  117. data/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi +48 -0
  118. data/sorbet/rbi/gems/unparser@0.6.5.rbi +4529 -0
  119. data/sorbet/rbi/gems/webrick@1.7.0.rbi +2582 -0
  120. data/sorbet/rbi/gems/websocket-driver@0.7.5.rbi +993 -0
  121. data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +388 -0
  122. data/sorbet/rbi/gems/yard@0.9.28.rbi +18242 -0
  123. data/sorbet/rbi/gems/zeitwerk@2.6.0.rbi +867 -0
  124. data/sorbet/rbi/shims/psych.rbi +5 -0
  125. data/sorbet/tapioca/require.rb +2 -3
  126. metadata +88 -157
  127. data/.github/probots.yml +0 -2
  128. data/library.yml +0 -6
  129. data/service.yml +0 -1
  130. data/sorbet/rbi/gems/actioncable@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -860
  131. data/sorbet/rbi/gems/actionmailbox@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -568
  132. data/sorbet/rbi/gems/actionmailer@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -587
  133. data/sorbet/rbi/gems/actionpack@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -5314
  134. data/sorbet/rbi/gems/actiontext@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -699
  135. data/sorbet/rbi/gems/actionview@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -2515
  136. data/sorbet/rbi/gems/activejob@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -624
  137. data/sorbet/rbi/gems/activemodel@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -1248
  138. data/sorbet/rbi/gems/activerecord@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -8363
  139. data/sorbet/rbi/gems/activestorage@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -876
  140. data/sorbet/rbi/gems/activesupport@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -3987
  141. data/sorbet/rbi/gems/colorize@0.8.1.rbi +0 -40
  142. data/sorbet/rbi/gems/commander@4.5.2.rbi +0 -8
  143. data/sorbet/rbi/gems/concurrent-ruby@1.1.8.rbi +0 -1969
  144. data/sorbet/rbi/gems/constant_resolver@0.1.5.rbi +0 -26
  145. data/sorbet/rbi/gems/erubi@1.10.0.rbi +0 -41
  146. data/sorbet/rbi/gems/globalid@0.4.2.rbi +0 -178
  147. data/sorbet/rbi/gems/highline@2.0.3.rbi +0 -8
  148. data/sorbet/rbi/gems/i18n@1.8.10.rbi +0 -600
  149. data/sorbet/rbi/gems/loofah@2.9.0.rbi +0 -274
  150. data/sorbet/rbi/gems/m@1.5.1.rbi +0 -108
  151. data/sorbet/rbi/gems/marcel@1.0.0.rbi +0 -70
  152. data/sorbet/rbi/gems/mini_mime@1.0.3.rbi +0 -71
  153. data/sorbet/rbi/gems/minitest-focus@1.2.1.rbi +0 -8
  154. data/sorbet/rbi/gems/minitest@5.14.4.rbi +0 -544
  155. data/sorbet/rbi/gems/mocha@1.12.0.rbi +0 -953
  156. data/sorbet/rbi/gems/nio4r@2.5.7.rbi +0 -90
  157. data/sorbet/rbi/gems/nokogiri@1.11.2.rbi +0 -1647
  158. data/sorbet/rbi/gems/parallel@1.20.1.rbi +0 -117
  159. data/sorbet/rbi/gems/parlour@6.0.0.rbi +0 -1272
  160. data/sorbet/rbi/gems/parser@3.0.0.0.rbi +0 -1745
  161. data/sorbet/rbi/gems/pry@0.14.0.rbi +0 -8
  162. data/sorbet/rbi/gems/psych@3.3.2.rbi +0 -24
  163. data/sorbet/rbi/gems/racc@1.5.2.rbi +0 -57
  164. data/sorbet/rbi/gems/rack-test@1.1.0.rbi +0 -335
  165. data/sorbet/rbi/gems/rack@2.2.3.rbi +0 -1718
  166. data/sorbet/rbi/gems/rails-html-sanitizer@1.3.0.rbi +0 -213
  167. data/sorbet/rbi/gems/rails@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -8
  168. data/sorbet/rbi/gems/railties@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -880
  169. data/sorbet/rbi/gems/rainbow@3.0.0.rbi +0 -155
  170. data/sorbet/rbi/gems/rake@13.0.3.rbi +0 -837
  171. data/sorbet/rbi/gems/regexp_parser@2.1.1.rbi +0 -8
  172. data/sorbet/rbi/gems/rexml@3.2.4.rbi +0 -8
  173. data/sorbet/rbi/gems/rubocop-ast@1.4.1.rbi +0 -8
  174. data/sorbet/rbi/gems/rubocop-performance@1.10.2.rbi +0 -8
  175. data/sorbet/rbi/gems/rubocop-sorbet@0.6.1.rbi +0 -8
  176. data/sorbet/rbi/gems/rubocop@1.12.0.rbi +0 -8
  177. data/sorbet/rbi/gems/smart_properties@1.15.0.rbi +0 -168
  178. data/sorbet/rbi/gems/spoom@1.1.0.rbi +0 -1061
  179. data/sorbet/rbi/gems/spring@2.1.1.rbi +0 -160
  180. data/sorbet/rbi/gems/sprockets-rails@3.2.2.rbi +0 -451
  181. data/sorbet/rbi/gems/sprockets@4.0.2.rbi +0 -1133
  182. data/sorbet/rbi/gems/tapioca@0.4.19.rbi +0 -603
  183. data/sorbet/rbi/gems/thor@1.1.0.rbi +0 -893
  184. data/sorbet/rbi/gems/tzinfo@2.0.4.rbi +0 -566
  185. data/sorbet/rbi/gems/unicode-display_width@2.0.0.rbi +0 -8
  186. data/sorbet/rbi/gems/websocket-driver@0.7.3.rbi +0 -438
  187. data/sorbet/rbi/gems/zeitwerk@2.4.2.rbi +0 -177
@@ -1,953 +0,0 @@
1
- # DO NOT EDIT MANUALLY
2
- # This is an autogenerated file for types exported from the `mocha` gem.
3
- # Please instead update this file by running `bin/tapioca sync`.
4
-
5
- # typed: true
6
-
7
- module Mocha
8
- class << self
9
- def configuration; end
10
- def configure; end
11
- end
12
- end
13
-
14
- module Mocha::API
15
- include(::Mocha::ParameterMatchers)
16
- include(::Mocha::Hooks)
17
-
18
- def mock(*arguments); end
19
- def sequence(name); end
20
- def states(name); end
21
- def stub(*arguments); end
22
- def stub_everything(*arguments); end
23
-
24
- class << self
25
- def extended(mod); end
26
- def included(_mod); end
27
- end
28
- end
29
-
30
- class Mocha::AnyInstanceMethod < ::Mocha::StubbedMethod
31
-
32
- private
33
-
34
- def method_body(method); end
35
- def mock_owner; end
36
- def original_method_owner; end
37
- def stubbee_method(method_name); end
38
- end
39
-
40
- class Mocha::AnyInstanceReceiver
41
- def initialize(klass); end
42
-
43
- def mocks; end
44
- end
45
-
46
- class Mocha::ArgumentIterator
47
- def initialize(argument); end
48
-
49
- def each; end
50
- end
51
-
52
- class Mocha::BacktraceFilter
53
- def initialize(lib_directory = T.unsafe(nil)); end
54
-
55
- def filtered(backtrace); end
56
- end
57
-
58
- Mocha::BacktraceFilter::LIB_DIRECTORY = T.let(T.unsafe(nil), String)
59
-
60
- module Mocha::BlockMatchers
61
- end
62
-
63
- class Mocha::BlockMatchers::BlockGiven
64
- def match?(actual_block); end
65
- def mocha_inspect; end
66
- end
67
-
68
- class Mocha::BlockMatchers::NoBlockGiven
69
- def match?(actual_block); end
70
- def mocha_inspect; end
71
- end
72
-
73
- class Mocha::BlockMatchers::OptionalBlock
74
- def match?(_actual_block); end
75
- def mocha_inspect; end
76
- end
77
-
78
- class Mocha::Cardinality
79
- def initialize(required = T.unsafe(nil), maximum = T.unsafe(nil)); end
80
-
81
- def <<(invocation); end
82
- def actual_invocations; end
83
- def allowed_any_number_of_times?; end
84
- def anticipated_times; end
85
- def at_least(count); end
86
- def at_most(count); end
87
- def exactly(count); end
88
- def invocations_allowed?; end
89
- def invoked_times; end
90
- def needs_verifying?; end
91
- def satisfied?; end
92
- def times(range_or_count); end
93
- def used?; end
94
- def verified?; end
95
-
96
- protected
97
-
98
- def count(number); end
99
- def infinite?(number); end
100
- def maximum; end
101
- def required; end
102
- def update(required, maximum); end
103
- end
104
-
105
- Mocha::Cardinality::INFINITY = T.let(T.unsafe(nil), Float)
106
-
107
- class Mocha::Central
108
- def initialize; end
109
-
110
- def stub(method); end
111
- def stubba_methods; end
112
- def stubba_methods=(_arg0); end
113
- def unstub(method); end
114
- def unstub_all; end
115
- end
116
-
117
- class Mocha::Central::Null < ::Mocha::Central
118
- def initialize(&block); end
119
-
120
- def stub(*_arg0); end
121
- def unstub(*_arg0); end
122
- end
123
-
124
- class Mocha::ChangeStateSideEffect
125
- def initialize(state); end
126
-
127
- def mocha_inspect; end
128
- def perform; end
129
- end
130
-
131
- module Mocha::ClassMethods
132
- def __method_exists__?(method, include_public_methods = T.unsafe(nil)); end
133
- def __method_visibility__(method, include_public_methods = T.unsafe(nil)); end
134
- def any_instance; end
135
- end
136
-
137
- class Mocha::ClassMethods::AnyInstance
138
- def initialize(klass); end
139
-
140
- def mocha(instantiate = T.unsafe(nil)); end
141
- def respond_to?(method); end
142
- def stubba_class; end
143
- def stubba_method; end
144
- def stubba_object; end
145
- end
146
-
147
- class Mocha::Configuration
148
- def initialize(options = T.unsafe(nil)); end
149
-
150
- def display_matching_invocations_on_failure=(value); end
151
- def display_matching_invocations_on_failure?; end
152
- def merge(other); end
153
- def reinstate_undocumented_behaviour_from_v1_9=(value); end
154
- def reinstate_undocumented_behaviour_from_v1_9?; end
155
- def stubbing_method_on_nil; end
156
- def stubbing_method_on_nil=(value); end
157
- def stubbing_method_on_non_mock_object; end
158
- def stubbing_method_on_non_mock_object=(value); end
159
- def stubbing_method_unnecessarily; end
160
- def stubbing_method_unnecessarily=(value); end
161
- def stubbing_non_existent_method; end
162
- def stubbing_non_existent_method=(value); end
163
- def stubbing_non_public_method; end
164
- def stubbing_non_public_method=(value); end
165
-
166
- protected
167
-
168
- def options; end
169
-
170
- private
171
-
172
- def initialize_copy(other); end
173
-
174
- class << self
175
- def allow(action, &block); end
176
- def allow?(action); end
177
- def configuration; end
178
- def override(temporary_options); end
179
- def prevent(action, &block); end
180
- def prevent?(action); end
181
- def reset_configuration; end
182
- def warn_when(action, &block); end
183
- def warn_when?(action); end
184
-
185
- private
186
-
187
- def change_config(action, new_value, &block); end
188
- def temporarily_change_config(action, new_value); end
189
- end
190
- end
191
-
192
- Mocha::Configuration::DEFAULTS = T.let(T.unsafe(nil), Hash)
193
-
194
- module Mocha::Debug
195
- class << self
196
- def puts(message); end
197
- end
198
- end
199
-
200
- Mocha::Debug::OPTIONS = T.let(T.unsafe(nil), Hash)
201
-
202
- class Mocha::DefaultName
203
- def initialize(mock); end
204
-
205
- def mocha_inspect; end
206
- end
207
-
208
- class Mocha::DefaultReceiver
209
- def initialize(mock); end
210
-
211
- def mocks; end
212
- end
213
-
214
- class Mocha::Deprecation
215
- class << self
216
- def messages; end
217
- def messages=(_arg0); end
218
- def mode; end
219
- def mode=(_arg0); end
220
- def warning(*messages); end
221
- end
222
- end
223
-
224
- module Mocha::Detection
225
- end
226
-
227
- module Mocha::Detection::MiniTest
228
- class << self
229
- def testcase; end
230
- def version; end
231
- end
232
- end
233
-
234
- class Mocha::ErrorWithFilteredBacktrace < ::StandardError
235
- def initialize(message = T.unsafe(nil), backtrace = T.unsafe(nil)); end
236
- end
237
-
238
- class Mocha::ExceptionRaiser
239
- def initialize(exception, message); end
240
-
241
- def evaluate(invocation); end
242
- end
243
-
244
- class Mocha::Expectation
245
- def initialize(mock, expected_method_name, backtrace = T.unsafe(nil)); end
246
-
247
- def add_in_sequence_ordering_constraint(sequence); end
248
- def add_ordering_constraint(ordering_constraint); end
249
- def add_side_effect(side_effect); end
250
- def at_least(minimum_number_of_times); end
251
- def at_least_once; end
252
- def at_most(maximum_number_of_times); end
253
- def at_most_once; end
254
- def backtrace; end
255
- def in_correct_order?; end
256
- def in_sequence(sequence, *sequences); end
257
- def inspect; end
258
- def invocations_allowed?; end
259
- def invoke(invocation); end
260
- def match?(invocation); end
261
- def matches_method?(method_name); end
262
- def method_signature; end
263
- def mocha_inspect; end
264
- def multiple_yields(*parameter_groups); end
265
- def never; end
266
- def once; end
267
- def perform_side_effects; end
268
- def raises(exception = T.unsafe(nil), message = T.unsafe(nil)); end
269
- def returns(*values); end
270
- def satisfied?; end
271
- def then(state = T.unsafe(nil)); end
272
- def throws(tag, object = T.unsafe(nil)); end
273
- def times(range); end
274
- def twice; end
275
- def used?; end
276
- def verified?(assertion_counter = T.unsafe(nil)); end
277
- def when(state_predicate); end
278
- def with(*expected_parameters, &matching_block); end
279
- def with_block_given; end
280
- def with_no_block_given; end
281
- def yields(*parameters); end
282
- end
283
-
284
- class Mocha::ExpectationError < ::Exception
285
- end
286
-
287
- class Mocha::ExpectationErrorFactory
288
- class << self
289
- def build(message = T.unsafe(nil), backtrace = T.unsafe(nil)); end
290
- def exception_class; end
291
- def exception_class=(_arg0); end
292
- end
293
- end
294
-
295
- class Mocha::ExpectationList
296
- def initialize(expectations = T.unsafe(nil)); end
297
-
298
- def +(other); end
299
- def add(expectation); end
300
- def any?; end
301
- def length; end
302
- def match(invocation); end
303
- def match_allowing_invocation(invocation); end
304
- def matches_method?(method_name); end
305
- def remove_all_matching_method(method_name); end
306
- def to_a; end
307
- def to_set; end
308
- def verified?(assertion_counter = T.unsafe(nil)); end
309
-
310
- private
311
-
312
- def matching_expectations(invocation); end
313
- end
314
-
315
- module Mocha::Hooks
316
- def mocha_setup; end
317
- def mocha_teardown; end
318
- def mocha_verify(assertion_counter = T.unsafe(nil)); end
319
- end
320
-
321
- class Mocha::ImpersonatingAnyInstanceName
322
- def initialize(klass); end
323
-
324
- def mocha_inspect; end
325
- end
326
-
327
- class Mocha::ImpersonatingName
328
- def initialize(object); end
329
-
330
- def mocha_inspect; end
331
- end
332
-
333
- class Mocha::InStateOrderingConstraint
334
- def initialize(state_predicate); end
335
-
336
- def allows_invocation_now?; end
337
- def mocha_inspect; end
338
- end
339
-
340
- module Mocha::Inspect
341
- end
342
-
343
- module Mocha::Inspect::ArrayMethods
344
- def mocha_inspect; end
345
- end
346
-
347
- module Mocha::Inspect::DateMethods
348
- def mocha_inspect; end
349
- end
350
-
351
- module Mocha::Inspect::HashMethods
352
- def mocha_inspect; end
353
- end
354
-
355
- module Mocha::Inspect::ObjectMethods
356
- def mocha_inspect; end
357
- end
358
-
359
- module Mocha::Inspect::TimeMethods
360
- def mocha_inspect; end
361
- end
362
-
363
- class Mocha::InstanceMethod < ::Mocha::StubbedMethod
364
-
365
- private
366
-
367
- def method_body(method); end
368
- def mock_owner; end
369
- def original_method_owner; end
370
- def stubbee_method(method_name); end
371
- end
372
-
373
- module Mocha::Integration
374
- end
375
-
376
- class Mocha::Integration::AssertionCounter
377
- def initialize(test_case); end
378
-
379
- def increment; end
380
- end
381
-
382
- module Mocha::Integration::MiniTest
383
- class << self
384
- def activate; end
385
- def translate(exception); end
386
- end
387
- end
388
-
389
- module Mocha::Integration::MiniTest::Adapter
390
- include(::Mocha::ParameterMatchers)
391
- include(::Mocha::Hooks)
392
- include(::Mocha::API)
393
-
394
- def after_teardown; end
395
- def before_setup; end
396
- def before_teardown; end
397
-
398
- class << self
399
- def applicable_to?(mini_test_version); end
400
- def description; end
401
- def included(_mod); end
402
- end
403
- end
404
-
405
- module Mocha::Integration::MiniTest::Nothing
406
- class << self
407
- def applicable_to?(_test_unit_version, _ruby_version = T.unsafe(nil)); end
408
- def description; end
409
- def included(_mod); end
410
- end
411
- end
412
-
413
- module Mocha::Integration::MiniTest::Version13
414
- class << self
415
- def applicable_to?(mini_test_version); end
416
- def description; end
417
- def included(mod); end
418
- end
419
- end
420
-
421
- module Mocha::Integration::MiniTest::Version13::RunMethodPatch
422
- def run(runner); end
423
- end
424
-
425
- module Mocha::Integration::MiniTest::Version140
426
- class << self
427
- def applicable_to?(mini_test_version); end
428
- def description; end
429
- def included(mod); end
430
- end
431
- end
432
-
433
- module Mocha::Integration::MiniTest::Version140::RunMethodPatch
434
- def run(runner); end
435
- end
436
-
437
- module Mocha::Integration::MiniTest::Version141
438
- class << self
439
- def applicable_to?(mini_test_version); end
440
- def description; end
441
- def included(mod); end
442
- end
443
- end
444
-
445
- module Mocha::Integration::MiniTest::Version141::RunMethodPatch
446
- def run(runner); end
447
- end
448
-
449
- module Mocha::Integration::MiniTest::Version142To172
450
- class << self
451
- def applicable_to?(mini_test_version); end
452
- def description; end
453
- def included(mod); end
454
- end
455
- end
456
-
457
- module Mocha::Integration::MiniTest::Version142To172::RunMethodPatch
458
- def run(runner); end
459
- end
460
-
461
- module Mocha::Integration::MiniTest::Version200
462
- class << self
463
- def applicable_to?(mini_test_version); end
464
- def description; end
465
- def included(mod); end
466
- end
467
- end
468
-
469
- module Mocha::Integration::MiniTest::Version200::RunMethodPatch
470
- def run(runner); end
471
- end
472
-
473
- module Mocha::Integration::MiniTest::Version201To222
474
- class << self
475
- def applicable_to?(mini_test_version); end
476
- def description; end
477
- def included(mod); end
478
- end
479
- end
480
-
481
- module Mocha::Integration::MiniTest::Version201To222::RunMethodPatch
482
- def run(runner); end
483
- end
484
-
485
- module Mocha::Integration::MiniTest::Version2110To2111
486
- class << self
487
- def applicable_to?(mini_test_version); end
488
- def description; end
489
- def included(mod); end
490
- end
491
- end
492
-
493
- module Mocha::Integration::MiniTest::Version2110To2111::RunMethodPatch
494
- def run(runner); end
495
- end
496
-
497
- module Mocha::Integration::MiniTest::Version2112To320
498
- class << self
499
- def applicable_to?(mini_test_version); end
500
- def description; end
501
- def included(mod); end
502
- end
503
- end
504
-
505
- module Mocha::Integration::MiniTest::Version2112To320::RunMethodPatch
506
- def run(runner); end
507
- end
508
-
509
- module Mocha::Integration::MiniTest::Version230To2101
510
- class << self
511
- def applicable_to?(mini_test_version); end
512
- def description; end
513
- def included(mod); end
514
- end
515
- end
516
-
517
- module Mocha::Integration::MiniTest::Version230To2101::RunMethodPatch
518
- def run(runner); end
519
- end
520
-
521
- module Mocha::Integration::MonkeyPatcher
522
- class << self
523
- def apply(mod, run_method_patch); end
524
- end
525
- end
526
-
527
- class Mocha::Invocation
528
- def initialize(mock, method_name, *arguments, &block); end
529
-
530
- def arguments; end
531
- def block; end
532
- def call(yield_parameters = T.unsafe(nil), return_values = T.unsafe(nil)); end
533
- def call_description; end
534
- def full_description; end
535
- def method_name; end
536
- def raised(exception); end
537
- def result_description; end
538
- def returned(value); end
539
- def short_call_description; end
540
- def threw(tag, value); end
541
- end
542
-
543
- class Mocha::Logger
544
- def initialize(io); end
545
-
546
- def warn(message); end
547
- end
548
-
549
- class Mocha::MethodMatcher
550
- def initialize(expected_method_name); end
551
-
552
- def expected_method_name; end
553
- def match?(actual_method_name); end
554
- def mocha_inspect; end
555
- end
556
-
557
- class Mocha::Mock
558
- def initialize(mockery, name = T.unsafe(nil), receiver = T.unsafe(nil)); end
559
-
560
- def __expectations__; end
561
- def __expects__(method_name_or_hash, backtrace = T.unsafe(nil)); end
562
- def __expire__; end
563
- def __singleton_class__; end
564
- def __stubs__(method_name_or_hash, backtrace = T.unsafe(nil)); end
565
- def __verified__?(assertion_counter = T.unsafe(nil)); end
566
- def all_expectations; end
567
- def any_expectations?; end
568
- def ensure_method_not_already_defined(method_name); end
569
- def everything_stubbed; end
570
- def expects(method_name_or_hash, backtrace = T.unsafe(nil)); end
571
- def inspect; end
572
- def method_missing(symbol, *arguments, &block); end
573
- def mocha_inspect; end
574
- def quacks_like(responder); end
575
- def quacks_like_instance_of(responder_class); end
576
- def responds_like(responder); end
577
- def responds_like_instance_of(responder_class); end
578
- def stub_everything; end
579
- def stubs(method_name_or_hash, backtrace = T.unsafe(nil)); end
580
- def unstub(*method_names); end
581
-
582
- private
583
-
584
- def check_expiry; end
585
- def check_responder_responds_to(symbol); end
586
- def raise_unexpected_invocation_error(invocation, matching_expectation); end
587
- def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end
588
- end
589
-
590
- class Mocha::Mockery
591
- def logger; end
592
- def logger=(_arg0); end
593
- def mocha_inspect; end
594
- def mock_impersonating(object); end
595
- def mock_impersonating_any_instance_of(klass); end
596
- def mocks; end
597
- def named_mock(name); end
598
- def new_state_machine(name); end
599
- def on_stubbing(object, method); end
600
- def state_machines; end
601
- def stubba; end
602
- def teardown; end
603
- def unnamed_mock; end
604
- def verify(assertion_counter = T.unsafe(nil)); end
605
-
606
- private
607
-
608
- def add_mock(mock); end
609
- def add_state_machine(state_machine); end
610
- def check(action, description, signature_proc, backtrace = T.unsafe(nil)); end
611
- def expectations; end
612
- def reset; end
613
- def satisfied_expectations; end
614
- def unsatisfied_expectations; end
615
-
616
- class << self
617
- def instance; end
618
- def setup; end
619
- def teardown; end
620
- def verify(*args); end
621
- end
622
- end
623
-
624
- class Mocha::Mockery::Null < ::Mocha::Mockery
625
- def add_mock(*_arg0); end
626
- def add_state_machine(*_arg0); end
627
- def stubba; end
628
-
629
- private
630
-
631
- def raise_not_initialized_error; end
632
- end
633
-
634
- class Mocha::Name
635
- def initialize(name); end
636
-
637
- def mocha_inspect; end
638
- end
639
-
640
- class Mocha::NotInitializedError < ::Mocha::ErrorWithFilteredBacktrace
641
- end
642
-
643
- module Mocha::ObjectMethods
644
- def _method(_arg0); end
645
- def expects(expected_methods_vs_return_values); end
646
- def mocha(instantiate = T.unsafe(nil)); end
647
- def reset_mocha; end
648
- def stubba_class; end
649
- def stubba_method; end
650
- def stubba_object; end
651
- def stubs(stubbed_methods_vs_return_values); end
652
- def unstub(*method_names); end
653
- end
654
-
655
- class Mocha::ObjectReceiver
656
- def initialize(object); end
657
-
658
- def mocks; end
659
- end
660
-
661
- module Mocha::ParameterMatchers
662
- def Not(matcher); end
663
- def all_of(*matchers); end
664
- def any_of(*matchers); end
665
- def any_parameters; end
666
- def anything; end
667
- def equals(value); end
668
- def equivalent_uri(uri); end
669
- def has_entries(entries); end
670
- def has_entry(*options); end
671
- def has_key(key); end
672
- def has_value(value); end
673
- def includes(*items); end
674
- def instance_of(klass); end
675
- def is_a(klass); end
676
- def kind_of(klass); end
677
- def optionally(*matchers); end
678
- def regexp_matches(regexp); end
679
- def responds_with(message, result); end
680
- def yaml_equivalent(object); end
681
- end
682
-
683
- class Mocha::ParameterMatchers::AllOf < ::Mocha::ParameterMatchers::Base
684
- def initialize(*matchers); end
685
-
686
- def matches?(available_parameters); end
687
- def mocha_inspect; end
688
- end
689
-
690
- class Mocha::ParameterMatchers::AnyOf < ::Mocha::ParameterMatchers::Base
691
- def initialize(*matchers); end
692
-
693
- def matches?(available_parameters); end
694
- def mocha_inspect; end
695
- end
696
-
697
- class Mocha::ParameterMatchers::AnyParameters < ::Mocha::ParameterMatchers::Base
698
- def matches?(available_parameters); end
699
- def mocha_inspect; end
700
- end
701
-
702
- class Mocha::ParameterMatchers::Anything < ::Mocha::ParameterMatchers::Base
703
- def matches?(available_parameters); end
704
- def mocha_inspect; end
705
- end
706
-
707
- class Mocha::ParameterMatchers::Base
708
- def &(other); end
709
- def to_matcher; end
710
- def |(other); end
711
- end
712
-
713
- class Mocha::ParameterMatchers::Equals < ::Mocha::ParameterMatchers::Base
714
- def initialize(value); end
715
-
716
- def matches?(available_parameters); end
717
- def mocha_inspect; end
718
- end
719
-
720
- class Mocha::ParameterMatchers::EquivalentUri < ::Mocha::ParameterMatchers::Base
721
- def initialize(uri); end
722
-
723
- def matches?(available_parameters); end
724
- def mocha_inspect; end
725
-
726
- private
727
-
728
- def explode(uri); end
729
- end
730
-
731
- class Mocha::ParameterMatchers::HasEntries < ::Mocha::ParameterMatchers::Base
732
- def initialize(entries); end
733
-
734
- def matches?(available_parameters); end
735
- def mocha_inspect; end
736
- end
737
-
738
- class Mocha::ParameterMatchers::HasEntry < ::Mocha::ParameterMatchers::Base
739
- def initialize(key, value); end
740
-
741
- def matches?(available_parameters); end
742
- def mocha_inspect; end
743
- end
744
-
745
- class Mocha::ParameterMatchers::HasKey < ::Mocha::ParameterMatchers::Base
746
- def initialize(key); end
747
-
748
- def matches?(available_parameters); end
749
- def mocha_inspect; end
750
- end
751
-
752
- class Mocha::ParameterMatchers::HasValue < ::Mocha::ParameterMatchers::Base
753
- def initialize(value); end
754
-
755
- def matches?(available_parameters); end
756
- def mocha_inspect; end
757
- end
758
-
759
- class Mocha::ParameterMatchers::Includes < ::Mocha::ParameterMatchers::Base
760
- def initialize(*items); end
761
-
762
- def matches?(available_parameters); end
763
- def mocha_inspect; end
764
- end
765
-
766
- module Mocha::ParameterMatchers::InstanceMethods
767
- def to_matcher; end
768
- end
769
-
770
- class Mocha::ParameterMatchers::InstanceOf < ::Mocha::ParameterMatchers::Base
771
- def initialize(klass); end
772
-
773
- def matches?(available_parameters); end
774
- def mocha_inspect; end
775
- end
776
-
777
- class Mocha::ParameterMatchers::IsA < ::Mocha::ParameterMatchers::Base
778
- def initialize(klass); end
779
-
780
- def matches?(available_parameters); end
781
- def mocha_inspect; end
782
- end
783
-
784
- class Mocha::ParameterMatchers::KindOf < ::Mocha::ParameterMatchers::Base
785
- def initialize(klass); end
786
-
787
- def matches?(available_parameters); end
788
- def mocha_inspect; end
789
- end
790
-
791
- class Mocha::ParameterMatchers::Not < ::Mocha::ParameterMatchers::Base
792
- def initialize(matcher); end
793
-
794
- def matches?(available_parameters); end
795
- def mocha_inspect; end
796
- end
797
-
798
- class Mocha::ParameterMatchers::Optionally < ::Mocha::ParameterMatchers::Base
799
- def initialize(*parameters); end
800
-
801
- def matches?(available_parameters); end
802
- def mocha_inspect; end
803
- end
804
-
805
- class Mocha::ParameterMatchers::RegexpMatches < ::Mocha::ParameterMatchers::Base
806
- def initialize(regexp); end
807
-
808
- def matches?(available_parameters); end
809
- def mocha_inspect; end
810
- end
811
-
812
- class Mocha::ParameterMatchers::RespondsWith < ::Mocha::ParameterMatchers::Base
813
- def initialize(message, result); end
814
-
815
- def matches?(available_parameters); end
816
- def mocha_inspect; end
817
- end
818
-
819
- class Mocha::ParameterMatchers::YamlEquivalent < ::Mocha::ParameterMatchers::Base
820
- def initialize(object); end
821
-
822
- def matches?(available_parameters); end
823
- def mocha_inspect; end
824
- end
825
-
826
- class Mocha::ParametersMatcher
827
- def initialize(expected_parameters = T.unsafe(nil), &matching_block); end
828
-
829
- def match?(actual_parameters = T.unsafe(nil)); end
830
- def matchers; end
831
- def mocha_inspect; end
832
- def parameters_match?(actual_parameters); end
833
- end
834
-
835
- Mocha::RUBY_V2_PLUS = T.let(T.unsafe(nil), TrueClass)
836
-
837
- class Mocha::RaisedException
838
- def initialize(exception); end
839
-
840
- def mocha_inspect; end
841
- end
842
-
843
- class Mocha::ReturnValues
844
- def initialize(*values); end
845
-
846
- def +(other); end
847
- def next(invocation); end
848
- def values; end
849
- def values=(_arg0); end
850
-
851
- class << self
852
- def build(*values); end
853
- end
854
- end
855
-
856
- class Mocha::Sequence
857
- def initialize(name); end
858
-
859
- def constrain_as_next_in_sequence(expectation); end
860
- def mocha_inspect; end
861
- def satisfied_to_index?(index); end
862
- end
863
-
864
- class Mocha::Sequence::InSequenceOrderingConstraint
865
- def initialize(sequence, index); end
866
-
867
- def allows_invocation_now?; end
868
- def mocha_inspect; end
869
- end
870
-
871
- class Mocha::SingleReturnValue
872
- def initialize(value); end
873
-
874
- def evaluate(invocation); end
875
- end
876
-
877
- class Mocha::StateMachine
878
- def initialize(name); end
879
-
880
- def become(next_state_name); end
881
- def current_state; end
882
- def current_state=(_arg0); end
883
- def is(state_name); end
884
- def is_not(unexpected_state_name); end
885
- def mocha_inspect; end
886
- def name; end
887
- def starts_as(initial_state_name); end
888
- end
889
-
890
- class Mocha::StateMachine::State < ::Mocha::StateMachine::StatePredicate
891
- def activate; end
892
- end
893
-
894
- class Mocha::StateMachine::StatePredicate
895
- def initialize(state_machine, state, description, &active_check); end
896
-
897
- def active?; end
898
- def mocha_inspect; end
899
- end
900
-
901
- class Mocha::StubbedMethod
902
- def initialize(stubbee, method_name); end
903
-
904
- def ==(_arg0); end
905
- def define_new_method; end
906
- def hide_original_method; end
907
- def matches?(other); end
908
- def method_name; end
909
- def mock; end
910
- def remove_new_method; end
911
- def reset_mocha; end
912
- def restore_original_method; end
913
- def store_original_method; end
914
- def stub; end
915
- def stubbee; end
916
- def to_s; end
917
- def unstub; end
918
-
919
- private
920
-
921
- def remove_original_method_from_stubbee; end
922
- def retain_original_visibility(method_owner); end
923
- def store_original_method_visibility; end
924
- def stub_method_overwrites_original_method?; end
925
- def stub_method_owner; end
926
- def use_prepended_module_for_stub_method; end
927
- def use_prepended_module_for_stub_method?; end
928
- end
929
-
930
- class Mocha::StubbedMethod::PrependedModule < ::Module
931
- end
932
-
933
- class Mocha::StubbingError < ::Mocha::ErrorWithFilteredBacktrace
934
- end
935
-
936
- class Mocha::Thrower
937
- def initialize(tag, object = T.unsafe(nil)); end
938
-
939
- def evaluate(invocation); end
940
- end
941
-
942
- class Mocha::ThrownObject
943
- def initialize(tag, value = T.unsafe(nil)); end
944
-
945
- def mocha_inspect; end
946
- end
947
-
948
- class Mocha::YieldParameters
949
- def initialize; end
950
-
951
- def add(*parameter_groups); end
952
- def next_invocation; end
953
- end