Sha256: b53aa2d40037ff7d8c43b3ebbc101a059f0033d2cbf90f1d82b0f65276ce4f60

Contents?: true

Size: 621 Bytes

Versions: 1

Compression:

Stored size: 621 Bytes

Contents

require 'spec_helper'

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

  let(:klass)        { Algebra::Summarization                               }
  let(:operand)      { Relation.new([ [ :id, Integer ] ], [ [ 1 ], [ 2 ] ]) }
  let(:summarize_by) { operand.project([])                                  }
  let(:summarizers)  { { :count => lambda { |acc, tuple| acc.to_i + 1 } }   }
  let(:object)       { klass.new(operand, summarize_by, summarizers)        }

  it_should_behave_like 'a hash method'

  it { should == klass.hash ^ operand.hash ^ summarize_by.hash ^ summarizers.hash }
end

Version data entries

1 entries across 1 versions & 1 rubygems

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