Sha256: 10ffe01ebe2c4950f079412972a7dedaa074f9dcc373a706d479a5c910ea18c4

Contents?: true

Size: 572 Bytes

Versions: 1

Compression:

Stored size: 572 Bytes

Contents

require 'spec_helper'
require File.expand_path('../../fixtures/classes', __FILE__)

describe 'Veritas::Immutable::MemoizeMethods#memoize' do
  subject { object.memoize(method, value) }

  let(:klass)  { Class.new(ImmutableSpecs::Object) }
  let(:object) { klass.new                         }
  let(:method) { :test                             }
  let(:value)  { String.new.freeze                 }

  before do
    klass.memoize(method)
  end

  it 'sets the memoized value for the method to the value' do
    subject
    object.send(method).should equal(value)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
veritas-0.0.2 spec/unit/veritas/immutable/memoize_methods/memoize_spec.rb