diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-12 18:23:28 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-12 18:23:28 -0700 |
commit | 6cd4e8f51ff231cafb2fdb6d71328f763c934b0b (patch) | |
tree | 2bd8bbeb3158348bf87ca97887833b3e9c8ed280 /spec/arel | |
parent | d4abd35feb84db37815ecd8f0b37f657317105c1 (diff) | |
download | rails-6cd4e8f51ff231cafb2fdb6d71328f763c934b0b.tar.gz rails-6cd4e8f51ff231cafb2fdb6d71328f763c934b0b.tar.bz2 rails-6cd4e8f51ff231cafb2fdb6d71328f763c934b0b.zip |
supporting symbols for group statements
Diffstat (limited to 'spec/arel')
-rw-r--r-- | spec/arel/select_manager_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/arel/select_manager_spec.rb b/spec/arel/select_manager_spec.rb index 2ed1a851e5..02586f3a65 100644 --- a/spec/arel/select_manager_spec.rb +++ b/spec/arel/select_manager_spec.rb @@ -27,6 +27,18 @@ module Arel describe 'select manager' do describe 'backwards compatibility' do + describe 'group' do + it 'takes a symbol' do + table = Table.new :users + manager = Arel::SelectManager.new Table.engine + manager.from table + manager.group :foo + manager.to_sql.should be_like %{ + SELECT FROM "users" GROUP BY foo + } + end + end + describe 'from' do it 'ignores strings when table of same name exists' do table = Table.new :users |