diff --git a/README.md b/README.md index b31fe6b..2359213 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ define([ bogus.stub('SteeringWheel', fakeSteeringWheel); // load Car module, that depends on SteeringWheel - bogus.requireWithStubs('Car', function(module){ + bogus.require('Car', function(module){ Car = module; done(); }); diff --git a/bogus.js b/bogus.js index 9a27719..fe71bdd 100644 --- a/bogus.js +++ b/bogus.js @@ -99,6 +99,7 @@ define(['require'], function(require){ return { stub: stubOneOrMany, + require: requireWithStubs, requireWithStubs: requireWithStubs, reset: reset }; diff --git a/test/test.js b/test/test.js index 5663d7a..d827f57 100644 --- a/test/test.js +++ b/test/test.js @@ -113,6 +113,12 @@ }); }); + describe('require method', function(){ + it('should be an alias of requireWithStubs', function(){ + assert.equal(bogus.require, bogus.requireWithStubs); + }); + }); + describe('reset method', function(){ it('should return all original implementations to their names', function(done){ var define = requirejs.define,