var ready;

beforeEach(function() {
	storage = TEST_STORAGE;

	storage.clear(function() {
		ready = true;
	});

	waitsFor(function() {
		return ready;
	}, "the storage to be set up for testing", 500);
});

afterEach(function() {
	storage = DEFAULT_STORAGE;
});
var ready;

beforeEach(function() {
	ready = false;
	storage = TEST_STORAGE;

	storage.clear(function() {
		ready = true;
	});

	waitsFor(function() {
		return ready;
	}, "the storage to be set up for testing", 500);
});

afterEach(function() {
	storage = DEFAULT_STORAGE;
});
Set ready var to false before each test so it doesn't run prematurely.
Set ready var to false before each test so it doesn't run prematurely.
