Sha256: f3b8c8629bd24c9f0d811d1ba8eab5887e934f075ec1a45cb53a216243d3673c
Contents?: true
Size: 575 Bytes
Versions: 14
Compression:
Stored size: 575 Bytes
Contents
require 'spec_helper' require 'wlang/html' module WLang describe Html, '#{...}' do def render(tpl, scope = {}) Html.render(tpl, scope, "") end it 'updates the current scope' do scope = {:who => "World"} render('Hello #{scope}{${who}}', binding).should eq("Hello World") end it 'does not follows empty arrays' do scope = [] render('Hello #{scope}{${who}}', binding).should eq("Hello ") end it 'allows undefined variables' do render('Hello #{scope}{${who}}', binding).should eq("Hello ") end end end
Version data entries
14 entries across 14 versions & 1 rubygems