diff options
Diffstat (limited to 'spec/arel/visitors')
-rw-r--r-- | spec/arel/visitors/oracle_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/arel/visitors/oracle_spec.rb b/spec/arel/visitors/oracle_spec.rb new file mode 100644 index 0000000000..384725b788 --- /dev/null +++ b/spec/arel/visitors/oracle_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +module Arel + module Visitors + describe 'the oracle visitor' do + before do + @visitor = Oracle.new Table.engine + end + + describe 'Nodes::SelectStatement' do + describe 'limit' do + it 'adds a rownum clause' do + stmt = Nodes::SelectStatement.new + stmt.limit = 10 + sql = @visitor.accept stmt + sql.should be_like %{ SELECT WHERE ROWNUM <= 10 } + end + end + end + end + end +end |