Sha256: 9929cdbca6cd87cffd15a6644051c485bcda01be0ba2317209c83492fcea4323

Contents?: true

Size: 824 Bytes

Versions: 1

Compression:

Stored size: 824 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facets/core/string/to_b.rb
#
# Extracted Fri Feb 16 02:00:36 EST 2007
# Project.rb Test Extraction
#

require 'facets/core/string/to_b.rb'


  require 'test/unit'

  class TCString < Test::Unit::TestCase

    def test_to_b
      assert( 'true'.to_b )
      assert( 'True'.to_b )
      assert( 'yes'.to_b )
      assert( 'YES'.to_b )
      assert( 'on'.to_b )
      assert( 'ON'.to_b )
      assert( 't'.to_b )
      assert( '1'.to_b )
      assert( 'y'.to_b )
      assert( 'Y'.to_b )
      assert( '=='.to_b )
      assert( ! 'nil'.to_b )
      assert( ! 'false'.to_b )
      assert( ! 'blahblahtrueblah'.to_b )
      assert_equal( nil, 'nil'.to_b )
      assert_equal( nil, 'null'.to_b )
    end

  end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-1.8.49 test/lib/facets/core/string/test_to_b.rb