test/stripe/stripe_object_test.rb in stripe-1.58.0 vs test/stripe/stripe_object_test.rb in stripe-2.0.0
- old
+ new
@@ -114,12 +114,16 @@
should "pass opts down to children when initializing" do
opts = { :custom => "opts" }
# customer comes with a `sources` list that makes a convenient object to
# perform tests on
- customer = Stripe::Customer.construct_from(make_customer, opts)
+ obj = Stripe::StripeObject.construct_from({
+ sources: [
+ {}
+ ]
+ }, opts)
- source = customer.sources.first
+ source = obj.sources.first
# Pulling `@opts` as an instance variable here is not ideal, but it's
# important enough argument that the test here is worth it. we should
# consider exposing it publicly on a future pull (and possibly renaming
# it to something more useful).
assert_equal opts, source.instance_variable_get(:@opts)