Sha256: e7a04b2d12b4fa4dd6bd74406d1f427bb512d1e72136a58a670ff3a93c03db5a

Contents?: true

Size: 789 Bytes

Versions: 1

Compression:

Stored size: 789 Bytes

Contents

require 'spec/spec_helper'

describe "xml" do
  before(:each) do
    @xml = <<-XML
      <root>
        <one>1</one>
        <two>2</two>
      </root>
    XML
  end

  it "should match_xml" do
    @xml.should match_xml(<<-XML)
      <root>
        <one>1</one>
        <two>2</two>
      </root>
    XML
  end

  it "should not match_xml" do
    @xml.should_not match_xml(<<-XML)
      <root>
        <one>2</one>
      </root>
    XML
  end

  it "should match_xml_structure" do
    @xml.should match_xml_structure(<<-XML)
      <root>
        <one>2</one>
        <two>1</two>
      </root>
    XML
  end

  it "should not match_xml_structure" do
    @xml.should_not match_xml_structure(<<-XML)
      <root>
        <one>2</one>
        <three>1</three>
      </root>
    XML
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
test_xml-0.0.1 spec/test_xml/spec_spec.rb