Sha256: 1a6b92333178bbbbf0b942d34968b47c49dc84830015941c2453df31f4ca385b

Contents?: true

Size: 536 Bytes

Versions: 14

Compression:

Stored size: 536 Bytes

Contents

require 'spec_helper'
module WLang
  class Source
    describe FrontMatter, "template_content" do

      subject{ FrontMatter.new(source).template_content }

      context 'without front matter' do
        let(:source){ "Hello world!" }
        it{ should eq(source) }
      end

      describe 'with a front matter' do
        let(:source){ "---\nlocals:\n  x: 2\n---\nHello world!" }
        specify 'it should not return the front matter itself' do
          subject.should eq("Hello world!")
        end
      end

    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
wlang-3.0.1 spec/unit/source/front_matter/test_template_content.rb
wlang-3.0.0 spec/unit/source/front_matter/test_template_content.rb
wlang-2.3.1 spec/unit/source/front_matter/test_template_content.rb
wlang-2.3.0 spec/unit/source/front_matter/test_template_content.rb
wlang-2.2.4 spec/unit/source/front_matter/test_template_content.rb
wlang-2.2.3 spec/unit/source/front_matter/test_template_content.rb
wlang-2.2.2 spec/unit/source/front_matter/test_template_content.rb
wlang-2.2.1 spec/unit/source/front_matter/test_template_content.rb
wlang-2.2.0 spec/unit/source/front_matter/test_template_content.rb
wlang-2.1.2 spec/unit/source/front_matter/test_template_content.rb
wlang-2.1.1 spec/unit/source/front_matter/test_template_content.rb
wlang-2.1.0 spec/unit/source/front_matter/test_template_content.rb
wlang-2.0.1 spec/unit/source/front_matter/test_template_content.rb
wlang-2.0.0 spec/unit/source/front_matter/test_template_content.rb