Sha256: b0a0e08f2b7b2dba29d37546ee1e27ddc8b34286be717e7cfb7d29263a241ffe

Contents?: true

Size: 1.09 KB

Versions: 9

Compression:

Stored size: 1.09 KB

Contents

require "spec_helper"
require "microformats2"

describe Microformats2::ImpliedProperty::Photo do
  describe "spec/support/lib/microformats/implied_property" do
    describe "photo-pass.html" do
      html = "spec/support/lib/microformats2/implied_property/photo-pass.html"
      collection = Microformats2.parse(html)
      it "should have 6 microformats" do
        collection.all.length.should == 6
      end
      collection.all.each_with_index do |format, index|
        it "implies photo to be 'http://gravatar.com/jlsuttles' in case #{index+1}" do
          format.photo.to_s.should == "http://gravatar.com/jlsuttles"
        end
      end
    end
    describe "photo-fail.html" do
      html = "spec/support/lib/microformats2/implied_property/photo-fail.html"
      collection = Microformats2.parse(html)
      it "should have 8 microformats" do
        collection.all.length.should == 8
      end
      collection.all.each_with_index do |format, index|
        it "implies photo to be '' in case #{index+1}" do
          expect {format.photo}.to raise_error(NoMethodError)
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
microformats2-2.9.0 spec/lib/microformats2/implied_property/photo_spec.rb
microformats2-2.1.0 spec/lib/microformats2/implied_property/photo_spec.rb
microformats2-2.0.3 spec/lib/microformats2/implied_property/photo_spec.rb
microformats2-2.0.2 spec/lib/microformats2/implied_property/photo_spec.rb
microformats2-2.0.1 spec/lib/microformats2/implied_property/photo_spec.rb
microformats2-2.0.0 spec/lib/microformats2/implied_property/photo_spec.rb
microformats2-2.0.0.pre5 spec/lib/microformats2/implied_property/photo_spec.rb
microformats2-2.0.0.pre4 spec/lib/microformats2/implied_property/photo_spec.rb
microformats2-2.0.0.pre3 spec/lib/microformats2/implied_property/photo_spec.rb