Sha256: 218f6f3748d5723a9eb8d97affb30b12b84c98da6448d53ca2cb09d1b3f5854a

Contents?: true

Size: 971 Bytes

Versions: 8

Compression:

Stored size: 971 Bytes

Contents

require_relative '../spec_helper'
require 'front_matter_parser'

describe BlogController do
  def app() BlogController end

  ARTICLES = Eucalypt.glob('app', 'views', 'blog', 'markdown', '**', '*.md').map do |md|
    FrontMatterParser::Parser.parse_file(md).front_matter.symbolize_keys
  end

  describe 'blog page' do
    it "should display all posts" do
      get '/'
      expect(true).to be true
    end
  end

  ARTICLES.each do |post|
    subpath = post[:time].split(' ').first.gsub(?-,?/)

    describe "Post: #{post[:title]}" do
      before { get "/#{subpath}/#{post[:urltitle]}" }

      it "should have a timestamp" do
        expect(true).to be true
      end

      it "should have a title" do
        expect(true).to be true
      end

      it "should have a description" do
        expect(true).to be true
      end

      it "should have tags" do
        post[:tags].each do |tag|
          expect(true).to be true
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
eucalypt-0.9.0 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.8.0 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.7.2 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.7.1 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.7.0 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.6.2 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.6.1 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.6.0 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt