Jessica has strong feelings on whitespace
This commit is contained in:
parent
66f7123d55
commit
a34816f072
3 changed files with 1 additions and 9 deletions
|
@ -35,5 +35,4 @@ module Microformats2
|
|||
end # class << self
|
||||
|
||||
class InvalidPropertyPrefix < StandardError; end
|
||||
|
||||
end
|
||||
end
|
|
@ -8,7 +8,6 @@ module Microformats2
|
|||
"e" => Embedded }
|
||||
|
||||
class << self
|
||||
|
||||
def new(element, property_class, value=nil)
|
||||
# p-class-name -> p
|
||||
prefix = property_class.split("-").first
|
||||
|
@ -18,6 +17,5 @@ module Microformats2
|
|||
klass.new(element, property_class, value)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -73,20 +73,16 @@ describe Microformats2::Collection do
|
|||
@collection.card.contents.first.should be_kind_of Microformats2::Property::Embedded
|
||||
end
|
||||
end
|
||||
|
||||
describe "Format.add_property" do
|
||||
let(:value) { "bar" }
|
||||
|
||||
it "creates the attr" do
|
||||
@collection.first.add_property("p-foo", value)
|
||||
@collection.first.foo.to_s.should == value
|
||||
end
|
||||
|
||||
it "allows json output of the attribute" do
|
||||
@collection.first.add_property("p-foo", value)
|
||||
@collection.first.to_json.should include(value)
|
||||
end
|
||||
|
||||
it "raises a InvalidPropertyPrefix error if the prefix is invalid" do
|
||||
expect {
|
||||
@collection.first.add_property("xxx-foo", value)
|
||||
|
@ -94,7 +90,6 @@ describe Microformats2::Collection do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "nested-property.html" do
|
||||
before do
|
||||
html = "spec/support/lib/microformats2/nested-property.html"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue