/**
 * @fileOverview Ensures nsprc is as expected
 */

var expect = require('expect.js'),
    fs = require('fs'),
    _ = require('lodash');

/* global describe, it, before */
describe('nsp', function () {
    var nsprc,
        pkg;

    before(function () {
        nsprc = JSON.parse(fs.readFileSync('./.nsprc').toString());
        pkg = JSON.parse(fs.readFileSync('./package.json').toString());
    });

    it('must be a dev dependency', function () {
        expect(pkg.devDependencies && pkg.devDependencies.nsp).to.be.ok();
    });

    describe('nsprc', function () {
        it('must exist', function () {
            expect(nsprc).to.be.ok();
        });

        it('must not have any exclusion', function () {
            expect(nsprc.exceptions).to.eql([]);
        });

        it('must not have exclusions (prevent erroneous exclusions)', function () {
            expect(nsprc.exclusions).to.eql({});
        });

        it('dependency version in package.json should match .nsprc (time to remove exclusion?)', function () {
            var pkg = _.pick(require('../../package').dependencies, _.keys(nsprc.exclusions));
            expect(pkg).to.eql(nsprc.exclusions);
        });

        // if you are changing the version here, most probably you are better of removing the exclusion in first place.
        // remove the exclusion and check if nsp passes, else update the version here
        it('on excluded package\'s version change must reconsider removing exclusion', function () {
            // expect(pkg.dependencies).to.have.property('<name>', '<semver>');
        });
    });
});

@@ -74,19 +74,21 @@
 re('
+chai').
 expect
-.js')
 ,%0A  
@@ -412,20 +412,22 @@
     it('
-must
+should
  be a de
@@ -522,26 +522,24 @@
 sp).to.be.ok
-()
 ;%0A    %7D);%0A%0A 
@@ -585,20 +585,22 @@
     it('
-must
+should
  exist',
@@ -648,18 +648,16 @@
 to.be.ok
-()
 ;%0A      
@@ -667,36 +667,38 @@
 );%0A%0A        it('
-must
+should
  not have any ex
@@ -795,20 +795,22 @@
     it('
-must
+should
  not hav
@@ -943,16 +943,29 @@
     it('
+should match 
 dependen
@@ -991,28 +991,18 @@
 ge.json 
-should match
+to
  .nsprc 
@@ -1421,16 +1421,53 @@
     it('
+should reconsider removing exclusion 
 on exclu
@@ -1499,43 +1499,8 @@
 ange
- must reconsider removing exclusion
 ', f

Update nsp tests to chai