From 8e82752c9116fef7cdf18c3c21e71f31ff8bac2f Mon Sep 17 00:00:00 2001 From: Jessica Lynn Suttles Date: Mon, 18 Feb 2013 09:35:58 -0800 Subject: [PATCH] adds activesupport gem dependency --- README.md | 1 + microformats2.gemspec | 1 + spec/lib/microformats2/collection_spec.rb | 24 +++++++++++------------ 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index cd3c847..05b9478 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ Not Implemented: * "nokogiri", "~> 1.5.6" * "json", "~> 1.7.6" +* "activesupport", "~> 3.2.12" ## Installation diff --git a/microformats2.gemspec b/microformats2.gemspec index 701ad3a..37c45fa 100644 --- a/microformats2.gemspec +++ b/microformats2.gemspec @@ -19,6 +19,7 @@ Gem::Specification.new do |gem| gem.add_runtime_dependency "nokogiri", "~> 1.5.6" gem.add_runtime_dependency "json", "~> 1.7.6" + gem.add_runtime_dependency "activesupport", "~> 3.2.12" gem.add_development_dependency "rake", "~> 10.0.0" gem.add_development_dependency "rspec", "~> 2.11.0" diff --git a/spec/lib/microformats2/collection_spec.rb b/spec/lib/microformats2/collection_spec.rb index 460ad22..aecf0b8 100644 --- a/spec/lib/microformats2/collection_spec.rb +++ b/spec/lib/microformats2/collection_spec.rb @@ -21,36 +21,36 @@ describe Microformats2::Collection do @collection.card.first.should be_kind_of HCard end end - describe "HCard#name parsed from '.h-card .p-name'" do + describe "HCard#names parsed from '.h-card .p-name'" do it "assigns Property from '.h-card .p-name' to HCard#name[]" do - @collection.first.name.first.should be_kind_of Microformats2::Property::Text + @collection.first.names.first.should be_kind_of Microformats2::Property::Text end it "assigns inner_text to Property#to_s" do - @collection.first.name.first.to_s.should == "Jessica Lynn Suttles" + @collection.first.names.first.to_s.should == "Jessica Lynn Suttles" end end - describe "HCard#url parsed from '.h-card .p-url'" do + describe "HCard#urls parsed from '.h-card .p-url'" do it "assigns Property from '.h-card .p-url' to HCard#url[]" do - @collection.first.url.first.should be_kind_of Microformats2::Property::Url + @collection.first.urls.first.should be_kind_of Microformats2::Property::Url end it "assigns inner_text to Property#to_s" do urls = ["http://flickr.com/jlsuttles", "http://twitter.com/jlsuttles"] - @collection.first.url.map(&:to_s).should == urls + @collection.first.urls.map(&:to_s).should == urls end end - describe "HCard#bday parsed from '.h-card .p-bday'" do + describe "HCard#bdays parsed from '.h-card .p-bday'" do it "assigns Property from '.h-card .p-bday' to HCard#bday[]" do - @collection.first.bday.first.should be_kind_of Microformats2::Property::DateTime + @collection.first.bdays.first.should be_kind_of Microformats2::Property::DateTime end it "assigns datetime attribute to Property#string_to_s" do - @collection.first.bday.first.to_s.should == "1990-10-15" + @collection.first.bdays.first.to_s.should == "1990-10-15" end it "assigns DateTime object to Property#to_s" do - @collection.first.bday.first.value.should be_kind_of DateTime - @collection.first.bday.first.value.to_s.should == "1990-10-15T00:00:00+00:00" + @collection.first.bdays.first.value.should be_kind_of DateTime + @collection.first.bdays.first.value.to_s.should == "1990-10-15T00:00:00+00:00" end end - describe "HCard#content parsed from '.h-card .p-content'" do + describe "HCard#contents parsed from '.h-card .p-content'" do it "assigns Property from '.h-card .p-content' to HCard#content[]" do @collection.first.content.first.should be_kind_of Microformats2::Property::Embedded end