diff options
-rw-r--r-- | lib/arel/algebra/relations/operations/group.rb | 7 | ||||
-rw-r--r-- | spec/algebra/unit/relations/relation_spec.rb | 5 |
2 files changed, 4 insertions, 8 deletions
diff --git a/lib/arel/algebra/relations/operations/group.rb b/lib/arel/algebra/relations/operations/group.rb index f3666cacf8..16a2963c93 100644 --- a/lib/arel/algebra/relations/operations/group.rb +++ b/lib/arel/algebra/relations/operations/group.rb @@ -7,13 +7,6 @@ module Arel @groupings = groupings.collect { |g| g.bind(relation) } end - def == other - super || - self.class === other && - @relation == other.relation && - @groupings == other.groupings - end - def eval raise NotImplementedError end diff --git a/spec/algebra/unit/relations/relation_spec.rb b/spec/algebra/unit/relations/relation_spec.rb index 1a15471f9a..4a7d9be0dc 100644 --- a/spec/algebra/unit/relations/relation_spec.rb +++ b/spec/algebra/unit/relations/relation_spec.rb @@ -160,7 +160,10 @@ module Arel describe '#group' do it 'manufactures a group relation' do - @relation.group(@attribute1, @attribute2).should == Group.new(@relation, [@attribute1, @attribute2]) + group = @relation.group(@attribute1, @attribute2) + group.relation.should == @relation + group.groupings.should == [@attribute1, @attribute2] + group.should be_kind_of Group end describe 'when given blank groupings' do |