Sha256: 8d22fb1bc549dd9c5d0d9705c2fc2631bf62f0ecd9f0a4b4a511c04adc061678

Contents?: true

Size: 635 Bytes

Versions: 1

Compression:

Stored size: 635 Bytes

Contents

require 'spec_helper'

describe 'Veritas::Algebra::Projection#hash' do
  subject { object.hash }

  let(:klass)      { Algebra::Projection                                           }
  let(:body)       { [ [ 1, 'Dan Kubb' ], [ 2, 'Dan Kubb' ], [ 2, 'Alex Kubb'] ]   }
  let(:operand)    { Relation.new([ [ :id, Integer ], [ :name, String ] ], body)   }
  let(:attributes) { [ :id ]                                                       }
  let(:object)     { klass.new(operand, attributes)                                }

  it_should_behave_like 'a hash method'

  it { should == klass.hash ^ operand.hash ^ object.header.hash }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
veritas-0.0.2 spec/unit/veritas/algebra/projection/hash_spec.rb