Sha256: 4306cf67bdb18688101caaa80734f021fba76c8bb6daa1e3f94f6b4e5453119e

Contents?: true

Size: 976 Bytes

Versions: 21

Compression:

Stored size: 976 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 false
    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 false
      end

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

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

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

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
eucalypt-0.5.4 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.5.3 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.5.2 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.5.1 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.5.0 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.4.2 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.4.1 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.4.0 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.3.5 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.3.4 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.3.3 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.3.2 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.3.1 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.3.0 lib/eucalypt/blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.2.2 lib/eucalypt/eucalypt-blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.2.1 lib/eucalypt/eucalypt-blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.2.0 lib/eucalypt/eucalypt-blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.1.3 lib/eucalypt/eucalypt-blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.1.2 lib/eucalypt/eucalypt-blog/namespaces/blog/templates/controller/controller_spec.tt
eucalypt-0.1.1 lib/eucalypt/eucalypt-blog/namespaces/blog/templates/controller/controller_spec.tt