Sha256: 8ec8ec6aa5c3c60e430667b076ba8dfc1295c0f3e96cbf83cd735f418ea1a9de

Contents?: true

Size: 464 Bytes

Versions: 13

Compression:

Stored size: 464 Bytes

Contents

require 'spec_helper'
require 'kl/primitives/symbols'

describe Kl::Primitives::Symbols do
  include Kl::Primitives::Symbols

  describe "intern" do
    it "returns boolean true for 'true'" do
      intern("true").should == true
    end

    it "returns boolean false for 'false'" do
      intern("false").should == false
    end

    it "returns the symbol corresponding to the string otherwise" do
      intern("abc-123").should == :"abc-123"
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
shen-ruby-0.10.0 spec/kl/primitives/symbols_spec.rb
shen-ruby-0.9.0 spec/kl/primitives/symbols_spec.rb
shen-ruby-0.8.1 spec/kl/primitives/symbols_spec.rb
shen-ruby-0.8.0 spec/kl/primitives/symbols_spec.rb
shen-ruby-0.7.0 spec/kl/primitives/symbols_spec.rb
shen-ruby-0.6.0 spec/kl/primitives/symbols_spec.rb
shen-ruby-0.5.0 spec/kl/primitives/symbols_spec.rb
shen-ruby-0.4.1 spec/kl/primitives/symbols_spec.rb
shen-ruby-0.4.0 spec/kl/primitives/symbols_spec.rb
shen-ruby-0.3.1 spec/kl/primitives/symbols_spec.rb
shen-ruby-0.3.0 spec/kl/primitives/symbols_spec.rb
shen-ruby-0.2.0 spec/kl/primitives/symbols_spec.rb
shen-ruby-0.1.0 spec/kl/primitives/symbols_spec.rb