Sha256: f8a1a4c6e38eec90d71b84ed72afd2217555fe8371117d52beb39da396c2274d
Contents?: true
Size: 649 Bytes
Versions: 9
Compression:
Stored size: 649 Bytes
Contents
require 'helper' begin require 'ripper' rescue LoadError end if defined?(Ripper) && RUBY_VERSION >= "2.0.0" describe Temple::Filters::StringSplitter do before do @filter = Temple::Filters::StringSplitter.new end it 'should split :dynamic with string literal' do @filter.call([:dynamic, '"static#{dynamic}"'] ).should.equal [:multi, [:static, 'static'], [:dynamic, 'dynamic']] end describe '.compile' do it 'should raise CompileError for non-string literals' do lambda { Temple::Filters::StringSplitter.compile('1') }. should.raise(Temple::FilterError) end end end end
Version data entries
9 entries across 9 versions & 4 rubygems