Class: TestIngresTypeDateFetch
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- TestIngresTypeDateFetch
- Defined in:
- ext/tests/tc_type_date_fetch.rb
Instance Method Summary collapse
Instance Method Details
#setup ⇒ Object
6 7 8 9 |
# File 'ext/tests/tc_type_date_fetch.rb', line 6 def setup @@ing = Ingres.new() assert_kind_of(Ingres, @@ing.connect(@@database), "conn is not an Ingres object") end |
#teardown ⇒ Object
11 12 13 |
# File 'ext/tests/tc_type_date_fetch.rb', line 11 def teardown @@ing.disconnect end |
#test_ingresdate_fetch ⇒ Object
15 16 17 18 19 20 |
# File 'ext/tests/tc_type_date_fetch.rb', line 15 def test_ingresdate_fetch sql = "select rt_depart_at, rt_arrive_at from route where rt_depart_from = 'VLL' and rt_arrive_to='MAD' and rt_id=1305" data = @@ing.execute(sql).flatten assert_equal "11-oct-2006 19:00:00", data[0] assert_equal "12-oct-2006 05:27:00", data[1] end |