Sha256: 74ae80b9b5de8cee5738266e80502afd1060860c6fa51be40f19d94432e7c3cd

Contents?: true

Size: 387 Bytes

Versions: 8

Compression:

Stored size: 387 Bytes

Contents

require 'helper'

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

      it 'uses TOP to limit results' do
        stmt = Nodes::SelectStatement.new
        stmt.cores.last.top = Nodes::Top.new(1)
        sql = @visitor.accept(stmt)
        sql.must_be_like "SELECT TOP 1"
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
arel-2.0.10 test/visitors/test_mssql.rb
square-arel-2.0.9.20110222133018 test/visitors/test_mssql.rb
arel-2.0.9 test/visitors/test_mssql.rb
arel-2.0.9.rc1 test/visitors/test_mssql.rb
arel-2.0.8 test/visitors/test_mssql.rb
arel-2.0.8.beta.20110131120940 test/visitors/test_mssql.rb
arel-2.0.7 test/visitors/test_mssql.rb
arel-2.0.7.beta.20110110114925 test/visitors/test_mssql.rb