Skip to content

rSpec Output

jmervine edited this page Jul 11, 2012 · 6 revisions

v1.1.0

/home/jmervine/.rvm/rubies/ruby-1.9.3-p194/bin/ruby -S rspec ./spec/diskcached_spec.rb

Diskcached
  #new
    should init
    should init with 'store'
    should init with 'store' and 'timeout'
    should init with 'store', 'timeout' and 'gc_auto'
    should set 'gc_time' to nil if 'timeout' is nil
    should set 'gc_last' to nil if 'timeout' is nil
    should set 'gc_auto' to false if 'timeout' is nil
    should create cache dir if it doesn't exist
  #set (alias #add, #replace)
    should create a new cache
    should create a file on disk
  #get single
    should read cache before expiration
    should expire correctly
  #get multiple
    should read multiple caches into a Hash
    should expire correctly
  #cache
    should create a new cache
    should create a file on disk
    should read cache before expiration
    should expire correctly
    should return nil if no block is passed and cache is expired
  #expired?
    should be false
    should be true
  #delete
    should expire cache
    should remove cache file
  #flush
    should expire all caches
    should remove all cache files
  #flush_expired
    should not flush caches that aren't expired
    should not flush caches if caches recently flushed
    should flush caches are are expired
	#flush_expired!
	    should not flush caches that aren't expired
	    should flush caches even when recently flushed
	  #cache_file
	    should build cache path
	  automatic garbage collection ON
	    should clean up expired caches
	  automatic garbage collection OFF
	    should not clean up expired caches

	Diskcached advanced test cases
	  should cache array
	  should cache string
	  should cache number
	  should cache hash
	  should cache simple objects
	  should cache modified objects
	  should cache complex objects

	Finished in 4.92 seconds
	40 examples, 0 failures
Clone this wiki locally