Sha256: 4cac735ddb4779b469a58790b23f2e5a246f82e8b59426f04d988a1de8565db5

Contents?: true

Size: 503 Bytes

Versions: 1

Compression:

Stored size: 503 Bytes

Contents

require 'spec_helper'

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

  let(:klass)  { Relation                                   }
  let(:header) { Relation::Header.new([ [ :id, Integer ] ]) }
  let(:body)   { [].each                                    }
  let(:object) { klass.new(header, body)                    }

  before do
    object.should be_instance_of(klass)
  end

  it_should_behave_like 'a hash method'

  it { should == klass.hash ^ header.hash ^ body.to_set.hash }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
veritas-0.0.2 spec/unit/veritas/relation/hash_spec.rb