From 01d9337f108921f7923572fdd74e24fc05baab86 Mon Sep 17 00:00:00 2001 From: John Crepezzi Date: Mon, 28 Nov 2011 20:56:41 -0500 Subject: [PATCH] Clean up redis test to exit properly --- spec/redis_document_store_spec.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spec/redis_document_store_spec.js b/spec/redis_document_store_spec.js index d96bd60..da94712 100644 --- a/spec/redis_document_store_spec.js +++ b/spec/redis_document_store_spec.js @@ -1,7 +1,18 @@ var RedisDocumentStore = require('../lib/redis_document_store'); +var winston = require('winston'); +winston.remove(winston.transports.Console); + describe('redis_document_store', function() { + /* reconnect to redis on each test */ + afterEach(function() { + if (RedisDocumentStore.client) { + RedisDocumentStore.client.quit(); + RedisDocumentStore.client = false; + } + }); + describe('set', function() { it('should be able to set a key and have an expiration set', function() {