Sha256: e3ed9af4892bfe37fa30bfb66335ebc8801464f93656523fa11f6e82927c5dd0

Contents?: true

Size: 847 Bytes

Versions: 1

Compression:

Stored size: 847 Bytes

Contents

require 'spec_helper'

describe 'Luneta' do

  describe 'Template' do

    let(:template) do
      Luneta::Template.new(sample_file("sample-site/simple-test.erb"))
    end

    it "creates an instance" do
      template.must_be_instance_of(Luneta::Template) 
    end

    it "renders the template" do
      template.render.must_match("Simple ERB Test")
    end

  end

  describe 'Template HAML' do

    it "renders the template" do
      template = Luneta::Template.new(sample_file("sample-site/simple-test.haml"))
      template.render.must_match("Simple HAML Test")
    end

    it "renders the template with parameters" do
      template = Luneta::Template.new(sample_file("sample-site/simple-test-with-params.haml"))
      template.render("", {a: "Simple Test with Parameters"}).must_match("Simple Test with Parameters")
    end


  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
luneta-0.0.3 spec/template_spec.rb