Sha256: 57efd7d668e501ea190aebea2eaa4707bf43b5399df6fc32ac0b58c3cc166ad6

Contents?: true

Size: 557 Bytes

Versions: 4

Compression:

Stored size: 557 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

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

  it_should_behave_like 'a hash method'

  it { should == described_class.hash ^ operand.hash ^ offset.hash }
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
axiom-0.1.0 spec/unit/axiom/relation/operation/offset/hash_spec.rb
veritas-0.0.7 spec/unit/veritas/relation/operation/offset/hash_spec.rb
veritas-0.0.6 spec/unit/veritas/relation/operation/offset/hash_spec.rb
veritas-0.0.5 spec/unit/veritas/relation/operation/offset/hash_spec.rb