Sha256: 264fadd7bb97fbea3b42ab6dc45072d69079d3a17c4bb8f3cd300f430f0e6daf

Contents?: true

Size: 420 Bytes

Versions: 2

Compression:

Stored size: 420 Bytes

Contents

require 'compiler_helper'
module Alf
  module Sequel
    describe Compiler, "sort" do

      subject{ compile(expr) }

      context 'when the operand is fully compilable' do
        let(:expr){ sort(suppliers, [ [:name, :asc], [:status, :desc] ]) }

        specify{
          subject.sql.should eq("SELECT * FROM `suppliers` AS 't1' ORDER BY `t1`.`name` ASC, `t1`.`status` DESC")
        }
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
alf-sequel-0.14.0 spec/compiler/test_sort.rb
alf-sequel-0.13.0 spec/compiler/test_sort.rb