whoops, forgot 1.8 support

This commit is contained in:
Andrew Thorp 2014-01-24 23:33:56 -08:00
parent 413939f89f
commit 45fe0c2591

View File

@ -3,14 +3,14 @@ require File.expand_path('../../test_helper', __FILE__)
module Stripe
class StripeObjectTest < Test::Unit::TestCase
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?(:foo)
assert !obj.respond_to?(:baz)
end
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))
assert_equal m.id, 1
assert_equal m.name, 'Stripe'