require 'spec_helper' describe "FakeChargify::CreditCard" do describe ".to_xml" do it "returns xml from object properties" do card = FakeChargify::CreditCard.new card.full_number = "1" card.expiration_month = 12 card.expiration_year = 2011 card.to_xml.gsub(/\s/,'').should == """ XXXX-XXXX-XXXX-1 12 2011 """.gsub(/\s/,'') end end end