stripe 10.13.0.pre.beta.1 → 10.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +46 -300
  3. data/OPENAPI_VERSION +1 -1
  4. data/README.md +0 -11
  5. data/VERSION +1 -1
  6. data/lib/stripe/api_operations/request.rb +1 -2
  7. data/lib/stripe/api_version.rb +0 -1
  8. data/lib/stripe/object_types.rb +1 -23
  9. data/lib/stripe/resources/customer.rb +0 -11
  10. data/lib/stripe/resources/financial_connections/account.rb +0 -3
  11. data/lib/stripe/resources/forwarding/request.rb +50 -0
  12. data/lib/stripe/resources/invoice.rb +0 -113
  13. data/lib/stripe/resources/payment_intent.rb +0 -50
  14. data/lib/stripe/resources/quote.rb +0 -104
  15. data/lib/stripe/resources/subscription_schedule.rb +0 -20
  16. data/lib/stripe/resources/terminal/reader.rb +0 -60
  17. data/lib/stripe/resources.rb +1 -22
  18. data/lib/stripe/stripe_client.rb +28 -62
  19. data/lib/stripe/stripe_configuration.rb +1 -2
  20. data/lib/stripe/util.rb +1 -8
  21. data/lib/stripe/version.rb +1 -1
  22. data/lib/stripe.rb +0 -54
  23. data/stripe.gemspec +3 -0
  24. metadata +5 -84
  25. data/bin/tapioca +0 -27
  26. data/lib/stripe/request_signing_authenticator.rb +0 -79
  27. data/lib/stripe/resources/account_notice.rb +0 -32
  28. data/lib/stripe/resources/billing/meter.rb +0 -83
  29. data/lib/stripe/resources/billing/meter_event.rb +0 -27
  30. data/lib/stripe/resources/billing/meter_event_adjustment.rb +0 -26
  31. data/lib/stripe/resources/billing/meter_event_summary.rb +0 -15
  32. data/lib/stripe/resources/capital/financing_offer.rb +0 -49
  33. data/lib/stripe/resources/capital/financing_summary.rb +0 -15
  34. data/lib/stripe/resources/capital/financing_transaction.rb +0 -27
  35. data/lib/stripe/resources/customer_entitlement.rb +0 -12
  36. data/lib/stripe/resources/customer_entitlement_summary.rb +0 -12
  37. data/lib/stripe/resources/entitlements/feature.rb +0 -38
  38. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -14
  39. data/lib/stripe/resources/gift_cards/card.rb +0 -59
  40. data/lib/stripe/resources/gift_cards/transaction.rb +0 -93
  41. data/lib/stripe/resources/invoice_payment.rb +0 -12
  42. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -88
  43. data/lib/stripe/resources/margin.rb +0 -37
  44. data/lib/stripe/resources/order.rb +0 -120
  45. data/lib/stripe/resources/quote_phase.rb +0 -39
  46. data/lib/stripe/resources/quote_preview_invoice.rb +0 -43
  47. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -11
  48. data/lib/stripe/resources/tax/form.rb +0 -49
  49. data/sorbet/config +0 -4
  50. data/sorbet/rbi/annotations/.gitattributes +0 -1
  51. data/sorbet/rbi/annotations/coveralls_reborn.rbi +0 -3
  52. data/sorbet/rbi/gems/.gitattributes +0 -1
  53. data/sorbet/rbi/gems/addressable@2.8.6.rbi +0 -1993
  54. data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -584
  55. data/sorbet/rbi/gems/byebug@11.1.3.rbi +0 -3606
  56. data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -3437
  57. data/sorbet/rbi/gems/coveralls_reborn@0.25.0.rbi +0 -8
  58. data/sorbet/rbi/gems/crack@0.4.5.rbi +0 -144
  59. data/sorbet/rbi/gems/docile@1.4.0.rbi +0 -8
  60. data/sorbet/rbi/gems/erubi@1.12.0.rbi +0 -146
  61. data/sorbet/rbi/gems/hashdiff@1.1.0.rbi +0 -352
  62. data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +0 -19
  63. data/sorbet/rbi/gems/json@2.7.1.rbi +0 -1561
  64. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +0 -14237
  65. data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -272
  66. data/sorbet/rbi/gems/mocha@1.16.1.rbi +0 -11
  67. data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -161
  68. data/sorbet/rbi/gems/parallel@1.24.0.rbi +0 -280
  69. data/sorbet/rbi/gems/parser@3.2.2.4.rbi +0 -9454
  70. data/sorbet/rbi/gems/power_assert@2.0.3.rbi +0 -414
  71. data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +0 -951
  72. data/sorbet/rbi/gems/prism@0.19.0.rbi +0 -29883
  73. data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +0 -1150
  74. data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -10085
  75. data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +0 -931
  76. data/sorbet/rbi/gems/racc@1.7.3.rbi +0 -161
  77. data/sorbet/rbi/gems/rack@3.0.8.rbi +0 -5193
  78. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -402
  79. data/sorbet/rbi/gems/rake@13.1.0.rbi +0 -2884
  80. data/sorbet/rbi/gems/rbi@0.1.6.rbi +0 -2922
  81. data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +0 -3766
  82. data/sorbet/rbi/gems/rexml@3.2.6.rbi +0 -4887
  83. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +0 -7004
  84. data/sorbet/rbi/gems/rubocop@1.57.2.rbi +0 -56919
  85. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +0 -1317
  86. data/sorbet/rbi/gems/shoulda-context@2.0.0.rbi +0 -555
  87. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +0 -8
  88. data/sorbet/rbi/gems/simplecov@0.21.2.rbi +0 -8
  89. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +0 -8
  90. data/sorbet/rbi/gems/spoom@1.2.4.rbi +0 -3777
  91. data/sorbet/rbi/gems/sync@0.5.0.rbi +0 -8
  92. data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +0 -23136
  93. data/sorbet/rbi/gems/tapioca@0.11.17.rbi +0 -3503
  94. data/sorbet/rbi/gems/term-ansicolor@1.7.1.rbi +0 -8
  95. data/sorbet/rbi/gems/test-unit@3.6.1.rbi +0 -4403
  96. data/sorbet/rbi/gems/thor@1.3.0.rbi +0 -4345
  97. data/sorbet/rbi/gems/tins@1.32.1.rbi +0 -8
  98. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +0 -65
  99. data/sorbet/rbi/gems/webmock@3.19.1.rbi +0 -1740
  100. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +0 -428
  101. data/sorbet/rbi/gems/yard@0.9.34.rbi +0 -18219
  102. data/sorbet/tapioca/config.yml +0 -13
  103. data/sorbet/tapioca/require.rb +0 -4
