Sha256: a9ec79808b81c48adcc5419786f9f94811e5dd5429dfb281831a5aa7a0b8b538

Contents?: true

Size: 572 Bytes

Versions: 28

Compression:

Stored size: 572 Bytes

Contents

require "#{File.dirname(__FILE__)}/../../test_helper"

class SymbolTest < Test::Unit::TestCase
  context "Symbol" do
    should "be able to compare to strings" do
      assert_equal [:a, :c, :b].sort, [:a, :b, :c]
      assert_nothing_raised do
        :a <=> :b
      end
    end
    
    should "have path separaters" do
      assert_equal :a / :b, "a/b"
    end
    
    should "be able to be sanitized" do
      assert_equal "abcd", "a.b-c d".to_sym.sanitize
    end
    
    should "classify the symbol" do
      assert_equal :C, :c.classify
    end
    
  end
  
end

Version data entries

28 entries across 28 versions & 3 rubygems

Version Path
auser-poolparty-1.3.0 test/lib/core/symbol_test.rb
auser-poolparty-1.3.1 test/lib/core/symbol_test.rb
auser-poolparty-1.3.10 test/lib/core/symbol_test.rb
auser-poolparty-1.3.11 test/lib/core/symbol_test.rb
auser-poolparty-1.3.12 test/lib/core/symbol_test.rb
auser-poolparty-1.3.13 test/lib/core/symbol_test.rb
auser-poolparty-1.3.14 test/lib/core/symbol_test.rb
auser-poolparty-1.3.15 test/lib/core/symbol_test.rb
auser-poolparty-1.3.16 test/lib/core/symbol_test.rb
auser-poolparty-1.3.17 test/lib/core/symbol_test.rb
auser-poolparty-1.3.2 test/lib/core/symbol_test.rb
auser-poolparty-1.3.3 test/lib/core/symbol_test.rb
auser-poolparty-1.3.4 test/lib/core/symbol_test.rb
auser-poolparty-1.3.5 test/lib/core/symbol_test.rb
auser-poolparty-1.3.6 test/lib/core/symbol_test.rb
auser-poolparty-1.3.7 test/lib/core/symbol_test.rb
auser-poolparty-1.3.8 test/lib/core/symbol_test.rb
fairchild-poolparty-1.3.17 test/lib/core/symbol_test.rb
fairchild-poolparty-1.3.5 test/lib/core/symbol_test.rb
poolparty-1.3.15 test/lib/core/symbol_test.rb