require 'helper' class Leap::ReportTest < Test::Unit::TestCase context 'to_xml' do should 'serialize to xml' do choc = Leap::Quorum.new('with chocolate chips', {}, Proc.new {}) mac = Leap::Quorum.new('with macadamia nuts', {}, Proc.new {}) committee = Leap::Committee.new 'Senate Committee on Chocolate Cookies' committee.instance_variable_set :@quorums, [choc, mac] report = Leap::Report.new committee, choc => 'good' output = '' report.to_xml(:target => output) assert_equal(< Senate Committee on Chocolate Cookies with chocolate chips with macadamia nuts good with chocolate chips XML end end end