spec/template_spec.rb in docify-1.0.5 vs spec/template_spec.rb in docify-1.0.6

- old
+ new

@@ -1,13 +1,14 @@ require 'spec_helper' -describe 'Template' do +describe 'Document::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}}").render(:b => 'b').should == '' 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