Permalink
Browse files

added a test for size

  • Loading branch information...
1 parent 02ee455 commit eeed10c24567aa0cb970d6c33f4e085f691d9e78 mmichelli committed Nov 23, 2011
Showing with 10 additions and 1 deletion.
  1. +2 −1 test/common.js
  2. +8 −0 test/system/test-size.js
View
@@ -1,7 +1,8 @@
var path = require('path'), fs = require('fs');
-require.paths.unshift(path.dirname(__dirname)+'/lib');
+global.ROOT_DIR = path.dirname(__dirname);
global.TEST_TMP = path.join(__dirname, 'tmp');
+global.ROOT_LIB = path.join(global.ROOT_DIR, 'lib', 'dirty');
global.assert = require('assert');
global.Gently = require('gently');
global.GENTLY = new Gently();
@@ -0,0 +1,8 @@
+require('../common');
+var db = require(global.ROOT_LIB)();
+
+db.set(1, {test: 'foo'});
+db.set(2, {test: 'bar'});
+db.set(3, {test: 'foobar'});
+
+assert.equal(db.size(), 3);

0 comments on commit eeed10c

Please sign in to comment.