require 'spec_helper'
describe "equal_xml_structure(xml)" do
subject {
<<-XML
1
2
XML
}
context "when xml structure is equal with subject" do
it "should pass" do
should equal_xml_structure(<<-XML)
XML
end
end
context "when xml structure is equal with subject and elements have different content" do
it "should pass" do
should equal_xml_structure(<<-XML)
4
5
XML
end
end
context "when xml has less elements" do
it "should fail" do
should_not equal_xml_structure(<<-XML)
XML
end
end
context "when xml has more elements" do
it "should fail" do
should_not equal_xml_structure(<<-XML)
XML
end
end
end