Sha256: 313f922c0558292c3c5f269993c4fecc657dc491467a66e9281aca1eddc611fa

Contents?: true

Size: 1.14 KB

Versions: 2

Compression:

Stored size: 1.14 KB

Contents

require 'spec_helper'

describe 'MustacheRender::Mustache.db_render' do
  before :each do
  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.13 spec/lib/mustache/file_render_spec.rb
mustache_render-0.0.12 spec/lib/mustache/file_render_spec.rb