Sha256: 663e570dc62637492fa3f80d52a64ea3b2e0c459b8ce6b6e75e4a6e0b1949adb
Contents?: true
Size: 823 Bytes
Versions: 12
Compression:
Stored size: 823 Bytes
Contents
require File.expand_path('../../helper', __FILE__) require 'innate/view/etanni' describe Etanni = Innate::Etanni do it 'renders a simple template' do etanni = Etanni.new('Hello, World!') etanni.result(self).should == 'Hello, World!' end it 'allows use of Etanni::SEPARATOR inside interplated code' do etanni = Etanni.new('Hello #{@name}') @name = "\n#{Etanni::SEPARATOR}\n" etanni.result(self).should == "Hello #{@name}" end it 'fails with SyntaxError or NameError when the SEPARATOR is used inside a template' do lambda{ etanni = Etanni.new("Hello \n#{Etanni::SEPARATOR}\n") etanni.result(self) }.should.raise NameError lambda{ etanni = Etanni.new("<h1>Hello \n#{Etanni::SEPARATOR}\n</h1>") etanni.result(self) }.should.raise SyntaxError end end
Version data entries
12 entries across 12 versions & 1 rubygems