orthoses-rails 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/examples/rails/Rakefile +244 -0
  3. data/examples/rails/known_sig/action_cable/connection/test_cookie_jar.rbs +2 -0
  4. data/examples/rails/known_sig/action_controller/metal.rbs +4 -0
  5. data/examples/rails/known_sig/action_dispatch/cookies/cookie_jar.rbs +3 -0
  6. data/examples/rails/known_sig/action_dispatch/response.rbs +4 -0
  7. data/examples/rails/patch/drb/drb_undumped.rbs +2 -0
  8. data/examples/rails/patch/drb.rbs +2 -0
  9. data/examples/rails/patch/erubi/engine.rbs +4 -0
  10. data/examples/rails/patch/erubi.rbs +2 -0
  11. data/examples/rails/patch/minitest/kernel.rbs +44 -0
  12. data/examples/rails/patch/minitest/minitest/abstract_reporter.rbs +49 -0
  13. data/examples/rails/patch/minitest/minitest/assertion.rbs +16 -0
  14. data/examples/rails/patch/minitest/minitest/assertions.rbs +545 -0
  15. data/examples/rails/patch/minitest/minitest/backtrace_filter.rbs +16 -0
  16. data/examples/rails/patch/minitest/minitest/bench_spec.rbs +101 -0
  17. data/examples/rails/patch/minitest/minitest/benchmark.rbs +258 -0
  18. data/examples/rails/patch/minitest/minitest/composite_reporter.rbs +25 -0
  19. data/examples/rails/patch/minitest/minitest/expectations.rbs +21 -0
  20. data/examples/rails/patch/minitest/minitest/guard.rbs +64 -0
  21. data/examples/rails/patch/minitest/minitest/mock.rbs +60 -0
  22. data/examples/rails/patch/minitest/minitest/parallel/executor.rbs +42 -0
  23. data/examples/rails/patch/minitest/minitest/parallel/test/class_methods.rbs +6 -0
  24. data/examples/rails/patch/minitest/minitest/parallel/test.rbs +3 -0
  25. data/examples/rails/patch/minitest/minitest/parallel.rbs +2 -0
  26. data/examples/rails/patch/minitest/minitest/pride_io.rbs +54 -0
  27. data/examples/rails/patch/minitest/minitest/pride_lol.rbs +17 -0
  28. data/examples/rails/patch/minitest/minitest/progress_reporter.rbs +11 -0
  29. data/examples/rails/patch/minitest/minitest/reportable.rbs +51 -0
  30. data/examples/rails/patch/minitest/minitest/reporter.rbs +5 -0
  31. data/examples/rails/patch/minitest/minitest/result.rbs +28 -0
  32. data/examples/rails/patch/minitest/minitest/runnable.rbs +131 -0
  33. data/examples/rails/patch/minitest/minitest/skip.rbs +6 -0
  34. data/examples/rails/patch/minitest/minitest/spec/dsl/instance_methods.rbs +48 -0
  35. data/examples/rails/patch/minitest/minitest/spec/dsl.rbs +125 -0
  36. data/examples/rails/patch/minitest/minitest/spec.rbs +10 -0
  37. data/examples/rails/patch/minitest/minitest/statistics_reporter.rbs +76 -0
  38. data/examples/rails/patch/minitest/minitest/summary_reporter.rbs +26 -0
  39. data/examples/rails/patch/minitest/minitest/test/lifecycle_hooks.rbs +92 -0
  40. data/examples/rails/patch/minitest/minitest/test.rbs +76 -0
  41. data/examples/rails/patch/minitest/minitest/unexpected_error.rbs +10 -0
  42. data/examples/rails/patch/minitest/minitest/unit/test_case.rbs +3 -0
  43. data/examples/rails/patch/minitest/minitest/unit.rbs +5 -0
  44. data/examples/rails/patch/minitest/minitest.rbs +966 -0
  45. data/examples/rails/patch/pg/simple_decoder.rbs +4 -0
  46. data/examples/rails/patch/pg.rbs +2 -0
  47. data/examples/rails/patch/qc/queue.rbs +2 -0
  48. data/examples/rails/patch/qc.rbs +2 -0
  49. data/examples/rails/patch/que/job.rbs +2 -0
  50. data/examples/rails/patch/que.rbs +2 -0
  51. data/examples/rails/patch/rack/cache/entity_store.rbs +2 -0
  52. data/examples/rails/patch/rack/cache/meta_store.rbs +2 -0
  53. data/examples/rails/patch/rack/cache.rbs +2 -0
  54. data/examples/rails/patch/rack/session/dalli.rbs +2 -0
  55. data/examples/rails/patch/rack/session.rbs +2 -0
  56. data/examples/rails/patch/rboc.rbs +2 -0
  57. data/examples/rails/patch/rdoc/generator/sdoc.rbs +3 -0
  58. data/examples/rails/patch/rdoc/generator.rbs +2 -0
  59. data/examples/rails/patch/rdoc/task.rbs +2 -0
  60. data/examples/rails/patch/ripper.rbs +2 -0
  61. data/examples/rails/patch/sidekiq/worker.rbs +2 -0
  62. data/examples/rails/patch/sidekiq.rbs +2 -0
  63. data/examples/rails/patch/sneakers/worker.rbs +2 -0
  64. data/examples/rails/patch/sneakers.rbs +2 -0
  65. data/examples/rails/patch/sucker_punch/job.rbs +2 -0
  66. data/examples/rails/patch/sucker_punch.rbs +2 -0
  67. data/examples/rails/patch/thor/actions/create_file.rbs +2 -0
  68. data/examples/rails/patch/thor/actions.rbs +2 -0
  69. data/examples/rails/patch/thor/error.rbs +2 -0
  70. data/examples/rails/patch/thor/group.rbs +2 -0
  71. data/examples/rails/patch/thor.rbs +2 -0
  72. data/lib/orthoses/active_model/has_secure_password.rb +8 -1
  73. data/lib/orthoses/active_model/known_sig/7.0/serialization.rbs +4 -0
  74. data/lib/orthoses/active_model/known_sig/7.0/validations.rbs +4 -0
  75. data/lib/orthoses/active_model/known_sig.rb +21 -0
  76. data/lib/orthoses/active_model.rb +4 -0
  77. data/lib/orthoses/active_record/known_sig/6.0/result.rbs +5 -0
  78. data/lib/orthoses/active_record/known_sig/6.1/result.rbs +5 -0
  79. data/lib/orthoses/active_record/known_sig/7.0/encryption/context.rbs +9 -0
  80. data/lib/orthoses/active_record/known_sig/7.0/result.rbs +5 -0
  81. data/lib/orthoses/active_record/known_sig.rb +21 -0
  82. data/lib/orthoses/active_record/query_methods.rb +32 -0
  83. data/lib/orthoses/active_record.rb +8 -0
  84. data/lib/orthoses/active_support/class_attribute.rb +14 -3
  85. data/lib/orthoses/active_support/concern.rb +9 -1
  86. data/lib/orthoses/active_support/delegation.rb +158 -0
  87. data/lib/orthoses/active_support/known_sig/7.0/active_support/callbacks/callback_chain.rbs +9 -0
  88. data/lib/orthoses/active_support/known_sig/7.0/active_support/hash_with_indifferent_access.rbs +6 -0
  89. data/lib/orthoses/active_support/known_sig/7.0/hash_with_indifferent_access.rbs +2 -0
  90. data/lib/orthoses/active_support/known_sig/{time.rbs → 7.0/time.rbs} +4 -0
  91. data/lib/orthoses/active_support/known_sig.rb +21 -0
  92. data/lib/orthoses/active_support/mattr_accessor.rb +10 -2
  93. data/lib/orthoses/active_support/time_with_zone.rb +13 -10
  94. data/lib/orthoses/active_support.rb +25 -0
  95. data/lib/orthoses/rails/known_sig_helper.rb +22 -0
  96. data/lib/orthoses/rails/version.rb +1 -1
  97. data/lib/orthoses/rails.rb +4 -11
  98. metadata +91 -4
  99. data/lib/orthoses/active_support/known_sig/active_support/time_with_zone.rbs +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fdff122ed7b5425e10cdf2fa105b8ffb7a583554589f93f8703bb014abbbafd0
