diff options
Diffstat (limited to 'test/nodes/test_table_alias.rb')
-rw-r--r-- | test/nodes/test_table_alias.rb | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/test/nodes/test_table_alias.rb b/test/nodes/test_table_alias.rb index 4aafd12b79..57c9a42fc6 100644 --- a/test/nodes/test_table_alias.rb +++ b/test/nodes/test_table_alias.rb @@ -4,28 +4,20 @@ require 'ostruct' module Arel module Nodes describe 'table alias' do - it 'has an #engine which delegates to the relation' do - engine = 'vroom' - relation = Table.new(:users, engine) - - node = TableAlias.new relation, :foo - node.engine.must_equal engine - end - describe 'equality' do it 'is equal with equal ivars' do - relation1 = Table.new(:users, 'vroom') + relation1 = Table.new(:users) node1 = TableAlias.new relation1, :foo - relation2 = Table.new(:users, 'vroom') + relation2 = Table.new(:users) node2 = TableAlias.new relation2, :foo array = [node1, node2] assert_equal 1, array.uniq.size end it 'is not equal with different ivars' do - relation1 = Table.new(:users, 'vroom') + relation1 = Table.new(:users) node1 = TableAlias.new relation1, :foo - relation2 = Table.new(:users, 'vroom') + relation2 = Table.new(:users) node2 = TableAlias.new relation2, :bar array = [node1, node2] assert_equal 2, array.uniq.size |