Sha256: 01a40454600f82f90db158dd2ea3b3b90233054226bdad756d9bdb5d001d4e59
Contents?: true
Size: 468 Bytes
Versions: 4
Compression:
Stored size: 468 Bytes
Contents
require 'spec_helper' module Alf describe AttrList, "to_ordering" do let(:attrs){ [:a, :b] } describe "without direction" do subject{ AttrList.coerce(attrs).to_ordering } it{ should eq(Ordering.new [[:a, :asc], [:b, :asc]])} end describe "with a direction" do subject{ AttrList.coerce(attrs).to_ordering(direction) } let(:direction){ :desc } it{ should eq(Ordering.new [[:a, :desc], [:b, :desc]])} end end end
Version data entries
4 entries across 4 versions & 1 rubygems