4
- data.tar.gz: 6d991ce9480237d0f605bbb3935c50f072c6794594b037e459ef3c0dfdcb92c3
3
+ metadata.gz: c109c955af37e4574528af34d8a3695450abf39f5359729625307c368b961259
4
+ data.tar.gz: 29d4ad1bf3e9d4a8d18e3108899c83cd133221d3f2dc1b3f3a6cb2165684c830
5
5
  SHA512:
6
- metadata.gz: 2f1c3be987e9a8096a89918e4c16ef4ad8170c9e77d3e7a074541c98f4255944dde188b74f3d4693764e1f77d7fc600f6e67f9be6309aa2c433cecc746439af3
7
- data.tar.gz: 49eaa832bc2a488b0b390df8fa962990898c6e9873f1476e9eae17d94073f9bc2e538be6fba54ebeaca7e33cc4245f0a68fff705f069e009c8284973d14906b8
6
+ metadata.gz: f491dab5ce7ce402058fec79a42c1c776434bbb88adedd8928b70031f614ef57051d9501c279c628903269413e55db24e3c9493101e79c758cfb5a202ba41f37
7
+ data.tar.gz: 701d609fb62bfa2d9ac0e226090844bc93d526328121516cc07cb3c8424c3f2992b4f365c3cb0680379c972238b68a3fdaa87d36a0c4849803732a5603b09f3f
@@ -0,0 +1,244 @@
1
+ REPO_ROOT = "#{File.dirname(__FILE__)}/src"
2
+ $:.unshift("#{REPO_ROOT}/actioncable/lib")
3
+ $:.unshift("#{REPO_ROOT}/actionmailbox/lib")
4
+ $:.unshift("#{REPO_ROOT}/actionmailer/lib")
5
+ $:.unshift("#{REPO_ROOT}/actionpack/lib")
6
+ $:.unshift("#{REPO_ROOT}/actiontext/lib")
7
+ $:.unshift("#{REPO_ROOT}/actionview/lib")
8
+ $:.unshift("#{REPO_ROOT}/activejob/lib")
9
+ $:.unshift("#{REPO_ROOT}/activemodel/lib")
10
+ $:.unshift("#{REPO_ROOT}/activerecord/lib")
11
+ $:.unshift("#{REPO_ROOT}/activestorage/lib")
12
+ $:.unshift("#{REPO_ROOT}/activesupport/lib")
13
+ $:.unshift("#{REPO_ROOT}/railties/lib")
14
+
15
+ require 'orthoses'
16
+ require 'orthoses-rails'
17
+ require 'openssl'
18
+ require 'cgi'
19
+ require 'uri'
20
+
21
+ Orthoses.logger.level = :error
22
+
23
+ Orthoses::Utils.unautoload!
24
+
25
+ def run_child_process
26
+ pid = fork do
27
+ yield
28
+ end
29
+ Process.wait(pid)
30
+ end
31
+
32
+ def switch_branch(name)
33
+ cd "src" do
34
+ sh "git switch #{name}"
35
+ end
36
+ end
37
+
38
+ def generate(out_dir, version)
39
+ loader = -> () {
40
+ # require "rails/all"
41
+ require "rails/app_updater"
42
+ require "active_support"
43
+ require "active_record"
44
+ require "active_job"
45
+ require "active_model"
46
+ require "active_storage"
47
+ require "action_dispatch"
48
+ require "action_mailbox"
49
+ require "action_mailer"
50
+ require "action_pack"
51
+ require "action_text"
52
+ require "action_view"
53
+
54
+ [
55
+ ActiveSupport,
56
+ ActiveModel,
57
+ ActiveJob,
58
+ ActiveRecord,
59
+ ActiveStorage,
60
+ ActionDispatch,
61
+ ActionMailbox,
62
+ ActionMailer,
63
+ ActionText,
64
+ ActionView,
65
+ ].each do |rails_mod|
66
+ rails_mod.eager_load!
67
+ Orthoses::Utils.each_const_recursive(rails_mod, on_error: -> (e) {
68
+ Orthoses.logger.warn "skip load const by [#{e.root}][#{e.const}](#{e.error.class})#{e.error.message}"
69
+ })
70
+ v = rails_mod.respond_to?(:version) ? rails_mod.version : nil
71
+ puts "loaded #{rails_mod}: v#{v}"
72
+ end
73
+ Orthoses::Utils.unautoload!
74
+ }
75
+ Orthoses::Builder.new do
76
+ use Orthoses::CreateFileByName,
77
+ base_dir: "#{out_dir}/#{version}",
78
+ header: "# !!! GENERATED CODE !!!"
79
+ use Orthoses::AvoidRecursiveAncestorError
80
+ use Orthoses::Filter,
81
+ if: -> (name, content) {
82
+ # OMG, both ERB and Erb are exist...
83
+ return false if name.start_with?("Erb")
84
+
85
+ # ArgumentError
86
+ return false if name.start_with?("I18n::Tests")
87
+
88
+ # FIXME: too hard
89
+ return false if name.include?("::Generators")
90
+
91
+ true
92
+ }
93
+ use Orthoses::Constant,
94
+ strict: false,
95
+ if: -> (current, const, _val, _rbs) {
96
+ !Orthoses::Utils.rbs_defined_const?("#{current}::#{const}", collection: true)
97
+ },
98
+ on_error: -> (e) {
99
+ Orthoses.logger.warn "[Orthoses::Constant] skip load const by #{e.root}[::#{e.const}] (#{e.error.class}) #{e.error.message}"
100
+ }
101
+ Orthoses::ActiveSupport.each do |middleware, **args|
102
+ use middleware, **args
103
+ end
104
+ use Orthoses::ActiveRecord::QueryMethods
105
+ use Orthoses::ActiveRecord::KnownSig
106
+ use Orthoses::ActiveModel::KnownSig
107
+ use Orthoses::ObjectSpaceAll
108
+ use Orthoses::LoadRBS,
109
+ paths: Dir.glob('patch/**/*.rbs')
110
+ use Orthoses::LoadRBS,
111
+ paths: Dir.glob('known_sig/**/*.rbs')
112
+ # require in method
113
+ use Orthoses::Tap do |store|
114
+ store.delete("DummyERB")
115
+ store.delete("DummyCompiler")
116
+ end
117
+ # see activerecord/lib/active_record/migration/compatibility.rb
118
+ use Orthoses::Tap do |store|
119
+ # TODO: make middleware
120
+ if defined?(ActiveRecord::Migration::Compatibility::V7_0)
121
+ store["ActiveRecord::Migration::Compatibility::V6_1"].header = nil
122
+ store["ActiveRecord::Migration::Compatibility::V7_0"].header = "class ActiveRecord::Migration::Compatibility::V7_0 < ActiveRecord::Migration::Current"
123
+ elsif defined?(ActiveRecord::Migration::Compatibility::V6_1)
124
+ store["ActiveRecord::Migration::Compatibility::V6_0"].header = nil
125
+ store["ActiveRecord::Migration::Compatibility::V6_1"].header = "class ActiveRecord::Migration::Compatibility::V6_1 < ActiveRecord::Migration::Current"
126
+ elsif defined?(ActiveRecord::Migration::Compatibility::V6_0)
127
+ store["ActiveRecord::Migration::Compatibility::V5_2"].header = nil
128
+ store["ActiveRecord::Migration::Compatibility::V6_0"].header = "class ActiveRecord::Migration::Compatibility::V6_0 < ActiveRecord::Migration::Current"
129
+ end
130
+ end
131
+ # class_eval in #each
132
+ # see activerecord/lib/active_record/migration/command_recorder.rb
133
+ use Orthoses::Tap do |store|
134
+ content = store["ActiveRecord::Migration::CommandRecorder"]
135
+ ActiveRecord::Migration::CommandRecorder::ReversibleAndIrreversibleMethods.each do |method|
136
+ content << "def #{method}: (*untyped args) ?{ () -> void } -> untyped"
137
+ end
138
+ end
139
+ # class_eval in #each
140
+ # see activerecord/lib/active_record/migration/command_recorder.rb
141
+ use Orthoses::Tap do |store|
142
+ content = store["ActiveRecord::Migration::CommandRecorder::StraightReversions"]
143
+ {
144
+ execute_block: :execute_block,
145
+ create_table: :drop_table,
146
+ create_join_table: :drop_join_table,
147
+ add_column: :remove_column,
148
+ add_index: :remove_index,
149
+ add_timestamps: :remove_timestamps,
150
+ add_reference: :remove_reference,
151
+ add_foreign_key: :remove_foreign_key,
152
+ add_check_constraint: :remove_check_constraint,
153
+ enable_extension: :disable_extension
154
+ }.each do |cmd, inv|
155
+ [[inv, cmd], [cmd, inv]].uniq.each do |method, inverse|
156
+ content << "def invert_#{method}: (untyped args) ?{ () -> void } -> [Symbol, untyped, Proc]"
157
+ end
158
+ end
159
+ end
160
+ # singleton_class.class_eval in included
161
+ use Orthoses::Tap do |store|
162
+ store["ActiveRecord::ModelSchema"].body.tap do |body|
163
+ body.delete("alias _inheritance_column= inheritance_column=")
164
+ body.delete("alias inheritance_column= real_inheritance_column=")
165
+ end
166
+ end
167
+ # alias in included block
168
+ use Orthoses::Tap do |store|
169
+ store["ActiveRecord::ConnectionAdapters::ColumnMethods"].body.tap do |body|
170
+ body.delete("alias blob binary")
171
+ body.delete("alias numeric decimal")
172
+ end
173
+ end
174
+ # > Use async_exec instead of exec_params on pg versions before 1.1
175
+ use Orthoses::Tap do |store|
176
+ store["PG::Connection"].body.clear
177
+ end
178
+ # Entrust to auto super class
179
+ use Orthoses::Tap do |store|
180
+ store.each do |_, content|
181
+ if content.header&.include?(" < Type::")
182
+ content.header.sub!(/ < Type::(.*)/, " < ::ActiveModel::Type::\\1")
183
+ end
184
+ # delegate to auto_header
185
+ if content.header&.start_with?("class Arel")
186
+ content.header = nil
187
+ end
188
+ end
189
+ store["ActionView::Helpers::Tags::CollectionRadioButtons::RadioButtonBuilder"].header = nil
190
+ store["ActionView::Helpers::Tags::CollectionCheckBoxes::CheckBoxBuilder"].header = nil
191
+ store["ActionView::SyntaxErrorInTemplate"].header = nil
192
+ # MigrationProxy cannot resolve name since class alias.
193
+ store["ActiveRecord::NullMigration"].header = nil
194
+ end
195
+ use Orthoses::Mixin,
196
+ if: -> (base_mod, how, mod) {
197
+ mod != Enumerable # TODO
198
+ }
199
+ use Orthoses::DelegateClass
200
+ use Orthoses::Attribute
201
+ use Orthoses::RBSPrototypeRB,
202
+ paths: Dir.glob('src/{railties,action{cable,mailbox,mailer,pack,text,view},active{job,model,record,storage,support}}/lib/**/*.rb'),
203
+ constant_filter: -> (member) { false },
204
+ mixin_filter: -> (member) { false }
205
+ run loader
206
+ end.call
207
+
208
+ sh "rbs --collection ../../rbs_collection.yaml -I #{out_dir}/#{version}/ validate --silent"
209
+ # $ cat out/7.0/**/*.rbs | wc
210
+ # 72210 332252 2551928
211
+ end
212
+
213
+ namespace :generate do
214
+ task :v60 do
215
+ switch_branch("6-0-stable")
216
+ run_child_process { generate("out", "6.0") }
217
+ end
218
+
219
+ task :v61 do
220
+ switch_branch("6-1-stable")
221
+ run_child_process { generate("out", "6.1") }
222
+ end
223
+
224
+ task :v70 do
225
+ switch_branch("7-0-stable")
226
+ run_child_process { generate("out", "7.0") }
227
+ end
228
+ end
229
+
230
+ task :clean do
231
+ FileUtils.rm_rf("out")
232
+ end
233
+
234
+ task :test do
235
+ sh "steep check"
236
+ end
237
+
238
+ task default: [
239
+ :clean,
240
+
241
+ 'generate:v60',
242
+ 'generate:v61',
243
+ 'generate:v70',
244
+ ]
@@ -0,0 +1,2 @@
1
+ class ActionCable::Connection::TestCookieJar < ActiveSupport::HashWithIndifferentAccess[untyped, untyped]
2
+ end
@@ -0,0 +1,4 @@
1
+ class ActionController::Metal < ::AbstractController::Base
2
+ @_request: ::ActionDispatch::Request
3
+ @_response: ::ActionDispatch::Response
4
+ end
@@ -0,0 +1,3 @@
1
+ class ActionDispatch::Cookies::CookieJar
2
+ def to_h: () -> Hash[untyped, untyped]
3
+ end
@@ -0,0 +1,4 @@
1
+ class ActionDispatch::Response
2
+ # The HTTP status code.
3
+ attr_reader status: Integer
4
+ end
@@ -0,0 +1,2 @@
1
+ module DRb::DRbUndumped
2
+ end
@@ -0,0 +1,2 @@
1
+ module DRb
2
+ end
@@ -0,0 +1,4 @@
1
+ module Erubi
2
+ class Engine
3
+ end
4
+ end
@@ -0,0 +1,2 @@
1
+ module Erubi
2
+ end
@@ -0,0 +1,44 @@
1
+ %a{annotate:rdoc:skip}
2
+ module Kernel : ::BasicObject
3
+ private
4
+
5
+ # <!--
6
+ # rdoc-file=lib/minitest/spec.rb
7
+ # - describe(desc, *additional_desc, &block)
8
+ # -->
9
+ # Describe a series of expectations for a given target `desc`.
10
+ #
11
+ # Defines a test class subclassing from either Minitest::Spec or from the
12
+ # surrounding describe's class. The surrounding class may subclass
13
+ # Minitest::Spec manually in order to easily share code:
14
+ #
15
+ # class MySpec < Minitest::Spec
16
+ # # ... shared code ...
17
+ # end
18
+ #
19
+ # class TestStuff < MySpec
20
+ # it "does stuff" do
21
+ # # shared code available here
22
+ # end
23
+ # describe "inner stuff" do
24
+ # it "still does stuff" do
25
+ # # ...and here
26
+ # end
27
+ # end
28
+ # end
29
+ #
30
+ # For more information on getting started with writing specs, see:
31
+ #
32
+ # http://www.rubyinside.com/a-minitestspec-tutorial-elegant-spec-style-testing-t
33
+ # hat-comes-with-ruby-5354.html
34
+ #
35
+ # For some suggestions on how to improve your specs, try:
36
+ #
37
+ # http://betterspecs.org
38
+ #
39
+ # but do note that several items there are debatable or specific to rspec.
40
+ #
41
+ # For more information about expectations, see Minitest::Expectations.
42
+ #
43
+ def describe: (untyped desc, *untyped additional_desc) { () -> untyped } -> untyped
44
+ end
@@ -0,0 +1,49 @@
1
+ # <!-- rdoc-file=lib/minitest.rb -->
2
+ # Defines the API for Reporters. Subclass this and override whatever you want.
3
+ # Go nuts.
4
+ #
5
+ class Minitest::AbstractReporter
6
+ # <!--
7
+ # rdoc-file=lib/minitest.rb
8
+ # - start()
9
+ # -->
10
+ # Starts reporting on the run.
11
+ #
12
+ def start: () -> nil
13
+
14
+ # <!--
15
+ # rdoc-file=lib/minitest.rb
16
+ # - prerecord(klass, name)
17
+ # -->
18
+ # About to start running a test. This allows a reporter to show that it is
19
+ # starting or that we are in the middle of a test run.
20
+ #
21
+ def prerecord: (untyped klass, untyped name) -> nil
22
+
23
+ # <!--
24
+ # rdoc-file=lib/minitest.rb
25
+ # - record(result)
26
+ # -->
27
+ # Output and record the result of the test. Call
28
+ # [result#result_code](rdoc-ref:Runnable#result_code) to get the result
29
+ # character string. Stores the result of the run if the run did not pass.
30
+ #
31
+ def record: (untyped result) -> nil
32
+
33
+ # <!--
34
+ # rdoc-file=lib/minitest.rb
35
+ # - report()
36
+ # -->
37
+ # Outputs the summary of the run.
38
+ #
39
+ def report: () -> nil
40
+
41
+ # <!--
42
+ # rdoc-file=lib/minitest.rb
43
+ # - passed?()
44
+ # -->
45
+ # Did this run pass?
46
+ #
47
+ def passed?: () -> true
48
+ include Mutex_m
49
+ end
@@ -0,0 +1,16 @@
1
+ # <!-- rdoc-file=lib/minitest.rb -->
2
+ # Represents run failures.
3
+ #
4
+ class Minitest::Assertion < ::Exception
5
+ def error: () -> self
6
+
7
+ # <!--
8
+ # rdoc-file=lib/minitest.rb
9
+ # - location()
10
+ # -->
11
+ # Where was this run before an assertion was raised?
12
+ #
13
+ def location: () -> untyped
14
+ def result_code: () -> untyped
15
+ def result_label: () -> "Failure"
16
+ end