diff --git a/spec/lib/microformats2/collection_spec.rb b/spec/lib/microformats2/collection_spec.rb index e5d3be1..dfca7f3 100644 --- a/spec/lib/microformats2/collection_spec.rb +++ b/spec/lib/microformats2/collection_spec.rb @@ -176,6 +176,20 @@ describe Microformats2::Collection do end end end + + describe "rels.html" do + before do + html = "spec/support/lib/microformats2/rels.html" + @collection = Microformats2.parse(html) + end + describe "#to_json" do + it "should match rels.js" do + json = "spec/support/lib/microformats2/rels.js" + json = open(json).read + JSON.parse(@collection.to_json).should == JSON.parse(json) + end + end + end end diff --git a/spec/support/lib/microformats2/rels.html b/spec/support/lib/microformats2/rels.html new file mode 100644 index 0000000..908e4d4 --- /dev/null +++ b/spec/support/lib/microformats2/rels.html @@ -0,0 +1,12 @@ + + +
+