Sha256: e706c0d3ed27358b55985541b06cbcdcefcd1bae901c6958b0ba43be5dce9ff0
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
require 'spec_helper' describe "FakeChargify::Product" do describe ".to_xml" do it "returns xml from object properties" do product = FakeChargify::Product.new product.accounting_code = '1234' product.handle = 'Starter' product.interval = 4 product.name = 'Subscription' product.price_in_cents = 897 product.family = FakeChargify::ProductFamily.new product.family.accounting_code = '1234' product.family.handle = 'Starter' product.family.name = 'Subscription' product.to_xml.gsub(/\s/,'').should == """ <?xml version=\"1.0\"?> <product> <accounting_code>1234</accounting_code> <handle>Starter</handle> <interval>4</interval> <name>Subscription</name> <price_in_cents>897</price_in_cents> <product_family> <accounting_code>1234</accounting_code> <handle>Starter</handle> <name>Subscription</name> </product_family> </product> """.gsub(/\s/,'') end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fake_chargify-0.1.0 | spec/fake_chargify/product_spec.rb |