require 'spec_helper'
require 'wlang/html'
module WLang
describe Html, "!{...}" do
def render(tpl, scope = {})
Html.render(tpl, scope, "")
end
it 'invokes to_s' do
s = Struct.new(:to_s).new("World")
render("!{hello}", {:hello => s}).should eq("World")
end
it 'works with Numbers' do
render("!{hello}", {:hello => 12}).should eq("12")
end
it 'does not escape html' do
render("!{hello}", {:hello => "