aboutsummaryrefslogtreecommitdiffstats
path: root/spec/arel/unit/relations/order_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/arel/unit/relations/order_spec.rb')
-rw-r--r--spec/arel/unit/relations/order_spec.rb15
1 files changed, 2 insertions, 13 deletions
diff --git a/spec/arel/unit/relations/order_spec.rb b/spec/arel/unit/relations/order_spec.rb
index 838a2f141e..514612f047 100644
--- a/spec/arel/unit/relations/order_spec.rb
+++ b/spec/arel/unit/relations/order_spec.rb
@@ -7,17 +7,6 @@ module Arel
@attribute = @relation[:id]
end
- describe '#initialize' do
- before do
- @another_attribtue = @relation[:name]
- end
-
- it "manufactures nested Order relations if multiple predicates are provided" do
- Order.new(@relation, @predicate, @another_attribute). \
- should == Order.new(Order.new(@relation, @another_attribute), @predicate)
- end
- end
-
describe '#to_sql' do
describe "when given an attribute" do
it "manufactures sql with an order clause populated by the attribute" do
@@ -63,11 +52,11 @@ module Arel
@another_attribute = @relation[:name]
end
- it "manufactures sql with an order clause populated by comma-separated attributes" do
+ it "manufactures sql with the order clause of the last ordering" do
Order.new(@ordered_relation, @another_attribute).to_sql.should be_like("
SELECT `users`.`id`, `users`.`name`
FROM `users`
- ORDER BY `users`.`id`, `users`.`name`
+ ORDER BY `users`.`name`
")
end
end