Class: TestIngresConnectionHash

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
ext/tests/tc_connect_hash.rb

Instance Method Summary collapse

Instance Method Details

#test_connect_hashObject



7
8
9
10
# File 'ext/tests/tc_connect_hash.rb', line 7

def test_connect_hash
  ing = Ingres.new()
  assert_kind_of(Ingres, ing.connect(:database => @@database), "conn is not an Ingres object")
end

#test_connect_hash_no_databaseObject



12
13
14
15
16
17
# File 'ext/tests/tc_connect_hash.rb', line 12

def test_connect_hash_no_database
  ing = Ingres.new()
  assert_raise ArgumentError do
      ing.connect()
  end
end

#test_connect_hash_with_login_onlyObject



24
25
26
27
28
29
# File 'ext/tests/tc_connect_hash.rb', line 24

def 
  ing = Ingres.new()
  assert_raise ArgumentError do
      ing.connect_with_credentials(:database => @@database, :username => @@username)
  end
end

#test_connect_hash_with_login_passwordObject



19
20
21
22
# File 'ext/tests/tc_connect_hash.rb', line 19

def 
  ing = Ingres.new()
  assert_kind_of(Ingres, ing.connect_with_credentials(:database => @@database, :username => @@username, :password => @@password), "conn is not an Ingres object")
end