aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/arel/algebra/relations/operations/order.rb7
-rw-r--r--spec/algebra/unit/relations/relation_spec.rb5
2 files changed, 4 insertions, 8 deletions
diff --git a/lib/arel/algebra/relations/operations/order.rb b/lib/arel/algebra/relations/operations/order.rb
index d91e400419..e7306fe384 100644
--- a/lib/arel/algebra/relations/operations/order.rb
+++ b/lib/arel/algebra/relations/operations/order.rb
@@ -7,13 +7,6 @@ module Arel
@orderings = orderings.collect { |o| o.bind(relation) }
end
- def == other
- super ||
- Order === other &&
- relation == other.relation &&
- orderings == other.orderings
- end
-
# TESTME
def orders
# QUESTION - do we still need relation.orders ?
diff --git a/spec/algebra/unit/relations/relation_spec.rb b/spec/algebra/unit/relations/relation_spec.rb
index 1219f80bc3..07a7dcb843 100644
--- a/spec/algebra/unit/relations/relation_spec.rb
+++ b/spec/algebra/unit/relations/relation_spec.rb
@@ -122,7 +122,10 @@ module Arel
describe '#order' do
it "manufactures an order relation" do
- @relation.order(@attribute1, @attribute2).should == Order.new(@relation, [@attribute1, @attribute2])
+ order = @relation.order(@attribute1, @attribute2)
+ order.relation.should == @relation
+ order.orderings.should == [@attribute1, @attribute2]
+ order.should be_kind_of Order
end
describe 'when given a blank ordering' do