aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/abstract_unit.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-03-18 03:02:32 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-03-18 03:02:32 +0000
commitea617708c2ad9a770a1f3950e7a0028e9764d989 (patch)
treed8f83feaed81362dc01d3e9563be388bf962c1c8 /activerecord/test/abstract_unit.rb
parent1340eb1a7ea19a9356cc041d084abb8d553ee529 (diff)
downloadrails-ea617708c2ad9a770a1f3950e7a0028e9764d989.tar.gz
rails-ea617708c2ad9a770a1f3950e7a0028e9764d989.tar.bz2
rails-ea617708c2ad9a770a1f3950e7a0028e9764d989.zip
Added migrations support to the Sybase adapter (closes #4293) [John R. Sheets]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3905 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/abstract_unit.rb')
-rwxr-xr-xactiverecord/test/abstract_unit.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/test/abstract_unit.rb b/activerecord/test/abstract_unit.rb
index 6c089f3696..29e4601fee 100755
--- a/activerecord/test/abstract_unit.rb
+++ b/activerecord/test/abstract_unit.rb
@@ -22,9 +22,10 @@ class Test::Unit::TestCase #:nodoc:
def assert_date_from_db(expected, actual, message = nil)
# SQL Server doesn't have a separate column type just for dates,
# so the time is in the string and incorrectly formatted
-
- if current_adapter?(:SQLServerAdapter) || current_adapter?(:SybaseAdapter)
+ if current_adapter?(:SQLServerAdapter)
assert_equal expected.strftime("%Y/%m/%d 00:00:00"), actual.strftime("%Y/%m/%d 00:00:00")
+ elsif current_adapter?(:SybaseAdapter)
+ assert_equal expected.to_s, actual.to_date.to_s, message
else
assert_equal expected.to_s, actual.to_s, message
end