Sha256: 5636415a32350a12ee990c6910bde2f69f7e0ae539b5857801cad85cab299612
Contents?: true
Size: 794 Bytes
Versions: 1
Compression:
Stored size: 794 Bytes
Contents
describe Musterb::Musterbifier do it "does not change vanilla strings" do Musterb::Musterbifier.new("Hello, world!").to_erb.should eq "Hello, world!" end it "replaces mustaches correctly" do Musterb::Musterbifier.new("Hello, {{world}}!").to_erb.should eq "Hello, <%== musterb['world'] %>!" end it "replaces triple staches correctly" do Musterb::Musterbifier.new("Hello, {{{world}}}!").to_erb.should eq "Hello, <%= musterb['world'] %>!" end it "replaces blocks correctly" do Musterb::Musterbifier.new("{{#cond}}foo{{/cond}}").to_erb.should eq "<% musterb.block 'cond' do %>foo<% end %>" end it "replaces carrot correctly" do Musterb::Musterbifier.new("{{^cond}}foo{{/cond}}").to_erb.should eq "<% musterb.block_unless 'cond' do %>foo<% end %>" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
musterb-0.0.1 | spec/musterb/musterbifier_spec.rb |