Sha256: 1e73bc3c585cd0c19db012ceda1dd13d71b9d4a4864762374b339696131d57ac

Contents?: true

Size: 628 Bytes

Versions: 8

Compression:

Stored size: 628 Bytes

Contents

require 'test/unit'
class CoreExtensionsTest < Test::Unit::TestCase
	def test_hash
    value = "I've changed my plea to guilty because freedom is wasted on me. -- Morrissey"
    
    x = Hash.new
    
    x[:kewlz0rz] = value
    assert_equal x[:kewlz0rz], value
    assert_equal x.kewlz0rz, value

    x.sweetness = value
    assert_equal x.sweetness, value

    x['awesome'] = value
    assert_equal x['awesome'], value
    assert_equal x.awesome, value
    
	end
	
	def test_regexp_hack
	  assert_false(/123/ === 123)
      # TODO: Also test that running this in the dialplan DSL
      # produces different results.
	end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
adhearsion-0.7.0 test/core_extensions_test.rb
adhearsion-0.7.2 test/core_extensions_test.rb
adhearsion-0.7.4 test/core_extensions_test.rb
adhearsion-0.7.5 test/core_extensions_test.rb
adhearsion-0.7.6 test/core_extensions_test.rb
adhearsion-0.7.1 test/core_extensions_test.rb
adhearsion-0.7.3 test/core_extensions_test.rb
adhearsion-0.7.7 test/core_extensions_test.rb