Skip to content

Commit

Permalink
Improve Readme formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
lackac committed May 7, 2012
1 parent 14f40d6 commit 40e275a
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,18 @@ Dependencies

Instalation
-----------
> npm install database-cleaner
```shell
$ npm install database-cleaner
```

Usage
------
> var DatabaseCleaner = require('database-cleaner');
> var databaseCleaner = new DatabaseCleaner(type); //type = 'mongodb|redis|couchdb'
>
> databaseCleaner.clean(database, callback);
```javascript
var DatabaseCleaner = require('database-cleaner');
var databaseCleaner = new DatabaseCleaner(type); //type = 'mongodb|redis|couchdb'

databaseCleaner.clean(database, callback);
```

### Examples
Take look at test folder to see how it works.
Expand All @@ -52,11 +56,13 @@ Running tests
-------------
There is some ways to run tests:

$ mocha test (you need nodeunit globaly installed. *npm install -g mocha*)
```shell
$ mocha test # you need mocha globaly installed. `npm install -g mocha`
$ npm test
```

> For tests you need each database running (mongodb, redis, couchdb, mysql)
> Or run once. Ex: mocha test/redis.test.js
For tests you need each database running (mongodb, redis, couchdb, mysql)
Or run once. Ex: `mocha test/redis.test.js`

You can also run tests using local mocha. ./node_modules/mocha/bin/mocha

Expand Down

0 comments on commit 40e275a

Please sign in to comment.