/**
 * Tests for smock
 *
 */
var expect = require('chai').expect;
var smock = require('..');

// Export
describe('Export', function() {

    it('should be an object', function() {
        expect( smock ).to.be.an('object');
    });

    it('should have a mock() function', function() {
        expect( smock.mock ).to.be.a('function')
    })

    it('should have a suppress() function', function() {
       expect( smock.suppress ).to.be.a('function');
    });

    it('should have a unmock() function', function() {
       expect( smock.unmock ).to.be.a('function');
    });

    it('should have a unsuppress() function', function() {
       expect( smock.unsuppress ).to.be.a('function');
    });

    it('should have a unmockAll() function', function() {
       expect( smock.unmockAll ).to.be.a('function');
    });

    it('should have a unsuppressAll() function', function() {
       expect( smock.unsuppressAll ).to.be.a('function');
    });

});
@@ -947,8 +947,1032 @@
 %7D);%0A%0A%7D);
+%0A%0A// mock function%0Adescribe('mock()', function() %7B%0A%0A    beforeEach(function() %7B%0A        // Reset the require cache%0A        require.cache = %7B%7D;%0A    %7D);%0A%0A    it('should take two arguments', function() %7B%0A        expect(smock.mock.length).to.equal(2);%0A    %7D);%0A%0A    it('should mock correctly with a string', function() %7B%0A        smock.mock('blah', 42);%0A%0A        var imp = require('blah');%0A        expect( imp ).to.equal(42);%0A    %7D);%0A%0A    it('should mock correctly with a regex', function() %7B%0A        smock.mock(/%5Eblah/, 42);%0A%0A        %5B'blah', 'blah1', 'blah2', 'blahblah'%5D.forEach(function(str) %7B%0A            var imp = require(str);%0A            expect(imp).to.equal(42);%0A        %7D);%0A    %7D);%0A%0A    it('should correctly mock using callbacks', function() %7B%0A        var filter = function(str) %7B return 0 === str.indexOf('blah'); %7D;%0A        smock.mock(filter, 42);%0A%0A        %5B'blah', 'blah1', 'blah2', 'blahblah'%5D.forEach(function(str) %7B%0A            var imp = require(str);%0A            expect(imp).to.equal(42);%0A        %7D);%0A    %7D);%0A%0A%7D);

Add tests for mock()