stripe 10.9.0.pre.beta.1 → 10.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +51 -275
  3. data/Gemfile +3 -0
  4. data/Makefile +7 -0
  5. data/OPENAPI_VERSION +1 -1
  6. data/README.md +0 -11
  7. data/VERSION +1 -1
  8. data/bin/tapioca +27 -0
  9. data/lib/stripe/api_operations/request.rb +1 -2
  10. data/lib/stripe/api_resource.rb +10 -1
  11. data/lib/stripe/api_resource_test_helpers.rb +6 -2
  12. data/lib/stripe/api_version.rb +0 -1
  13. data/lib/stripe/list_object.rb +3 -0
  14. data/lib/stripe/object_types.rb +120 -141
  15. data/lib/stripe/resources/account.rb +6 -4
  16. data/lib/stripe/resources/account_link.rb +3 -0
  17. data/lib/stripe/resources/account_session.rb +3 -0
  18. data/lib/stripe/resources/apple_pay_domain.rb +3 -0
  19. data/lib/stripe/resources/application_fee.rb +3 -0
  20. data/lib/stripe/resources/application_fee_refund.rb +3 -0
  21. data/lib/stripe/resources/apps/secret.rb +3 -0
  22. data/lib/stripe/resources/balance.rb +3 -0
  23. data/lib/stripe/resources/balance_transaction.rb +3 -0
  24. data/lib/stripe/resources/bank_account.rb +3 -0
  25. data/lib/stripe/resources/billing_portal/configuration.rb +3 -0
  26. data/lib/stripe/resources/billing_portal/session.rb +3 -0
  27. data/lib/stripe/resources/capability.rb +3 -0
  28. data/lib/stripe/resources/card.rb +3 -0
  29. data/lib/stripe/resources/cash_balance.rb +3 -0
  30. data/lib/stripe/resources/charge.rb +3 -0
  31. data/lib/stripe/resources/checkout/session.rb +3 -0
  32. data/lib/stripe/resources/climate/order.rb +3 -0
  33. data/lib/stripe/resources/climate/product.rb +3 -0
  34. data/lib/stripe/resources/climate/supplier.rb +3 -0
  35. data/lib/stripe/resources/country_spec.rb +3 -0
  36. data/lib/stripe/resources/coupon.rb +3 -0
  37. data/lib/stripe/resources/credit_note.rb +3 -0
  38. data/lib/stripe/resources/credit_note_line_item.rb +3 -0
  39. data/lib/stripe/resources/customer.rb +7 -13
  40. data/lib/stripe/resources/customer_balance_transaction.rb +3 -0
  41. data/lib/stripe/resources/customer_cash_balance_transaction.rb +3 -0
  42. data/lib/stripe/resources/customer_session.rb +3 -0
  43. data/lib/stripe/resources/discount.rb +3 -0
  44. data/lib/stripe/resources/dispute.rb +3 -0
  45. data/lib/stripe/resources/ephemeral_key.rb +3 -0
  46. data/lib/stripe/resources/event.rb +3 -0
  47. data/lib/stripe/resources/exchange_rate.rb +3 -0
  48. data/lib/stripe/resources/file.rb +6 -0
  49. data/lib/stripe/resources/file_link.rb +3 -0
  50. data/lib/stripe/resources/financial_connections/account.rb +3 -3
  51. data/lib/stripe/resources/financial_connections/account_owner.rb +3 -0
  52. data/lib/stripe/resources/financial_connections/account_ownership.rb +3 -0
  53. data/lib/stripe/resources/financial_connections/session.rb +3 -0
  54. data/lib/stripe/resources/financial_connections/transaction.rb +3 -0
  55. data/lib/stripe/resources/funding_instructions.rb +3 -0
  56. data/lib/stripe/resources/identity/verification_report.rb +3 -0
  57. data/lib/stripe/resources/identity/verification_session.rb +3 -0
  58. data/lib/stripe/resources/invoice.rb +2 -52
  59. data/lib/stripe/resources/invoice_item.rb +3 -0
  60. data/lib/stripe/resources/invoice_line_item.rb +3 -0
  61. data/lib/stripe/resources/issuing/authorization.rb +6 -0
  62. data/lib/stripe/resources/issuing/card.rb +6 -0
  63. data/lib/stripe/resources/issuing/cardholder.rb +3 -0
  64. data/lib/stripe/resources/issuing/dispute.rb +3 -0
  65. data/lib/stripe/resources/issuing/token.rb +3 -0
  66. data/lib/stripe/resources/issuing/transaction.rb +6 -0
  67. data/lib/stripe/resources/line_item.rb +3 -0
  68. data/lib/stripe/resources/login_link.rb +3 -0
  69. data/lib/stripe/resources/mandate.rb +3 -0
  70. data/lib/stripe/resources/payment_intent.rb +5 -4
  71. data/lib/stripe/resources/payment_link.rb +3 -0
  72. data/lib/stripe/resources/payment_method.rb +3 -0
  73. data/lib/stripe/resources/payment_method_configuration.rb +3 -0
  74. data/lib/stripe/resources/payment_method_domain.rb +3 -0
  75. data/lib/stripe/resources/payout.rb +3 -0
  76. data/lib/stripe/resources/person.rb +3 -0
  77. data/lib/stripe/resources/plan.rb +3 -0
  78. data/lib/stripe/resources/price.rb +3 -0
  79. data/lib/stripe/resources/product.rb +3 -0
  80. data/lib/stripe/resources/promotion_code.rb +3 -0
  81. data/lib/stripe/resources/quote.rb +3 -104
  82. data/lib/stripe/resources/radar/early_fraud_warning.rb +3 -0
  83. data/lib/stripe/resources/radar/value_list.rb +3 -0
  84. data/lib/stripe/resources/radar/value_list_item.rb +3 -0
  85. data/lib/stripe/resources/refund.rb +6 -0
  86. data/lib/stripe/resources/reporting/report_run.rb +3 -0
  87. data/lib/stripe/resources/reporting/report_type.rb +3 -0
  88. data/lib/stripe/resources/reversal.rb +3 -0
  89. data/lib/stripe/resources/review.rb +3 -0
  90. data/lib/stripe/resources/setup_attempt.rb +3 -0
  91. data/lib/stripe/resources/setup_intent.rb +3 -0
  92. data/lib/stripe/resources/shipping_rate.rb +3 -0
  93. data/lib/stripe/resources/sigma/scheduled_query_run.rb +3 -0
  94. data/lib/stripe/resources/source.rb +3 -0
  95. data/lib/stripe/resources/source_transaction.rb +3 -0
  96. data/lib/stripe/resources/subscription.rb +3 -0
  97. data/lib/stripe/resources/subscription_item.rb +3 -0
  98. data/lib/stripe/resources/subscription_schedule.rb +2 -19
  99. data/lib/stripe/resources/tax/calculation.rb +3 -0
  100. data/lib/stripe/resources/tax/calculation_line_item.rb +3 -0
  101. data/lib/stripe/resources/tax/registration.rb +3 -0
  102. data/lib/stripe/resources/tax/settings.rb +3 -0
  103. data/lib/stripe/resources/tax/transaction.rb +3 -0
  104. data/lib/stripe/resources/tax/transaction_line_item.rb +3 -0
  105. data/lib/stripe/resources/tax_code.rb +3 -0
  106. data/lib/stripe/resources/tax_id.rb +5 -4
  107. data/lib/stripe/resources/tax_rate.rb +3 -0
  108. data/lib/stripe/resources/terminal/configuration.rb +3 -0
  109. data/lib/stripe/resources/terminal/connection_token.rb +3 -0
  110. data/lib/stripe/resources/terminal/location.rb +3 -0
  111. data/lib/stripe/resources/terminal/reader.rb +6 -60
  112. data/lib/stripe/resources/test_helpers/test_clock.rb +3 -0
  113. data/lib/stripe/resources/token.rb +3 -0
  114. data/lib/stripe/resources/topup.rb +3 -0
  115. data/lib/stripe/resources/transfer.rb +3 -0
  116. data/lib/stripe/resources/treasury/credit_reversal.rb +3 -0
  117. data/lib/stripe/resources/treasury/debit_reversal.rb +3 -0
  118. data/lib/stripe/resources/treasury/financial_account.rb +3 -0
  119. data/lib/stripe/resources/treasury/financial_account_features.rb +3 -0
  120. data/lib/stripe/resources/treasury/inbound_transfer.rb +6 -0
  121. data/lib/stripe/resources/treasury/outbound_payment.rb +6 -0
  122. data/lib/stripe/resources/treasury/outbound_transfer.rb +6 -0
  123. data/lib/stripe/resources/treasury/received_credit.rb +6 -0
  124. data/lib/stripe/resources/treasury/received_debit.rb +6 -0
  125. data/lib/stripe/resources/treasury/transaction.rb +3 -0
  126. data/lib/stripe/resources/treasury/transaction_entry.rb +3 -0
  127. data/lib/stripe/resources/usage_record.rb +3 -0
  128. data/lib/stripe/resources/usage_record_summary.rb +3 -0
  129. data/lib/stripe/resources/webhook_endpoint.rb +3 -0
  130. data/lib/stripe/resources.rb +0 -22
  131. data/lib/stripe/search_result_object.rb +3 -0
  132. data/lib/stripe/singleton_api_resource.rb +1 -1
  133. data/lib/stripe/stripe_client.rb +28 -62
  134. data/lib/stripe/stripe_configuration.rb +1 -2
  135. data/lib/stripe/util.rb +1 -8
  136. data/lib/stripe/version.rb +1 -1
  137. data/lib/stripe.rb +0 -46
  138. data/sorbet/config +4 -0
  139. data/sorbet/rbi/annotations/.gitattributes +1 -0
  140. data/sorbet/rbi/annotations/coveralls_reborn.rbi +3 -0
  141. data/sorbet/rbi/gems/.gitattributes +1 -0
  142. data/sorbet/rbi/gems/addressable@2.8.6.rbi +1993 -0
  143. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  144. data/sorbet/rbi/gems/byebug@11.1.3.rbi +3606 -0
  145. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3437 -0
  146. data/sorbet/rbi/gems/coveralls_reborn@0.25.0.rbi +8 -0
  147. data/sorbet/rbi/gems/crack@0.4.5.rbi +144 -0
  148. data/sorbet/rbi/gems/docile@1.4.0.rbi +8 -0
  149. data/sorbet/rbi/gems/erubi@1.12.0.rbi +146 -0
  150. data/sorbet/rbi/gems/hashdiff@1.1.0.rbi +352 -0
  151. data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +19 -0
  152. data/sorbet/rbi/gems/json@2.7.1.rbi +1561 -0
  153. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
  154. data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
  155. data/sorbet/rbi/gems/mocha@1.16.1.rbi +11 -0
  156. data/sorbet/rbi/gems/netrc@0.11.0.rbi +161 -0
  157. data/sorbet/rbi/gems/parallel@1.24.0.rbi +280 -0
  158. data/sorbet/rbi/gems/parser@3.2.2.4.rbi +9454 -0
  159. data/sorbet/rbi/gems/power_assert@2.0.3.rbi +414 -0
  160. data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
  161. data/sorbet/rbi/gems/prism@0.19.0.rbi +29883 -0
  162. data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +1150 -0
  163. data/sorbet/rbi/gems/pry@0.14.2.rbi +10085 -0
  164. data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +931 -0
  165. data/sorbet/rbi/gems/racc@1.7.3.rbi +161 -0
  166. data/sorbet/rbi/gems/rack@3.0.8.rbi +5193 -0
  167. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
  168. data/sorbet/rbi/gems/rake@13.1.0.rbi +2884 -0
  169. data/sorbet/rbi/gems/rbi@0.1.6.rbi +2922 -0
  170. data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +3766 -0
  171. data/sorbet/rbi/gems/rexml@3.2.6.rbi +4887 -0
  172. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7004 -0
  173. data/sorbet/rbi/gems/rubocop@1.57.2.rbi +56919 -0
  174. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
  175. data/sorbet/rbi/gems/shoulda-context@2.0.0.rbi +555 -0
  176. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +8 -0
  177. data/sorbet/rbi/gems/simplecov@0.21.2.rbi +8 -0
  178. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
  179. data/sorbet/rbi/gems/spoom@1.2.4.rbi +3777 -0
  180. data/sorbet/rbi/gems/sync@0.5.0.rbi +8 -0
  181. data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +23136 -0
  182. data/sorbet/rbi/gems/tapioca@0.11.17.rbi +3503 -0
  183. data/sorbet/rbi/gems/term-ansicolor@1.7.1.rbi +8 -0
  184. data/sorbet/rbi/gems/test-unit@3.6.1.rbi +4403 -0
  185. data/sorbet/rbi/gems/thor@1.3.0.rbi +4345 -0
  186. data/sorbet/rbi/gems/tins@1.32.1.rbi +8 -0
  187. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +65 -0
  188. data/sorbet/rbi/gems/webmock@3.19.1.rbi +1740 -0
  189. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
  190. data/sorbet/rbi/gems/yard@0.9.34.rbi +18219 -0
  191. data/sorbet/tapioca/config.yml +13 -0
  192. data/sorbet/tapioca/require.rb +4 -0
  193. metadata +61 -27
  194. data/lib/stripe/request_signing_authenticator.rb +0 -79
  195. data/lib/stripe/resources/account_notice.rb +0 -29
  196. data/lib/stripe/resources/capital/financing_offer.rb +0 -46
  197. data/lib/stripe/resources/capital/financing_summary.rb +0 -12
  198. data/lib/stripe/resources/capital/financing_transaction.rb +0 -24
  199. data/lib/stripe/resources/confirmation_token.rb +0 -13
  200. data/lib/stripe/resources/customer_entitlement.rb +0 -9
  201. data/lib/stripe/resources/customer_entitlement_summary.rb +0 -9
  202. data/lib/stripe/resources/entitlements/event.rb +0 -23
  203. data/lib/stripe/resources/entitlements/feature.rb +0 -35
  204. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -11
  205. data/lib/stripe/resources/gift_cards/card.rb +0 -56
  206. data/lib/stripe/resources/gift_cards/transaction.rb +0 -90
  207. data/lib/stripe/resources/invoice_payment.rb +0 -9
  208. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -85
  209. data/lib/stripe/resources/issuing/personalization_design.rb +0 -113
  210. data/lib/stripe/resources/issuing/physical_bundle.rb +0 -23
  211. data/lib/stripe/resources/margin.rb +0 -34
  212. data/lib/stripe/resources/order.rb +0 -117
  213. data/lib/stripe/resources/quote_phase.rb +0 -36
  214. data/lib/stripe/resources/quote_preview_invoice.rb +0 -40
  215. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -8
  216. data/lib/stripe/resources/tax/form.rb +0 -46
@@ -0,0 +1,555 @@
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)
@@ -0,0 +1,8 @@
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
@@ -0,0 +1,8 @@
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
@@ -0,0 +1,8 @@
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