Sha256: 0c28359425526152923dfd247c1f2c12c4c0eaaa8104c0c13facfeded631b9a9
Contents?: true
Size: 647 Bytes
Versions: 9
Compression:
Stored size: 647 Bytes
Contents
require File.dirname(__FILE__) + "/../../spec_helper" describe Walruz::Memoization do before(:each) do @foo = Foo.new end it "should invoke the original method the first time" do @foo.highcost.should == "This is the first time" end it "should invoke the memoized result the second time" do @foo.highcost.should == "This is the first time" @foo.highcost.should == "This is the first time" end it "should invoke the method once memoized if and only if the reload parameter is given" do @foo.highcost.should == "This is the first time" @foo.highcost(:reload).should == "This is the second time" end end
Version data entries
9 entries across 9 versions & 1 rubygems