test/stripe/stripe_object_test.rb in stripe-1.38.0 vs test/stripe/stripe_object_test.rb in stripe-1.39.0

- old
+ new

@@ -284,7 +284,15 @@ assert_match Regexp.new(message), $stderr.string ensure $stderr = old_stderr end end + + should "error on setting a property to an empty string" do + obj = Stripe::StripeObject.construct_from({ :foo => 'bar' }) + e = assert_raises ArgumentError do + obj.foo = "" + end + assert_match /\(object\).foo = nil/, e.message + end end end