Sha256: a47a0f93e929acc1fb69069ef04c3ffa48122efe1f3b4758834bf9818bc146d5

Contents?: true

Size: 640 Bytes

Versions: 1

Compression:

Stored size: 640 Bytes

Contents

require './spec/spec_helper'

describe Rollin::Blog do
  context 'reading articles from articles folder' do
    subject (:blog) { Rollin::Blog.new(articles_folder: 'spec/fixtures/articles') }

    it 'has the right amount of articles' do
      blog.articles.size.should == 4
    end

    it 'has the right amount of monthly archives' do
      blog.monthly_archive.size.should == 3
    end

    it 'has the right amount of yearly archives' do
      blog.annually_archive.size.should == 2
    end

    it 'finds article by its id' do
      blog.find_article_by_id('2013_05_01_My_first_post').title.should == 'My first post'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rollin-0.0.13 spec/blog_spec.rb