From a46922e4a1089c9880c30b389e1e1d9dfbab02ae Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Fri, 2 Apr 2010 19:04:23 -0700 Subject: Create an Arel::Header class representing a relation's attributes --- spec/algebra/unit/relations/join_spec.rb | 3 +-- spec/algebra/unit/relations/table_spec.rb | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'spec/algebra') diff --git a/spec/algebra/unit/relations/join_spec.rb b/spec/algebra/unit/relations/join_spec.rb index 9c1422c571..5fa3269052 100644 --- a/spec/algebra/unit/relations/join_spec.rb +++ b/spec/algebra/unit/relations/join_spec.rb @@ -18,8 +18,7 @@ module Arel describe '#attributes' do it 'combines the attributes of the two relations' do join = InnerJoin.new(@relation1, @relation2, @predicate) - join.attributes.should == - (@relation1.attributes + @relation2.attributes).collect { |a| a.bind(join) } + join.attributes.should == (@relation1.attributes | @relation2.attributes).bind(join) end end end diff --git a/spec/algebra/unit/relations/table_spec.rb b/spec/algebra/unit/relations/table_spec.rb index d93446f1b9..d1c7cc46ba 100644 --- a/spec/algebra/unit/relations/table_spec.rb +++ b/spec/algebra/unit/relations/table_spec.rb @@ -9,7 +9,7 @@ module Arel describe '[]' do describe 'when given a', Symbol do it "manufactures an attribute if the symbol names an attribute within the relation" do - check @relation[:id].should == Attribute.new(@relation, :id) + check @relation[:id].should == Attributes::Integer.new(@relation, :id) end end -- cgit v1.2.3