Oracle adapter recourns count() as numeric (not string)

This commit is contained in:
Raimonds Simanovskis 2009-03-23 00:19:27 +02:00
parent 5d0dece6a6
commit 04e6bc1134

@ -50,7 +50,12 @@ def test_cache_is_flat
def test_cache_does_not_wrap_string_results_in_arrays
Task.cache do
assert_instance_of String, Task.connection.select_value("SELECT count(*) AS count_all FROM tasks")
# Oracle adapter returns count() as Fixnum or Float
if current_adapter?(:OracleAdapter)
assert Task.connection.select_value("SELECT count(*) AS count_all FROM tasks").is_a?(Numeric)
else
assert_instance_of String, Task.connection.select_value("SELECT count(*) AS count_all FROM tasks")
end
end
end
end