Sha256: 130610542e08c978ca5e9fd44642611d6fadf28b005a7b31ae1bd491e15af7c7
Contents?: true
Size: 431 Bytes
Versions: 27
Compression:
Stored size: 431 Bytes
Contents
require 'spec_helper' describe 'Criteria and default scope' do context 'order in query' do let(:query) do Acolyte.order(status: :desc) end let(:sort_options) do query.options[:sort] end it 'is added after order of default scope' do sort_options.should == {'status' => -1, 'name' => 1} # Keys in Ruby are ordered sort_options.keys.should == %w(name status) end end end
Version data entries
27 entries across 27 versions & 2 rubygems