Sha256: d370c3702aea66d2c17aadec0bade7fb92bd84e4389170770d57661a4b40f161

Contents?: true

Size: 468 Bytes

Versions: 14

Compression:

Stored size: 468 Bytes

Contents

require 'spec_helper'
module WLang
  describe Template, '.new' do

    it 'returns a Template instance' do
      Template.new("Hello ${who}!").should be_a(Template)
    end

    it 'allows specifying the dialect to use' do
      t = Template.new("Hello ${who}!", :dialect => Upcasing)
      t.dialect.should eq(Upcasing)
    end

    it 'uses WLang::Html as default dialect' do
      t = Template.new("Hello ${who}!")
      t.dialect.should eq(Html)
    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

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