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

Version Path
wlang-3.0.1 spec/integration/html/test_sharp.rb
wlang-3.0.0 spec/integration/html/test_sharp.rb
wlang-2.3.1 spec/integration/html/test_sharp.rb
wlang-2.3.0 spec/integration/html/test_sharp.rb
wlang-2.2.4 spec/integration/html/test_sharp.rb
wlang-2.2.3 spec/integration/html/test_sharp.rb
wlang-2.2.2 spec/integration/html/test_sharp.rb
wlang-2.2.1 spec/integration/html/test_sharp.rb
wlang-2.2.0 spec/integration/html/test_sharp.rb
wlang-2.1.2 spec/integration/html/test_sharp.rb
wlang-2.1.1 spec/integration/html/test_sharp.rb
wlang-2.1.0 spec/integration/html/test_sharp.rb
wlang-2.0.1 spec/integration/html/test_sharp.rb
wlang-2.0.0 spec/integration/html/test_sharp.rb