Sha256: 9c8794a18f54a5157bbce809947b8980d250c825345cd24c186a0866b0b777a6

Contents?: true

Size: 877 Bytes

Versions: 3

Compression:

Stored size: 877 Bytes

Contents

require 'helper'

class Leap::QuorumTest < Test::Unit::TestCase
  context 'to_xml' do
    should 'serialize to xml' do
      quorum = Leap::Quorum.new(
        'roll call', 
        { :needs => :count, :complies => :rules_of_endearment, :appreciates => [:adulation, :confirmation] },
        Proc.new {})

      output = ''
      quorum.to_xml(:target => output)
      assert_equal(<<XML, output)
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<quorum>
  <name type="string">roll call</name>
  <requirements type="array">
    <requirement type="string">count</requirement>
  </requirements>
  <appreciates type="array">
    <supplement type="string">adulation</supplement>
    <supplement type="string">confirmation</supplement>
  </appreciates>
  <complies type="array">
    <compliance type="string">rules_of_endearment</compliance>
  </complies>
</quorum>
XML
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
leap-0.4.6 test/leap/test_quorum.rb
leap-0.4.5 test/leap/test_quorum.rb
leap-0.4.4 test/leap/test_quorum.rb