Sha256: e792276524559c74f047178d565af94f394b26124074b238a0f9e237c87b5add
Contents?: true
Size: 701 Bytes
Versions: 10
Compression:
Stored size: 701 Bytes
Contents
# encoding: utf-8 require 'spec_helper' require File.expand_path('../fixtures/classes', __FILE__) describe Adamantium, '#memoized' do subject { object.memoized(method) } let(:described_class) { Class.new(AdamantiumSpecs::Object) } let(:method) { :test } let(:value) { String.new.freeze } let(:object) { described_class.new } before do described_class.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
10 entries across 10 versions & 1 rubygems