diff options
Diffstat (limited to 'spec/arel/select_manager_spec.rb')
-rw-r--r-- | spec/arel/select_manager_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/arel/select_manager_spec.rb b/spec/arel/select_manager_spec.rb index 5e4059084f..9a2b14f920 100644 --- a/spec/arel/select_manager_spec.rb +++ b/spec/arel/select_manager_spec.rb @@ -26,6 +26,21 @@ module Arel end describe 'select manager' do + describe 'skip' do + it 'should add an offset' do + table = Table.new :users + mgr = table.from table + mgr.skip 10 + mgr.to_sql.should be_like %{ SELECT FROM "users" OFFSET 10 } + end + + it 'should chain' do + table = Table.new :users + mgr = table.from table + mgr.skip(10).to_sql.should be_like %{ SELECT FROM "users" OFFSET 10 } + end + end + describe 'taken' do it 'should return limit' do table = Table.new :users |