test/test_all.rb in unicache-0.0.1 vs test/test_all.rb in unicache-0.0.2

- old
+ new

@@ -1,15 +1,13 @@ require 'test/unit' require 'unicache' class TestableUniCache < UniCache - attr_reader :callbackType - attr_reader :callbacks + attr_reader :cb attr_accessor :cb_table end - class UniCacheTest < Test::Unit::TestCase def test_put_get c = UniCache.new( 2 ) @@ -155,10 +153,10 @@ def test_callbacks c = TestableUniCache.new( 2 ) c.cb_table = {} # Register dummy callbacks. - c.callbackType.each do |type| + c.cb.ids.each do |type| eval "c.registerCallback( :#{type.to_s}, Proc.new{ |k,v,o| o.cb_table[ :#{type.to_s} ] = [ k, v ] } )" end c.removeCallback( :getdata ) c.registerCallback( :getdata, Proc.new{ |k| k+1 } )