Sha256: dddecd9e62506b28e2e6655be7c508824b66245a8656ef090bcb10008a9d7fb2

Contents?: true

Size: 1.04 KB

Versions: 3

Compression:

Stored size: 1.04 KB

Contents

require File.dirname(__FILE__) + '/test_helper'
require 'mofo/hentry'

context "A parsed hEntry object" do
  setup do
    $hentry ||= HEntry.find(:first => fixture(:hatom))
  end

  specify "should have a title" do
    $hentry.entry_title.should.equal "“A Rails Toolbox”"
  end

  specify "should have an author string " do
    $hentry.author.should.be.an.instance_of HCard
    $hentry.author.fn.should.equal "Chris"
  end

  specify "should have content" do
    $hentry.entry_content.should.be.an.instance_of String
  end

  specify "should have an attached published date object" do
    $hentry.published.should.be.an.instance_of Time
  end

  xspecify "should have an inferred updated attribute which references the published date object" do
    $hentry.updated.should.be.an.instance_of Time
    $hentry.updated.should.be $hentry.published
  end

  specify "should have a bookmark (permalink)" do
    $hentry.bookmark.should.equal "/post/13"
  end

  specify "should have an array of tags" do
    $hentry.tags.should.be.an.instance_of Array
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mofo-0.2.1 test/hatom_test.rb
mofo-0.2.2 test/hatom_test.rb
mofo-0.2 test/hatom_test.rb