From 1de1041c00abff9cfc57837a80e12157901ff194 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Fri, 13 Jul 2012 11:19:17 +0100 Subject: Add Nodes::TableAlias#engine Eventually #engine should go away, but until that time, this means that Table and Nodes::TableAlias can be used more interchangeably. --- test/nodes/test_table_alias.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/nodes/test_table_alias.rb (limited to 'test/nodes') diff --git a/test/nodes/test_table_alias.rb b/test/nodes/test_table_alias.rb new file mode 100644 index 0000000000..fef24bb19e --- /dev/null +++ b/test/nodes/test_table_alias.rb @@ -0,0 +1,16 @@ +require 'helper' +require 'ostruct' + +module Arel + module Nodes + describe 'table alias' do + it 'has an #engine which delegates to the relation' do + engine = Object.new + relation = OpenStruct.new(:engine => engine) + + node = TableAlias.new relation, :foo + node.engine.must_equal engine + end + end + end +end -- cgit v1.2.3