From 43bfd3fae496a2a859aad0a654a91437357c3450 Mon Sep 17 00:00:00 2001 From: Ernie Miller Date: Fri, 21 May 2010 11:45:12 -0400 Subject: 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) --- spec/engines/memory/integration/joins/cross_engine_spec.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'spec/engines/memory/integration') 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 -- cgit v1.2.3