From 1dfae3a5a01b05bf14de88958b625b865748387b Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Tue, 28 Apr 2009 18:51:15 -0300 Subject: ORDER BY should be included after GROUP BY clause --- spec/arel/unit/relations/alias_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'spec') diff --git a/spec/arel/unit/relations/alias_spec.rb b/spec/arel/unit/relations/alias_spec.rb index 5327154fa8..460a0ed0df 100644 --- a/spec/arel/unit/relations/alias_spec.rb +++ b/spec/arel/unit/relations/alias_spec.rb @@ -5,14 +5,14 @@ module Arel before do @relation = Table.new(:users) end - + describe '==' do it "obtains if the objects are the same" do Alias.new(@relation).should_not == Alias.new(@relation) (aliaz = Alias.new(@relation)).should == aliaz end end - + describe '#to_sql' do describe 'when there is no ambiguity' do it 'does not alias table names anywhere a table name can appear' do @@ -26,11 +26,11 @@ module Arel SELECT `users`.`id` FROM `users` WHERE `users`.`id` = 1 - ORDER BY `users`.`id` GROUP BY `users`.`id` + ORDER BY `users`.`id` ") end end end end -end \ No newline at end of file +end -- cgit v1.2.3