Sha256: c383a9ec31957f6d79390842a40ba2da3cd51104cae05e6e3bc5c586217fe88d

Contents?: true

Size: 681 Bytes

Versions: 12

Compression:

Stored size: 681 Bytes

Contents

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

    subject{ template.path }

    context 'when a string and no option' do
      let(:template){ Template.new("Hello ${who}!") }
      it{ should be_nil }
    end

    context 'when a Path and no option' do
      let(:template){ Template.new(Path.here) }
      it{ should eq(__FILE__) }
    end

    context 'when a string and an option' do
      let(:template){ Template.new("Hello ${who}!", :path => __FILE__) }
      it{ should eq(__FILE__) }
    end

    context 'when a path an an option' do
      let(:template){ Template.new(Path.here, :path => __FILE__) }
      it{ should eq(__FILE__) }
    end

  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

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