mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
1de1041c00
Eventually #engine should go away, but until that time, this means that Table and Nodes::TableAlias can be used more interchangeably.
16 lines
349 B
Ruby
16 lines
349 B
Ruby
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
|