Permalink
Browse files

Oracle adapter returns numeric (not string) value after SUM

  • Loading branch information...
1 parent d40e3ea commit a12358b3a5e69f41079595d5c92677b66ae6e642 @rsim rsim committed Mar 22, 2009
Showing with 6 additions and 1 deletion.
  1. +6 −1 activerecord/test/cases/calculations_test.rb
@@ -298,7 +298,12 @@ def test_count_with_too_many_parameters_raises
end
def test_should_sum_expression
- assert_equal '636', Account.sum("2 * credit_limit")
+ # Oracle adapter returns floating point value 636.0 after SUM
+ if current_adapter?(:OracleAdapter)
+ assert_equal 636, Account.sum("2 * credit_limit")
+ else
+ assert_equal '636', Account.sum("2 * credit_limit")
+ end
end
def test_count_with_from_option

0 comments on commit a12358b

Please sign in to comment.