organizing broke the world

This commit is contained in:
Jessica Lynn Suttles 2013-02-12 18:46:35 -08:00
parent 113d95af17
commit 081d0e5000
15 changed files with 189 additions and 164 deletions

View file

@ -25,21 +25,21 @@ describe Microformats2::Collection do
describe "#parse" do
it "creates ruby class HCard" do
@collection.h_card.should be_kind_of HCard
@collection.first.should be_kind_of HCard
end
it "assigns .h-card .p-name to HCard#name" do
@collection.h_card.name.value.should == "Jessica Lynn Suttles"
@collection.first.name.value.should == "Jessica Lynn Suttles"
end
it "assigns both .h-card .u-url to HCard#url" do
urls = ["http://flickr.com/jlsuttles", "http://twitter.com/jlsuttles"]
@collection.h_card.url.map(&:value).should == urls
@collection.first.url.map(&:value).should == urls
end
it "assings .h-card .dt-bday to HCard#bday" do
@collection.h_card.bday.value.should be_kind_of DateTime
@collection.h_card.bday.value.to_s.should == "1990-10-15T20:45:33-08:00"
@collection.first.bday.value.should be_kind_of DateTime
@collection.first.bday.value.to_s.should == "1990-10-15T20:45:33-08:00"
end
it "assigns .h-card .e-content to HCard#content" do
@collection.h_card.content.value.should == "Vegan. Cat lover. Coder."
@collection.first.content.value.should == "Vegan. Cat lover. Coder."
end
end
@ -69,10 +69,10 @@ describe Microformats2::Collection do
describe "#parse" do
it "creates ruby class HEntry" do
@collection.h_entry.should be_kind_of HEntry
@collection.first.should be_kind_of HEntry
end
it "assigns .h-entry .p-author to HEntry#author" do
@collection.h_entry.author.value.should == "Jessica Lynn Suttles"
@collection.first.author.value.should == "Jessica Lynn Suttles"
end
end

View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<body>
<div class="h-card">
<div class="p-author">Jessica Lynn Suttles</div>
<div class="h-card h-org">
<a class="p-name">
G5
</a>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<body>
<div class="h-card">
<div class="p-name">
<div class="p-nickname">
jlsuttles
</div>
</div>
</div>
</body>
</html>