adds activesupport gem dependency

This commit is contained in:
Jessica Lynn Suttles 2013-02-18 09:35:58 -08:00
parent a33ce3f699
commit 8e82752c91
3 changed files with 14 additions and 12 deletions

View file

@ -39,6 +39,7 @@ Not Implemented:
* "nokogiri", "~> 1.5.6" * "nokogiri", "~> 1.5.6"
* "json", "~> 1.7.6" * "json", "~> 1.7.6"
* "activesupport", "~> 3.2.12"
## Installation ## Installation

View file

@ -19,6 +19,7 @@ Gem::Specification.new do |gem|
gem.add_runtime_dependency "nokogiri", "~> 1.5.6" gem.add_runtime_dependency "nokogiri", "~> 1.5.6"
gem.add_runtime_dependency "json", "~> 1.7.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 "rake", "~> 10.0.0"
gem.add_development_dependency "rspec", "~> 2.11.0" gem.add_development_dependency "rspec", "~> 2.11.0"

View file

@ -21,36 +21,36 @@ describe Microformats2::Collection do
@collection.card.first.should be_kind_of HCard @collection.card.first.should be_kind_of HCard
end end
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 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 end
it "assigns inner_text to Property#to_s" do 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
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 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 end
it "assigns inner_text to Property#to_s" do it "assigns inner_text to Property#to_s" do
urls = ["http://flickr.com/jlsuttles", "http://twitter.com/jlsuttles"] 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
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 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 end
it "assigns datetime attribute to Property#string_to_s" do 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 end
it "assigns DateTime object to Property#to_s" do it "assigns DateTime object to Property#to_s" do
@collection.first.bday.first.value.should be_kind_of DateTime @collection.first.bdays.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.to_s.should == "1990-10-15T00:00:00+00:00"
end end
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 it "assigns Property from '.h-card .p-content' to HCard#content[]" do
@collection.first.content.first.should be_kind_of Microformats2::Property::Embedded @collection.first.content.first.should be_kind_of Microformats2::Property::Embedded
end end