Sha256: 0dafebddc1d33fc2c1ecc94ad381acc15521f1e0041dc2e02e6c2268cf76b260
Contents?: true
Size: 658 Bytes
Versions: 4
Compression:
Stored size: 658 Bytes
Contents
require 'spec_helper' module Arel describe Skip do before do @relation = Table.new(:users) @skipped = 4 end describe '#to_sql' do it "manufactures sql with limit and offset" do sql = Skip.new(@relation, @skipped).to_sql adapter_is :mysql do sql.should be_like(%Q{ SELECT `users`.`id`, `users`.`name` FROM `users` OFFSET 4 }) end adapter_is_not :mysql do sql.should be_like(%Q{ SELECT "users"."id", "users"."name" FROM "users" OFFSET 4 }) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems