From 34bd53ba015b8f9bca77172784e62994487eef9b Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Thu, 11 Aug 2011 08:51:13 +0100 Subject: Add SelectManager#source method to get the source of the ctx --- test/test_select_manager.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/test_select_manager.rb b/test/test_select_manager.rb index ada0f1423d..6603102a3a 100644 --- a/test/test_select_manager.rb +++ b/test/test_select_manager.rb @@ -956,5 +956,13 @@ module Arel manager.to_sql.must_be_like 'SELECT "users"."id" FROM "users"' end end + + describe 'source' do + it 'returns the join source of the select core' do + table = Table.new :users + manager = Arel::SelectManager.new Table.engine + manager.source.must_equal manager.ast.cores.last.source + end + end end end -- cgit v1.2.3