diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-12 19:27:54 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-12 19:27:54 -0700 |
commit | af61eedc1a98fc2b6e3011a4c2af8666c0717966 (patch) | |
tree | 131ebadb077fa7577c57950db0cb8a9a3b28079a /spec/arel | |
parent | 5ea98130038ff5395239f3f6e46dc9276d3198ec (diff) | |
download | rails-af61eedc1a98fc2b6e3011a4c2af8666c0717966.tar.gz rails-af61eedc1a98fc2b6e3011a4c2af8666c0717966.tar.bz2 rails-af61eedc1a98fc2b6e3011a4c2af8666c0717966.zip |
order accepts symbols for clauses
Diffstat (limited to 'spec/arel')
-rw-r--r-- | spec/arel/select_manager_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/arel/select_manager_spec.rb b/spec/arel/select_manager_spec.rb index df8d236bc3..fa1bbdddce 100644 --- a/spec/arel/select_manager_spec.rb +++ b/spec/arel/select_manager_spec.rb @@ -27,6 +27,19 @@ module Arel describe 'select manager' do describe 'backwards compatibility' do + describe 'order' do + it 'accepts symbols' do + table = Table.new :users + manager = Arel::SelectManager.new Table.engine + manager.project SqlLiteral.new '*' + manager.from table + manager.order :foo + manager.to_sql.should be_like %{ + SELECT * FROM "users" ORDER BY foo + } + end + end + describe 'group' do it 'takes a symbol' do table = Table.new :users |