Sha256: b4b89a2e674ba1a046e332dea779359b7aca62bb2b3f31718e370d5027749df9

Contents?: true

Size: 409 Bytes

Versions: 7

Compression:

Stored size: 409 Bytes

Contents

require 'spec_helper'
module Sexpr::Grammar
  describe Tagging, "rule2modname" do
    include Tagging

    it 'work on simple rule name' do
      rule2modname(:test).should eq(:Test)
    end

    it 'works when underscores are present' do
      rule2modname(:a_rule_name).should eq(:ARuleName)
    end

    it 'works with a string' do
      rule2modname("a_rule_name").should eq(:ARuleName)
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sexpr-1.1.0 spec/unit/grammar/tagging/test_rule2modname.rb
sexpr-1.0.0 spec/unit/grammar/tagging/test_rule2modname.rb
sexpr-0.6.0 spec/unit/grammar/tagging/test_rule2modname.rb
sexpr-0.5.1 spec/grammar/tagging/test_rule2modname.rb
sexpr-0.5.0 spec/grammar/tagging/test_rule2modname.rb
sexpr-0.4.0 spec/grammar/tagging/test_rule2modname.rb
sexpr-0.3.0 spec/grammar/tagging/test_rule2modname.rb