Sha256: 12a50fcfac8479b997e457565b789a1d4674add8fa53dfe86301009211954a17
Contents?: true
Size: 919 Bytes
Versions: 12
Compression:
Stored size: 919 Bytes
Contents
require "spec_helper" describe Machined::Processors::FrontMatterProcessor do it "parses the front matter and adds locals" do within_construct do |c| c.file "pages/index.html.haml", <<-CONTENT.unindent --- title: Hello tags: - 1 - 2 --- = title.inspect = tags.inspect CONTENT machined.pages["index.html"].to_s.should == <<-CONTENT.unindent "Hello" [1, 2] CONTENT end end it "ignores pages without front matter" do within_construct do |c| c.file "pages/index.html.md", <<-CONTENT.unindent Title --- Another Title --- Content... CONTENT machined.pages["index.html"].to_s.should == <<-CONTENT.unindent <h2>Title</h2> <h2>Another Title</h2> <p>Content...</p> CONTENT end end end
Version data entries
12 entries across 12 versions & 1 rubygems