
var levelgraph = require('../lib/levelgraph')
  , level = require('level-test')();

describe('creation api', function() {

  var db;


  afterEach(function(done) {
    if (db) {
      db.close(done);
    }
  });

  it('should create a db passing a levelup instance', function() {
    db = levelgraph(level());
  });

  it('should create a db passing a string', function() {
    db = levelgraph('/tmp/hello');
  });
});


var levelgraph = require('../lib/levelgraph')
  , level = require('level-test')(),
  os = require('os'),
  path = require('path');

describe('creation api', function() {

  var db;


  afterEach(function(done) {
    if (db) {
      db.close(done);
    }
  });

  it('should create a db passing a levelup instance', function() {
    db = levelgraph(level());
  });

  it('should create a db passing a string', function() {
    var dbPath = path.join(os.tmpdir(), 'hello');
    db = levelgraph(dbPath);
  });
});

Make the creation_api_spec test work on Windows, by using system tempdir instead of /tmp/.