@@ -1,555 +0,0 @@
1
- # typed: true
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `shoulda-context` gem.
5
- # Please instead update this file by running `bin/tapioca gem shoulda-context`.
6
-
7
- # Stolen straight from ActiveSupport
8
- #
9
- # source://shoulda-context//lib/shoulda/context/proc_extensions.rb#3
10
- class Proc
11
- # source://shoulda-context//lib/shoulda/context/proc_extensions.rb#4
12
- def bind(object); end
13
- end
14
-
15
- # source://shoulda-context//lib/shoulda/context/autoload_macros.rb#1
16
- module Shoulda
17
- class << self
18
- # Call autoload_macros when you want to load test macros automatically in a non-Rails
19
- # project (it's done automatically for Rails projects).
20
- # You don't need to specify ROOT/test/shoulda_macros explicitly. Your custom macros
21
- # are loaded automatically when you call autoload_macros.
22
- #
23
- # The first argument is the path to you application's root directory.
24
- # All following arguments are directories relative to your root, which contain
25
- # shoulda_macros subdirectories. These directories support the same kinds of globs as the
26
- # Dir class.
27
- #
28
- # Basic usage (from a test_helper):
29
- # Shoulda.autoload_macros(File.dirname(__FILE__) + '/..')
30
- # will load everything in
31
- # - your_app/test/shoulda_macros
32
- #
33
- # To load vendored macros as well:
34
- # Shoulda.autoload_macros(APP_ROOT, 'vendor/*')
35
- # will load everything in
36
- # - APP_ROOT/vendor/*/shoulda_macros
37
- # - APP_ROOT/test/shoulda_macros
38
- #
39
- # To load macros in an app with a vendor directory laid out like Rails':
40
- # Shoulda.autoload_macros(APP_ROOT, 'vendor/{plugins,gems}/*')
41
- # or
42
- # Shoulda.autoload_macros(APP_ROOT, 'vendor/plugins/*', 'vendor/gems/*')
43
- # will load everything in
44
- # - APP_ROOT/vendor/plugins/*/shoulda_macros
45
- # - APP_ROOT/vendor/gems/*/shoulda_macros
46
- # - APP_ROOT/test/shoulda_macros
47
- #
48
- # If you prefer to stick testing dependencies away from your production dependencies:
49
- # Shoulda.autoload_macros(APP_ROOT, 'vendor/*', 'test/vendor/*')
50
- # will load everything in
51
- # - APP_ROOT/vendor/*/shoulda_macros
52
- # - APP_ROOT/test/vendor/*/shoulda_macros
53
- # - APP_ROOT/test/shoulda_macros
54
- #
55
- # source://shoulda-context//lib/shoulda/context/autoload_macros.rb#38
56
- def autoload_macros(root, *dirs); end
57
- end
58
- end
59
-
60
- # source://shoulda-context//lib/shoulda/context/configuration.rb#2
61
- module Shoulda::Context
62
- class << self
63
- # source://shoulda-context//lib/shoulda/context/world.rb#13
64
- def add_context(context); end
65
-
66
- # @yield [_self]
67
- # @yieldparam _self [Shoulda::Context] the object that the method was called on
68
- #
69
- # source://shoulda-context//lib/shoulda/context/configuration.rb#3
70
- def configure; end
71
-
72
- # source://shoulda-context//lib/shoulda/context/world.rb#4
73
- def contexts; end
74
-
75
- # Sets the attribute contexts
76
- #
77
- # @param value the value to set the attribute contexts to.
78
- #
79
- # source://shoulda-context//lib/shoulda/context/world.rb#7
80
- def contexts=(_arg0); end
81
-
82
- # source://shoulda-context//lib/shoulda/context/world.rb#9
83
- def current_context; end
84
-
85
- # source://shoulda-context//lib/shoulda/context/configuration.rb#13
86
- def extend(mod); end
87
-
88
- # source://shoulda-context//lib/shoulda/context/configuration.rb#7
89
- def include(mod); end
90
-
91
- # source://shoulda-context//lib/shoulda/context/world.rb#17
92
- def remove_context; end
93
-
94
- # source://shoulda-context//lib/shoulda/context/test_framework_detection.rb#29
95
- def test_framework_test_cases; end
96
- end
97
- end
98
-
99
- # source://shoulda-context//lib/shoulda/context/assertions.rb#3
100
- module Shoulda::Context::Assertions
101
- # Asserts that the given matcher returns true when +target+ is passed to
102
- # #matches?
103
- #
104
- # source://shoulda-context//lib/shoulda/context/assertions.rb#50
105
- def assert_accepts(matcher, target, options = T.unsafe(nil)); end
106
-
107
- # Asserts that the given collection contains item x. If x is a regular expression, ensure that
108
- # at least one element from the collection matches x. +extra_msg+ is appended to the error message if the assertion fails.
109
- #
110
- # assert_contains(['a', '1'], /\d/) => passes
111
- # assert_contains(['a', '1'], 'a') => passes
112
- # assert_contains(['a', '1'], /not there/) => fails
113
- #
114
- # source://shoulda-context//lib/shoulda/context/assertions.rb#24
115
- def assert_contains(collection, x, extra_msg = T.unsafe(nil)); end
116
-
117
- # Asserts that the given collection does not contain item x. If x is a regular expression, ensure that
118
- # none of the elements from the collection match x.
119
- #
120
- # source://shoulda-context//lib/shoulda/context/assertions.rb#37
121
- def assert_does_not_contain(collection, x, extra_msg = T.unsafe(nil)); end
122
-
123
- # Asserts that the given matcher returns true when +target+ is passed to
124
- # #does_not_match? or false when +target+ is passed to #matches? if
125
- # #does_not_match? is not implemented
126
- #
127
- # source://shoulda-context//lib/shoulda/context/assertions.rb#68
128
- def assert_rejects(matcher, target, options = T.unsafe(nil)); end
129
-
130
- # Asserts that two arrays contain the same elements, the same number of times. Essentially ==, but unordered.
131
- #
132
- # assert_same_elements([:a, :b, :c], [:c, :a, :b]) => passes)
133
- #
134
- # source://shoulda-context//lib/shoulda/context/assertions.rb#7
135
- def assert_same_elements(a1, a2, msg = T.unsafe(nil)); end
136
-
137
- # source://shoulda-context//lib/shoulda/context/assertions.rb#90
138
- def safe_assert_block(message = T.unsafe(nil), &block); end
139
- end
140
-
141
- # source://shoulda-context//lib/shoulda/context/context.rb#3
142
- class Shoulda::Context::Context
143
- # @return [Context] a new instance of Context
144
- #
145
- # source://shoulda-context//lib/shoulda/context/context.rb#19
146
- def initialize(name, parent, &blk); end
147
-
148
- # @return [Boolean]
149
- #
150
- # source://shoulda-context//lib/shoulda/context/context.rb#93
151
- def am_subcontext?; end
152
-
153
- # source://shoulda-context//lib/shoulda/context/context.rb#190
154
- def build; end
155
-
156
- # source://shoulda-context//lib/shoulda/context/context.rb#142
157
- def build_test_name_from(should); end
158
-
159
- # source://shoulda-context//lib/shoulda/context/context.rb#47
160
- def context(name, &blk); end
161
-
162
- # source://shoulda-context//lib/shoulda/context/context.rb#107
163
- def create_test_from_should_hash(should); end
164
-
165
- # source://shoulda-context//lib/shoulda/context/context.rb#88
166
- def full_name; end
167
-
168
- # source://shoulda-context//lib/shoulda/context/context.rb#38
169
- def merge_block(&blk); end
170
-
171
- # source://shoulda-context//lib/shoulda/context/context.rb#208
172
- def method_missing(method, *args, &blk); end
173
-
174
- # my name
175
- #
176
- # source://shoulda-context//lib/shoulda/context/context.rb#4
177
- def name; end
178
-
179
- # my name
180
- #
181
- # source://shoulda-context//lib/shoulda/context/context.rb#4
182
- def name=(_arg0); end
183
-
184
- # may be another context, or the original test::unit class.
185
- #
186
- # source://shoulda-context//lib/shoulda/context/context.rb#5
187
- def parent; end
188
-
189
- # may be another context, or the original test::unit class.
190
- #
191
- # source://shoulda-context//lib/shoulda/context/context.rb#5
192
- def parent=(_arg0); end
193
-
194
- # source://shoulda-context//lib/shoulda/context/context.rb#183
195
- def print_should_eventuallys; end
196
-
197
- # source://shoulda-context//lib/shoulda/context/context.rb#151
198
- def run_all_setup_blocks(binding); end
199
-
200
- # source://shoulda-context//lib/shoulda/context/context.rb#171
201
- def run_all_teardown_blocks(binding); end
202
-
203
- # source://shoulda-context//lib/shoulda/context/context.rb#160
204
- def run_current_setup_blocks(binding); end
205
-
206
- # source://shoulda-context//lib/shoulda/context/context.rb#156
207
- def run_parent_setup_blocks(binding); end
208
-
209
- # source://shoulda-context//lib/shoulda/context/context.rb#51
210
- def setup(&blk); end
211
-
212
- # blocks given via setup methods
213
- #
214
- # source://shoulda-context//lib/shoulda/context/context.rb#7
215
- def setup_blocks; end
216
-
217
- # blocks given via setup methods
218
- #
219
- # source://shoulda-context//lib/shoulda/context/context.rb#7
220
- def setup_blocks=(_arg0); end
221
-
222
- # source://shoulda-context//lib/shoulda/context/context.rb#59
223
- def should(name_or_matcher, options = T.unsafe(nil), &blk); end
224
-
225
- # source://shoulda-context//lib/shoulda/context/context.rb#80
226
- def should_eventually(name, &blk); end
227
-
228
- # array of hashes representing the should eventually statements
229
- #
230
- # source://shoulda-context//lib/shoulda/context/context.rb#10
231
- def should_eventuallys; end
232
-
233
- # array of hashes representing the should eventually statements
234
- #
235
- # source://shoulda-context//lib/shoulda/context/context.rb#10
236
- def should_eventuallys=(_arg0); end
237
-
238
- # source://shoulda-context//lib/shoulda/context/context.rb#74
239
- def should_not(matcher); end
240
-
241
- # array of hashes representing the should statements
242
- #
243
- # source://shoulda-context//lib/shoulda/context/context.rb#9
244
- def shoulds; end
245
-
246
- # array of hashes representing the should statements
247
- #
248
- # source://shoulda-context//lib/shoulda/context/context.rb#9
249
- def shoulds=(_arg0); end
250
-
251
- # array of contexts nested under myself
252
- #
253
- # source://shoulda-context//lib/shoulda/context/context.rb#6
254
- def subcontexts; end
255
-
256
- # array of contexts nested under myself
257
- #
258
- # source://shoulda-context//lib/shoulda/context/context.rb#6
259
- def subcontexts=(_arg0); end
260
-
261
- # source://shoulda-context//lib/shoulda/context/context.rb#84
262
- def subject(&block); end
263
-
264
- # accessor with cache
265
- #
266
- # source://shoulda-context//lib/shoulda/context/context.rb#13
267
- def subject_block; end
268
-
269
- # Sets the attribute subject_block
270
- #
271
- # @param value the value to set the attribute subject_block to.
272
- #
273
- # source://shoulda-context//lib/shoulda/context/context.rb#17
274
- def subject_block=(_arg0); end
275
-
276
- # source://shoulda-context//lib/shoulda/context/context.rb#55
277
- def teardown(&blk); end
278
-
279
- # blocks given via teardown methods
280
- #
281
- # source://shoulda-context//lib/shoulda/context/context.rb#8
282
- def teardown_blocks; end
283
-
284
- # blocks given via teardown methods
285
- #
286
- # source://shoulda-context//lib/shoulda/context/context.rb#8
287
- def teardown_blocks=(_arg0); end
288
-
289
- # source://shoulda-context//lib/shoulda/context/context.rb#101
290
- def test_methods; end
291
-
292
- # source://shoulda-context//lib/shoulda/context/context.rb#200
293
- def test_name_prefix; end
294
-
295
- # source://shoulda-context//lib/shoulda/context/context.rb#97
296
- def test_unit_class; end
297
- end
298
-
299
- # source://shoulda-context//lib/shoulda/context/dsl.rb#5
300
- module Shoulda::Context::DSL
301
- include ::Shoulda::Context::Assertions
302
- include ::Shoulda::Context::DSL::InstanceMethods
303
-
304
- mixes_in_class_methods ::Shoulda::Context::DSL::ClassMethods
305
-
306
- class << self
307
- # @private
308
- #
309
- # source://shoulda-context//lib/shoulda/context/dsl.rb#6
310
- def included(base); end
311
- end
312
- end
313
-
314
- # source://shoulda-context//lib/shoulda/context/dsl.rb#14
315
- module Shoulda::Context::DSL::ClassMethods
316
- # == Before statements
317
- #
318
- # Before statements are should statements that run before the current
319
- # context's setup. These are especially useful when setting expectations.
320
- #
321
- # === Example:
322
- #
323
- # class UserControllerTest < Test::Unit::TestCase
324
- # context "the index action" do
325
- # setup do
326
- # @users = [Factory(:user)]
327
- # User.stubs(:find).returns(@users)
328
- # end
329
- #
330
- # context "on GET" do
331
- # setup { get :index }
332
- #
333
- # should respond_with(:success)
334
- #
335
- # # runs before "get :index"
336
- # before_should "find all users" do
337
- # User.expects(:find).with(:all).returns(@users)
338
- # end
339
- # end
340
- # end
341
- # end
342
- #
343
- # source://shoulda-context//lib/shoulda/context/dsl.rb#121
344
- def before_should(name, &blk); end
345
-
346
- # == Contexts
347
- #
348
- # A context block groups should statements under a common set of setup/teardown methods.
349
- # Context blocks can be arbitrarily nested, and can do wonders for improving the maintainability
350
- # and readability of your test code.
351
- #
352
- # A context block can contain setup, should, should_eventually, and teardown blocks.
353
- #
354
- # class UserTest < Test::Unit::TestCase
355
- # context "A User instance" do
356
- # setup do
357
- # @user = User.find(:first)
358
- # end
359
- #
360
- # should "return its full name"
361
- # assert_equal 'John Doe', @user.full_name
362
- # end
363
- # end
364
- # end
365
- #
366
- # This code will produce the method <tt>"test: A User instance should return its full name. "</tt>.
367
- #
368
- # Contexts may be nested. Nested contexts run their setup blocks from out to in before each
369
- # should statement. They then run their teardown blocks from in to out after each should statement.
370
- #
371
- # class UserTest < Test::Unit::TestCase
372
- # context "A User instance" do
373
- # setup do
374
- # @user = User.find(:first)
375
- # end
376
- #
377
- # should "return its full name"
378
- # assert_equal 'John Doe', @user.full_name
379
- # end
380
- #
381
- # context "with a profile" do
382
- # setup do
383
- # @user.profile = Profile.find(:first)
384
- # end
385
- #
386
- # should "return true when sent :has_profile?"
387
- # assert @user.has_profile?
388
- # end
389
- # end
390
- # end
391
- # end
392
- #
393
- # This code will produce the following methods
394
- # * <tt>"test: A User instance should return its full name. "</tt>
395
- # * <tt>"test: A User instance with a profile should return true when sent :has_profile?. "</tt>
396
- #
397
- # <b>Just like should statements, a context block can exist next to normal <tt>def test_the_old_way; end</tt>
398
- # tests</b>. This means you do not have to fully commit to the context/should syntax in a test file.
399
- #
400
- # source://shoulda-context//lib/shoulda/context/dsl.rb#188
401
- def context(name, &blk); end
402
-
403
- # Returns the class being tested, as determined by the test class name.
404
- #
405
- # class UserTest; described_type; end
406
- # # => User
407
- #
408
- # source://shoulda-context//lib/shoulda/context/dsl.rb#201
409
- def described_type; end
410
-
411
- # == Should statements
412
- #
413
- # Should statements are just syntactic sugar over normal Test::Unit test
414
- # methods. A should block contains all the normal code and assertions
415
- # you're used to seeing, with the added benefit that they can be wrapped
416
- # inside context blocks (see below).
417
- #
418
- # === Example:
419
- #
420
- # class UserTest < Test::Unit::TestCase
421
- #
422
- # def setup
423
- # @user = User.new("John", "Doe")
424
- # end
425
- #
426
- # should "return its full name"
427
- # assert_equal 'John Doe', @user.full_name
428
- # end
429
- #
430
- # end
431
- #
432
- # ...will produce the following test:
433
- # * <tt>"test: User should return its full name. "</tt>
434
- #
435
- # Note: The part before <tt>should</tt> in the test name is gleamed from the name of the Test::Unit class.
436
- #
437
- # Should statements can also take a Proc as a <tt>:before </tt>option. This proc runs after any
438
- # parent context's setups but before the current context's setup.
439
- #
440
- # === Example:
441
- #
442
- # context "Some context" do
443
- # setup { puts("I run after the :before proc") }
444
- #
445
- # should "run a :before proc", :before => lambda { puts("I run before the setup") } do
446
- # assert true
447
- # end
448
- # end
449
- #
450
- # Should statements can also wrap matchers, making virtually any matcher
451
- # usable in a macro style. The matcher's description is used to generate a
452
- # test name and failure message, and the test will pass if the matcher
453
- # matches the subject.
454
- #
455
- # === Example:
456
- #
457
- # should validate_presence_of(:first_name).with_message(/gotta be there/)
458
- #
459
- # source://shoulda-context//lib/shoulda/context/dsl.rb#64
460
- def should(name_or_matcher, options = T.unsafe(nil), &blk); end
461
-
462
- # Just like should, but never runs, and instead prints an 'X' in the Test::Unit output.
463
- #
464
- # source://shoulda-context//lib/shoulda/context/dsl.rb#126
465
- def should_eventually(name, options = T.unsafe(nil), &blk); end
466
-
467
- # Allows negative tests using matchers. The matcher's description is used
468
- # to generate a test name and negative failure message, and the test will
469
- # pass unless the matcher matches the subject.
470
- #
471
- # === Example:
472
- #
473
- # should_not set_the_flash
474
- #
475
- # source://shoulda-context//lib/shoulda/context/dsl.rb#83
476
- def should_not(matcher); end
477
-
478
- # Sets the return value of the subject instance method:
479
- #
480
- # class UserTest < Test::Unit::TestCase
481
- # subject { User.first }
482
- #
483
- # # uses the existing user
484
- # should validate_uniqueness_of(:email)
485
- # end
486
- #
487
- # source://shoulda-context//lib/shoulda/context/dsl.rb#218
488
- def subject(&block); end
489
-
490
- # source://shoulda-context//lib/shoulda/context/dsl.rb#222
491
- def subject_block; end
492
- end
493
-
494
- # source://shoulda-context//lib/shoulda/context/dsl.rb#227
495
- module Shoulda::Context::DSL::InstanceMethods
496
- # source://shoulda-context//lib/shoulda/context/dsl.rb#255
497
- def get_instance_of(object_or_klass); end
498
-
499
- # source://shoulda-context//lib/shoulda/context/dsl.rb#263
500
- def instance_variable_name_for(klass); end
501
-
502
- # Returns an instance of the class under test.
503
- #
504
- # class UserTest
505
- # should "be a user" do
506
- # assert_kind_of User, subject # passes
507
- # end
508
- # end
509
- #
510
- # The subject can be explicitly set using the subject class method:
511
- #
512
- # class UserTest
513
- # subject { User.first }
514
- # should "be an existing user" do
515
- # assert !subject.new_record? # uses the first user
516
- # end
517
- # end
518
- #
519
- # The subject is used by all macros that require an instance of the class
520
- # being tested.
521
- #
522
- # source://shoulda-context//lib/shoulda/context/dsl.rb#247
523
- def subject; end
524
-
525
- # source://shoulda-context//lib/shoulda/context/dsl.rb#251
526
- def subject_block; end
527
-
528
- private
529
-
530
- # source://shoulda-context//lib/shoulda/context/dsl.rb#269
531
- def construct_subject; end
532
- end
533
-
534
- # source://shoulda-context//lib/shoulda/context/context.rb#213
535
- class Shoulda::Context::DuplicateTestError < ::RuntimeError; end
536
-
537
- # source://shoulda-context//lib/shoulda/context/test_framework_detection.rb#3
538
- module Shoulda::Context::TestFrameworkDetection
539
- class << self
540
- # source://shoulda-context//lib/shoulda/context/test_framework_detection.rb#18
541
- def detected_test_framework_test_cases; end
542
-
543
- # source://shoulda-context//lib/shoulda/context/test_framework_detection.rb#4
544
- def possible_test_frameworks; end
545
-
546
- # source://shoulda-context//lib/shoulda/context/test_framework_detection.rb#12
547
- def resolve_framework(future_framework); end
548
-
549
- # source://shoulda-context//lib/shoulda/context/test_framework_detection.rb#24
550
- def test_framework_test_cases; end
551
- end
552
- end
553
-
554
- # source://shoulda-context//lib/shoulda/context/version.rb#3
555
- Shoulda::Context::VERSION = T.let(T.unsafe(nil), String)
@@ -1,8 +0,0 @@
1
- # typed: true
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `simplecov-html` gem.
5
- # Please instead update this file by running `bin/tapioca gem simplecov-html`.
6
-
7
- # THIS IS AN EMPTY RBI FILE.
8
- # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
@@ -1,8 +0,0 @@
1
- # typed: true
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `simplecov` gem.
5
- # Please instead update this file by running `bin/tapioca gem simplecov`.
6
-
7
- # THIS IS AN EMPTY RBI FILE.
8
- # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
@@ -1,8 +0,0 @@
1
- # typed: true
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `simplecov_json_formatter` gem.
5
- # Please instead update this file by running `bin/tapioca gem simplecov_json_formatter`.
6
-
7
- # THIS IS AN EMPTY RBI FILE.
8
- # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem