Sha256: dbd54d1d63de3d86f51f1bb4e0abc239564b806b48b6e286c4375db18321c931

Contents?: true

Size: 330 Bytes

Versions: 2

Compression:

Stored size: 330 Bytes

Contents

# encoding: utf-8

shared_examples_for 'a hash method' do
  it_should_behave_like 'an idempotent method'

  specification = proc do
    should be_instance_of(Fixnum)
  end

  it 'is a fixnum' do
    instance_eval(&specification)
  end

  it 'memoizes the hash code' do
    expect(subject).to eql(object.memoized(:hash))
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
develry-0.0.3 shared/spec/shared/hash_method_behavior.rb
develry-0.0.2 shared/spec/shared/hash_method_behavior.rb