Sha256: 0f6a2ec0c4f54a995d6dbdec66b29150aaaa8f9c7fd123668b898a99ee8ec73d
Contents?: true
Size: 657 Bytes
Versions: 2
Compression:
Stored size: 657 Bytes
Contents
require 'spec_helper' require File.expand_path('../../fixtures/classes', __FILE__) describe 'Veritas::Immutable::MemoizeMethods#memoized' do subject { object.memoized(method) } let(:klass) { Class.new(ImmutableSpecs::Object) } let(:method) { :test } let(:value) { String.new.freeze } let(:object) { klass.new } before do klass.memoize(method) end context 'when a method is memoized' do before do object.memoize(method, value) end it { should equal(value) } end context 'when a method is not memoized' do it { should be_nil } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
veritas-0.0.2 | spec/unit/veritas/immutable/memoize_methods/memoized_spec.rb |
veritas-0.0.1 | spec/unit/veritas/immutable/memoize_methods/memoized_spec.rb |