/*jslint node: true, nomen: true, white: true, unparam: true*/
/*globals describe, beforeEach, afterEach, it, expect, spyOn*/
/*!
 * Sitegear3
 * Copyright(c) 2014 Ben New, Sitegear.org
 * MIT Licensed
 */

(function (_, sitegear3, redis) {
	"use strict";
	require('../setupTests');

	describe('Sitegear3 application lifecycle: persistence()', function () {
		var app;
		beforeEach(function () {
			spyOn(redis, 'createClient').andCallFake(function () {
				return {
					on: _.noop
				};
			});
			app = sitegear3().initialise(require('../settings.json')).persistence();
		});
		it('Calls redis.createClient()', function () {
			expect(redis.createClient).toHaveBeenCalled();
			expect(redis.createClient.callCount).toBe(1);
		});
		afterEach(function () {
			app.dispose();
		});
	});
}(require('lodash'), require('../../../index'), require('redis')));

@@ -468,16 +468,38 @@
 %09%09%09%09%09on:
+ _.noop,%0A%09%09%09%09%09dispose:
  _.noop%0A

Fix persistence.spec to run without redis.