mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-12-09 00:01:53 -05:00
whoops, forgot 1.8 support
This commit is contained in:
parent
e717ee711e
commit
837461ac28
@ -3,14 +3,14 @@ require File.expand_path('../../test_helper', __FILE__)
|
|||||||
module Stripe
|
module Stripe
|
||||||
class StripeObjectTest < Test::Unit::TestCase
|
class StripeObjectTest < Test::Unit::TestCase
|
||||||
should "implement #respond_to correctly" do
|
should "implement #respond_to correctly" do
|
||||||
obj = Stripe::StripeObject.construct_from({ id: 1, foo: 'bar' })
|
obj = Stripe::StripeObject.construct_from({ :id => 1, :foo => 'bar' })
|
||||||
assert obj.respond_to?(:id)
|
assert obj.respond_to?(:id)
|
||||||
assert obj.respond_to?(:foo)
|
assert obj.respond_to?(:foo)
|
||||||
assert !obj.respond_to?(:baz)
|
assert !obj.respond_to?(:baz)
|
||||||
end
|
end
|
||||||
|
|
||||||
should "marshal a stripe object correctly" do
|
should "marshal a stripe object correctly" do
|
||||||
obj = Stripe::StripeObject.construct_from({ id: 1, name: 'Stripe' })
|
obj = Stripe::StripeObject.construct_from({ :id => 1, :name => 'Stripe' })
|
||||||
m = Marshal.load(Marshal.dump(obj))
|
m = Marshal.load(Marshal.dump(obj))
|
||||||
assert_equal m.id, 1
|
assert_equal m.id, 1
|
||||||
assert_equal m.name, 'Stripe'
|
assert_equal m.name, 'Stripe'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user