Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

root/branches/2-1-caching/activerecord/test/default_test_firebird.rb

Revision 3052, 0.5 kB (checked in by bitsweat, 3 years ago)

r3116@asus: jeremy | 2005-11-16 00:17:06 -0800
Introducing the Firebird adapter. Closes #1874.

Line 
1 require 'abstract_unit'
2 require 'fixtures/default'
3
4 class DefaultTest < Test::Unit::TestCase
5   def test_default_timestamp
6     default = Default.new
7     assert_instance_of(Time, default.default_timestamp)
8     assert_equal(:datetime, default.column_for_attribute(:default_timestamp).type)
9
10     # Variance should be small; increase if required -- e.g., if test db is on
11     # remote host and clocks aren't synchronized.
12     t1 = Time.new
13     accepted_variance = 1.0
14     assert_in_delta(t1.to_f, default.default_timestamp.to_f, accepted_variance)
15   end
16 end
Note: See TracBrowser for help on using the browser.