aboutsummaryrefslogtreecommitdiffstats
path: root/spec/engines/memory
diff options
context:
space:
mode:
authorErnie Miller <ernie@metautonomo.us>2010-05-21 11:45:12 -0400
committerErnie Miller <ernie@metautonomo.us>2010-05-21 11:45:12 -0400
commit43bfd3fae496a2a859aad0a654a91437357c3450 (patch)
treebd95f3b7add4ba7841a6fa9dd717de9c60ea90a8 /spec/engines/memory
parentd144b8d5af11c819b8f70a97006998bf89ee926c (diff)
downloadrails-43bfd3fae496a2a859aad0a654a91437357c3450.tar.gz
rails-43bfd3fae496a2a859aad0a654a91437357c3450.tar.bz2
rails-43bfd3fae496a2a859aad0a654a91437357c3450.zip
Fix tests to work properly on Ruby 1.9, honor multiple calls to #order in memory engine, and make having clauses behave like where clauses in SQL engine (join with AND, allow multiple calls to having to add predicates)
Diffstat (limited to 'spec/engines/memory')
-rw-r--r--spec/engines/memory/integration/joins/cross_engine_spec.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/engines/memory/integration/joins/cross_engine_spec.rb b/spec/engines/memory/integration/joins/cross_engine_spec.rb
index 606f3154c7..5dc1a6cb99 100644
--- a/spec/engines/memory/integration/joins/cross_engine_spec.rb
+++ b/spec/engines/memory/integration/joins/cross_engine_spec.rb
@@ -13,10 +13,9 @@ module Arel
@photos.insert(@photos[:id] => 1, @photos[:user_id] => 1, @photos[:camera_id] => 6)
@photos.insert(@photos[:id] => 2, @photos[:user_id] => 2, @photos[:camera_id] => 42)
# Oracle adapter returns database integers as Ruby integers and not strings
- @adapter_returns_integer = false
- adapter_is :oracle do
- @adapter_returns_integer = true
- end
+ # So does the FFI sqlite library
+ db_int_return = @photos.project(@photos[:camera_id]).first.tuple.first
+ @adapter_returns_integer = db_int_return.is_a?(String) ? false : true
end
describe 'when the in memory relation is on the left' do