Sha256: 398142945904c4959981a0eaa889d60afbaf4370cde0a0a89de2684ce9913be6

Contents?: true

Size: 577 Bytes

Versions: 5

Compression:

Stored size: 577 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

  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)       { described_class.new(operand, summarize_by, summarizers) }

  it_should_behave_like 'a hash method'

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

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
axiom-0.1.0 spec/unit/axiom/algebra/summarization/hash_spec.rb
veritas-0.0.7 spec/unit/veritas/algebra/summarization/hash_spec.rb
veritas-0.0.6 spec/unit/veritas/algebra/summarization/hash_spec.rb
veritas-0.0.5 spec/unit/veritas/algebra/summarization/hash_spec.rb
veritas-0.0.4 spec/unit/veritas/algebra/summarization/hash_spec.rb