       result.should.equal true
       fn err
 
-test = {}
+test =
+  counter: 0
+  name: ->
+    "impromptu-cache-test-#{test.counter++}"
 
 test.base = (CacheClass, options = {}) ->
   impromptu = new Impromptu
-  counter = 0
   cache = null
 
   beforeEach ->
-    cache = new CacheTests CacheClass, options, impromptu, "impromptu-cache-api-test-#{counter++}"
+    cache = new CacheTests CacheClass, options, impromptu, test.name()
 
   it 'should create an instance', ->
     should.exist cache

    cached.run ->

  it 'should fetch cached values', (done) ->
    updater = new CacheClass background, 'should-fetch',
      update: (fn) ->
        fn null, 'value'

    fetcher = new CacheClass impromptu, 'should-fetch',
      update: (fn) ->
        should.fail 'Update should not run.'
        fn null, 'value'

    background: true

  it 'should update when background is set', (done) ->
    cached = new CacheClass background, test.name(),
      update: (fn) ->
        done()
        fn null, 'value'
