Sha256: 9abe1bae8d763bb6fa86193b12371728b015a14aaf3b3ba4f206f7fabdb9ab24
Contents?: true
Size: 606 Bytes
Versions: 1
Compression:
Stored size: 606 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 << "\\nworld\\n\\n" thing _out << "\\na\\n\\n" _out TEST end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
antelope-0.1.10 | spec/antelope/template_spec.rb |