Sha256: 00bc02896e5cdfaadda05646a5c4e7775cbf71918c68f631810065b4dfe7cd72

Contents?: true

Size: 652 Bytes

Versions: 8

Compression:

Stored size: 652 Bytes

Contents

require File.join(File.dirname(__FILE__), '..', 'test_helper')

class TestXmlArray < Test::Unit::TestCase
  def test_as_array_with_auto_guard
    result = BookWithContributors.from_xml(%{
      <book isbn="0974514055">
        <contributors>
          <contributor role="author"><name>David Thomas</name></contributor>
          <contributor role="supporting author"><name>Andrew Hunt</name></contributor>
          <contributor role="supporting author"><name>Chad Fowler</name></contributor>
        </contributors>
      </book>
    }).contributors.map(&:name).sort
    assert_equal ["David Thomas","Andrew Hunt","Chad Fowler"].sort, result
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
Empact-roxml-2.4.0 test/unit/array_test.rb
Empact-roxml-2.4.1 test/unit/array_test.rb
Empact-roxml-2.4.2 test/unit/array_test.rb
Empact-roxml-2.4.3 test/unit/array_test.rb
roxml-2.4.0 test/unit/array_test.rb
roxml-2.4.2 test/unit/array_test.rb
roxml-2.4.3 test/unit/array_test.rb
roxml-2.4.1 test/unit/array_test.rb