~michaelforrest/use-case-mapper/trunk

« back to all changes in this revision

Viewing changes to vendor/rails/activerecord/test/cases/default_test_firebird.rb

  • Committer: Richard Lee (Canonical)
  • Date: 2010-10-15 15:17:58 UTC
  • mfrom: (190.1.3 use-case-mapper)
  • Revision ID: richard.lee@canonical.com-20101015151758-wcvmfxrexsongf9d
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
require "cases/helper"
2
 
require 'models/default'
3
 
 
4
 
class DefaultTest < ActiveRecord::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