Sha256: aecf9d613a52c6a39cf549d8119fb58dbf70e295365e61705feadf8de9b97708

Contents?: true

Size: 591 Bytes

Versions: 56

Compression:

Stored size: 591 Bytes

Contents

require 'test_helper'

class SymbolTest < Test::Unit::TestCase
  context "Symbol" do
    context "comparison" do
      should "work as expected" do
        assert_equal false, :abc == :def
        assert_equal true, :abc == :abc
        assert_equal false, :abc == "abc"
        assert_equal false, :abc > :def
        assert_equal true, :abc < :def
        assert_raise(ArgumentError) {:abc < "def"}
      end
    end

    context "string ops" do
      should "work as expected" do
        assert_equal :HELLO, :hello.upcase
        assert_equal 5, :hello.length
      end
    end
  end
end

Version data entries

56 entries across 56 versions & 2 rubygems

Version Path
marcandre-backports-1.6.8 test/symbol_test.rb
marcandre-backports-1.7.0 test/symbol_test.rb
marcandre-backports-1.7.1 test/symbol_test.rb
marcandre-backports-1.8.0 test/symbol_test.rb
marcandre-backports-1.8.1 test/symbol_test.rb
marcandre-backports-1.8.2 test/symbol_test.rb
marcandre-backports-1.8.3 test/symbol_test.rb
marcandre-backports-1.8.4 test/symbol_test.rb
marcandre-backports-1.9.0 test/symbol_test.rb
backports-2.3.0 test/symbol_test.rb
backports-2.2.1 test/symbol_test.rb
backports-2.2.0 test/symbol_test.rb
backports-2.1.0 test/symbol_test.rb
backports-2.0.3 test/symbol_test.rb
backports-2.0.2 test/symbol_test.rb
backports-2.0.1 test/symbol_test.rb
backports-2.0.0 test/symbol_test.rb
backports-1.18.2 test/symbol_test.rb
backports-1.18.1 test/symbol_test.rb
backports-1.18.0 test/symbol_test.rb