Sha256: 2833754e10f51bd0018cb7e56a4ce3be9986f10eca90d9c581f723fc0d9fe941

Contents?: true

Size: 388 Bytes

Versions: 14

Compression:

Stored size: 388 Bytes

Contents

require 'spec_helper'
module WLang
  describe Template, 'call' do

    let(:template){ Template.new("Hello ${who}!") }

    it 'renders the template to a string by default' do
      template.render(:who => "world").should eq("Hello world!")
    end

    it 'allows specifying a buffer' do
      template.render({:who => "world"}, "Hey, ").should eq("Hey, Hello world!")
    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
wlang-3.0.1 spec/unit/template/test_call.rb
wlang-3.0.0 spec/unit/template/test_call.rb
wlang-2.3.1 spec/unit/template/test_call.rb
wlang-2.3.0 spec/unit/template/test_call.rb
wlang-2.2.4 spec/unit/template/test_call.rb
wlang-2.2.3 spec/unit/template/test_call.rb
wlang-2.2.2 spec/unit/template/test_call.rb
wlang-2.2.1 spec/unit/template/test_call.rb
wlang-2.2.0 spec/unit/template/test_call.rb
wlang-2.1.2 spec/unit/template/test_call.rb
wlang-2.1.1 spec/unit/template/test_call.rb
wlang-2.1.0 spec/unit/template/test_call.rb
wlang-2.0.1 spec/unit/template/test_call.rb
wlang-2.0.0 spec/unit/template/test_call.rb