require 'spec/helper' describe "Nagoro::Pipe::Morph" do def compile(obj) Nagoro::Template[Nagoro::Pipe::Morph].compile(obj).compiled end it 'should morph single tag' do compile('bar'). should == 'bar' end it 'should morph multiple tags' do compile('
x
'). should == 'x
' end it 'should morph unless' do compile('x
'). should == 'x
' end it 'should morph foreach' do compile('#{i}
'). should == '#{i}
' end it 'should morph each' do compile('#{_e}
'). should == '#{_e}
' end it 'should morph times' do compile('#{_t}
'). should == '#{_t}
' end it 'should morph filter' do compile('x
'). should == 'x>) ?>' end end