Sha256: 31b0c7a5441c34cc974af345d7efe86477903dc032dcfa8662a4b75207ffbc65
Contents?: true
Size: 900 Bytes
Versions: 13
Compression:
Stored size: 900 Bytes
Contents
require File.expand_path('../../../spec_helper', __FILE__) module Noe describe "Template::Entry#infer_wlang_dialect" do subject{ Template::Entry.infer_wlang_dialect(uri, default) } let(:default){ nil } context "when invoked on explicit wlang dialects extensions" do let(:uri){ "test.wtpl" } it{ should == "wlang/xhtml" } end context "when invoked on implicit wlang dialects extensions" do let(:uri){ "test.rb" } it{ should == "wlang/ruby" } end context "when invoked on something else and a default value" do let(:uri){ "test.notanextension" } let(:default){ "hello" } it{ should == "hello" } end context "when invoked on something else and no default value" do let(:uri){ "test.notanextension" } let(:default){ nil } it{ should == "wlang/active-text" } end end end
Version data entries
13 entries across 11 versions & 1 rubygems