describe('movie test', function(){
it('should have mock text', function(){
var movieMock = {
text: 'twilight'
};
mockery.registerMock('movie', movieMock);
var movie = require('movie');
movie.text.should.equal('twilight');
});
});
Command:
$ NODE_PATH=lib mocha -R spec tests
Output:
movie test
1) should have mock text
0 passing (10 ms)
1 failing
1) movie test should have mock text:
actual(red) expected(green)
twilight(green) newmoon(red)
File: lib/movie.js
File: tests/movie.js
Command:
Output:
What have I done wrong?