Sha256: 106510b82e63f0d3d80d20f2c1194faea00ef5fd3e0f58da3e47f2c6f8da65ef
Contents?: true
Size: 704 Bytes
Versions: 108
Compression:
Stored size: 704 Bytes
Contents
require 'helper' describe Temple::Filters::MultiFlattener do before do @filter = Temple::Filters::MultiFlattener.new end it 'should flatten nested multi expressions' do @filter.call([:multi, [:static, "a"], [:multi, [:dynamic, "aa"], [:multi, [:static, "aaa"], [:static, "aab"], ], [:dynamic, "ab"], ], [:static, "b"], ]).should.equal [:multi, [:static, "a"], [:dynamic, "aa"], [:static, "aaa"], [:static, "aab"], [:dynamic, "ab"], [:static, "b"], ] end it 'should return first element' do @filter.call([:multi, [:code, 'foo']]).should.equal [:code, 'foo'] end end
Version data entries
108 entries across 108 versions & 7 rubygems