Sha256: 7d467c95f9ca2fb674d36d42ec9ac30afe82ece571e0deb978f3d8fbd377c388

Contents?: true

Size: 611 Bytes

Versions: 1

Compression:

Stored size: 611 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Relation::Operation::Reverse::Methods, '#reverse' do
  subject { object.reverse }

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

  it { should be_instance_of(Relation::Operation::Reverse) }

  it 'behaves the same as Array#reverse' do
    should == relation.to_a.reverse
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
axiom-0.1.0 spec/unit/axiom/relation/operation/reverse/methods/reverse_spec.rb