Sha256: b07c1886a1801e7b4f9e7b5b3c22f105f041e6d25638e50b760869b669b2e7ef

Contents?: true

Size: 478 Bytes

Versions: 3

Compression:

Stored size: 478 Bytes

Contents

require 'spec_helper'

describe 'Template' do
  it 'should raise ArgumentError if no template were provided' do
    proc { Docify::Template.new }.should raise_error ArgumentError
    proc { Docify::Template.new(" ") }.should raise_error ArgumentError
  end
  
  it 'should render a valid content' do
    Docify::Template.new("{{a}}{{b}}").render(:a => 'a', :b => 'b').should == 'ab'
    Docify::Template.new("{{a}}{{b}}").render('a' => 'a', 'b' => 'b').should == 'ab'
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
docify-1.0.5 spec/template_spec.rb
docify-1.0.4 spec/template_spec.rb
docify-1.0.3 spec/template_spec.rb