Sha256: 8fae44ec11f8fd77a61ebc0fd264a26fa1831aea43d0fa8038c6532c1c2458b9

Contents?: true

Size: 614 Bytes

Versions: 1

Compression:

Stored size: 614 Bytes

Contents

require 'test_helper'

class TestMatchers < Test::Unit::TestCase
  include TestXml::Matchers

  def test_match
    actual = <<-XML
      <root>
        <one>
          <two>2</two>
        </one>
      </root>
    XML

    assert  match_xml?(actual, '<root><one><two/></one></root>')
    assert !match_xml?(actual, '<root><two/></root>')
  end

  def test_match_with_values
    actual = <<-XML
      <root>
        <one>1</one>
        <two>2</two>
      </root>
    XML

    assert  match_xml?(actual, '<root><one>1</one></root>', true)
    assert !match_xml?(actual, '<root><one>2</one></root>', true)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
test_xml-0.0.1 test/test_xml/test_matchers.rb