Sha256: bdf7f3fa7daac700b7ac56ace8bc37294f2eba923395c6fb96f9afe963bc507e
Contents?: true
Size: 661 Bytes
Versions: 4
Compression:
Stored size: 661 Bytes
Contents
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' }) 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' }, 'apikey') m = Marshal.load(Marshal.dump(obj)) assert_equal 1, m.id assert_equal 'Stripe', m.name assert_equal 'apikey', m.api_key end end end
Version data entries
4 entries across 4 versions & 1 rubygems