diff options
Diffstat (limited to 'spec/arel/unit/relations')
-rw-r--r-- | spec/arel/unit/relations/join_spec.rb | 17 | ||||
-rw-r--r-- | spec/arel/unit/relations/projection_spec.rb | 15 |
2 files changed, 1 insertions, 31 deletions
diff --git a/spec/arel/unit/relations/join_spec.rb b/spec/arel/unit/relations/join_spec.rb index d128dd0560..1698bf9647 100644 --- a/spec/arel/unit/relations/join_spec.rb +++ b/spec/arel/unit/relations/join_spec.rb @@ -7,23 +7,6 @@ module Arel @relation2 = Table.new(:photos) @predicate = @relation1[:id].eq(@relation2[:user_id]) end - - describe '==' do - before do - @another_predicate = @relation1[:id].eq(1) - @another_relation = Table.new(:cameras) - end - - it 'obtains if the two relations and the predicate are identical' do - Join.new("INNER JOIN", @relation1, @relation2, @predicate).should == Join.new("INNER JOIN", @relation1, @relation2, @predicate) - Join.new("INNER JOIN", @relation1, @relation2, @predicate).should_not == Join.new("INNER JOIN", @relation1, @another_relation, @predicate) - Join.new("INNER JOIN", @relation1, @relation2, @predicate).should_not == Join.new("INNER JOIN", @relation1, @relation2, @another_predicate) - end - - it 'is commutative on the relations' do - Join.new("INNER JOIN", @relation1, @relation2, @predicate).should == Join.new("INNER JOIN", @relation2, @relation1, @predicate) - end - end describe 'hashing' do it 'implements hash equality' do diff --git a/spec/arel/unit/relations/projection_spec.rb b/spec/arel/unit/relations/projection_spec.rb index cede58354b..3c6a092db5 100644 --- a/spec/arel/unit/relations/projection_spec.rb +++ b/spec/arel/unit/relations/projection_spec.rb @@ -13,20 +13,7 @@ module Arel end it "manufactures attributes associated with the projection relation" do - # @projection.attributes.should == [@attribute].collect { |a| a.bind(@projection) } - end - end - - describe '==' do - before do - @another_relation = Table.new(:photos) - @another_attribute = @relation[:name] - end - - it "obtains if the relations and attributes are identical" do - Projection.new(@relation, @attribute).should == Projection.new(@relation, @attribute) - Projection.new(@relation, @attribute).should_not == Projection.new(@another_relation, @attribute) - Projection.new(@relation, @attribute).should_not == Projection.new(@relation, @another_attribute) + @projection.attributes.should == [@attribute].collect { |a| a.bind(@projection) } end end |