aboutsummaryrefslogtreecommitdiffstats
path: root/spec/arel/table_spec.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-09-07 16:07:37 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-09-07 16:07:37 -0700
commit7dcc76606bc1af67025e1f557e3e2184f96e4cf5 (patch)
tree205e37c2f917b2ad3c1db3afa4096ece6dfe92e2 /spec/arel/table_spec.rb
parent6e05eef9e94dd8f5138bab591d9dbe926498e6ed (diff)
downloadrails-7dcc76606bc1af67025e1f557e3e2184f96e4cf5.tar.gz
rails-7dcc76606bc1af67025e1f557e3e2184f96e4cf5.tar.bz2
rails-7dcc76606bc1af67025e1f557e3e2184f96e4cf5.zip
adding group to Table
Diffstat (limited to 'spec/arel/table_spec.rb')
-rw-r--r--spec/arel/table_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/arel/table_spec.rb b/spec/arel/table_spec.rb
index 8e27d60078..223453f708 100644
--- a/spec/arel/table_spec.rb
+++ b/spec/arel/table_spec.rb
@@ -28,6 +28,15 @@ module Arel
end
end
+ describe 'group' do
+ it 'should create a group' do
+ manager = @relation.group @relation[:id]
+ manager.to_sql.should be_like %{
+ SELECT FROM "users" GROUP BY "users"."id"
+ }
+ end
+ end
+
describe 'alias' do
it 'should create a node that proxies to a table' do
check @relation.aliases.should == []