Sha256: 05a4d2a087ec5c942181ed1f6dd242ae801b1e4dac58a9006fdebed80aa0ebbe

Contents?: true

Size: 1.26 KB

Versions: 2

Compression:

Stored size: 1.26 KB

Contents

require 'spec_helper'

describe 'MustacheRender::Mustache.db_render' do
  before :each do
    MustacheRender.configure do |config|
      config.file_template_root_path = ROOT_PATH + '/resources/templates'
    end
  end

  it 'template scan_tags test' do
    result = MustacheRender::Mustache.file_render 'scan_tags/1', {}

  end

  it 'template file 5.mustache render ok' do
    result = MustacheRender::Mustache.file_render 'basic/5', {}
    result.should == <<-TEXT
file:5, in-file6

file:5-2, in-file6

file:5-3, in-file6

file:5-4, in-file6

file:5-5, in-file6

file:5-6, in-file6

file:5-7, in-file6

file:5-8, in-file6

file:5-9, in-file6

file:5-10, in-file6

file:5-11, in-file6

TEXT
  end

  it 'template file 1.mustache render ok' do
    result = MustacheRender::Mustache.file_render 'basic/1', {:filename => '1.mustache'}
    result.should == <<-TEXT
Hello!1.mustache
TEXT
  end

  it 'template 2 with partial 1 render OK' do
     result = MustacheRender::Mustache.file_render 'basic/2', {:filename => 'in1'}
     result.should == <<-TEXT
file-2Hello!in1

TEXT
  end

  it 'template file 3.mustache partial with 2 render OK' do
     result = MustacheRender::Mustache.file_render 'basic/3', {:filename => 'in1'}
     result.should == <<-TEXT
file3file-2Hello!in1


TEXT

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mustache_render-0.0.10 spec/lib/mustache/file_render_spec.rb
mustache_render-0.0.9 spec/lib/mustache/file_render_spec.rb