Sha256: 7e862bdcad130333832f9116d9a60779909b883a55807999ce2d64e253795937
Contents?: true
Size: 600 Bytes
Versions: 1
Compression:
Stored size: 600 Bytes
Contents
describe Template do let(:content) { "hello {{ world }} test" } subject { Template.new(content) } it "generates ruby code" do expect(subject.parse).to eq %Q(_out ||= ""\n_out << "hello "\nworld\n_out << " test"\n_out\n) end context "when the tag is on its own line" do let :content do <<-TEST hello {{= something }} world {{ thing }} a TEST end it "removes surrounding whitespace" do expect(subject.parse).to eq <<-TEST _out ||= "" _out << "hello\\n" _out << begin something end.to_s _out << "world\\n\\n" thing _out << "a\\n\\n" _out TEST end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
antelope-0.1.9 | spec/antelope/template_spec.rb |