aboutsummaryrefslogtreecommitdiffstats
path: root/test/visitors/test_sqlite.rb
blob: fb8392c50471859d1b56ca30fddac7f35576af66 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'helper'

module Arel
  module Visitors
    describe 'the sqlite visitor' do
      before do
        @visitor = SQLite.new Table.engine
      end

      it 'defaults limit to -1' do
        stmt = Nodes::SelectStatement.new
        stmt.offset = Nodes::Offset.new(1)
        sql = @visitor.accept(stmt)
        sql.must_be_like "SELECT LIMIT -1 OFFSET 1"
      end
    end
  end
end