From ee6443f21709c8fb2927316bc90f9e2db8a17566 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 30 Jul 2010 10:13:55 -0700 Subject: better tests for Taken constructor, removing Take#== --- lib/arel/algebra/relations/operations/take.rb | 7 ------- spec/algebra/unit/relations/relation_spec.rb | 4 +++- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/arel/algebra/relations/operations/take.rb b/lib/arel/algebra/relations/operations/take.rb index 7098d578d5..421051124c 100644 --- a/lib/arel/algebra/relations/operations/take.rb +++ b/lib/arel/algebra/relations/operations/take.rb @@ -7,13 +7,6 @@ module Arel @taken = taken end - def == other - super || - Take === other && - relation == other.relation && - taken == other.taken - end - def engine engine = relation.engine diff --git a/spec/algebra/unit/relations/relation_spec.rb b/spec/algebra/unit/relations/relation_spec.rb index ec311d0c43..1a15471f9a 100644 --- a/spec/algebra/unit/relations/relation_spec.rb +++ b/spec/algebra/unit/relations/relation_spec.rb @@ -134,7 +134,9 @@ module Arel describe '#take' do it "manufactures a take relation" do - @relation.take(5).should == Take.new(@relation, 5) + take = @relation.take(5) + take.relation.should == @relation + take.taken.should == 5 end describe 'when given a blank number of items' do -- cgit v1.2.3