Sha256: 3a82ce19265ade79e93018875c52e18636ee011ade9bb05b35e3b23ec4e30cf7

Contents?: true

Size: 767 Bytes

Versions: 1

Compression:

Stored size: 767 Bytes

Contents

require 'spec_helper'
module WLang
  describe Dialect::Tags do

    describe 'tag' do
      include Dialect::Tags::ClassMethods

      def define_tag_method(*args)
        args
      end

      it "works with a symbol" do
        tag("$", :dollar).should eq(["$", nil, :dollar])
      end

      it "works with a single proc" do
        proc = lambda{|buf,fn| }
        tag("$", &proc).should eq(["$", nil, proc])
      end

      it "allows specifying dialects with a symbol" do
        tag("$", [Foo], :dollar).should eq(["$", [Foo], :dollar])
      end

      it "allows specifying dialects with a proc" do
        proc = lambda{|buf,fn| }
        tag("$", [Foo], &proc).should eq(["$", [Foo], proc])
      end
    end

  end # describe Dialect
end # module WLang

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wlang-2.0.0.beta spec/unit/dialect/test_tags.rb