Sha256: 36819eb918da04896ed1045c584366e0b4f39e01a6d5ec533288cb66081edd3e

Contents?: true

Size: 453 Bytes

Versions: 1

Compression:

Stored size: 453 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Relation::Operation::Offset, '#directions' do
  subject { object.directions }

  let(:relation) { Relation.new([ [ :id, Integer ] ], LazyEnumerable.new) }
  let(:object)   { described_class.new(ordered, 0)                        }
  let(:ordered)  { relation.sort_by { |r| r.id }                          }

  it_should_behave_like 'an idempotent method'

  it { should equal(ordered.directions) }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
axiom-0.1.0 spec/unit/axiom/relation/operation/offset/directions_spec.rb