Sha256: 0f30d78729c9612c580483e5b36147cb5b2eff99ad6a2020a3614e8a02f3cd6b
Contents?: true
Size: 834 Bytes
Versions: 2
Compression:
Stored size: 834 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe Tongo::Generator do it { Tongo::Generator.new.send(:tokenize_text, '%{whisper}, %{shout}').should == ['', '%{whisper}', ', ', '%{shout}']} it { Tongo::Generator.new.send(:tokenize_text, 'normal text %{interpolation} more text').should == ['normal text ', '%{interpolation}', ' more text']} it { Tongo::Generator.new.send(:expand_interpolation, 'method | filter | more_filter').should == "\#{more_filter(filter(method()))}" } it { Tongo::Generator.new.send(:compile!, [:text, 'testing, %{method | filter | more_filter} stuff']).should == 'testing, #{more_filter(filter(method()))} stuff' } it { Tongo::Generator.new.send(:compile!, [:nested, 'loop', {'some' => 'attr'}, [:text, 'content']]).should == '#{loop({"some"=>"attr"}, "content")}' } end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tongo-0.0.2 | spec/unit/tongo_generator_spec.rb |
tongo-0.0.1 | spec/unit/tongo_generator_spec.rb |