Squashed commit of work to make Jasmine a collection of isolated modules. Note now that in our test suite, "jasmine" now always refers to the build jasmine loaded from jasmine.js and "j$" always refers to the code in the src directories.
Also, dev_boot.js is now a copy of boot.js and has additional changes to load jasmine the second time, into the j$ reference.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
describe('Spies', function () {
|
||||
var env;
|
||||
beforeEach(function() {
|
||||
env = new jasmine.Env();
|
||||
env = new j$.Env();
|
||||
});
|
||||
|
||||
it('should replace the specified function with a spy object', function() {
|
||||
@@ -133,7 +133,7 @@ describe('Spies', function () {
|
||||
|
||||
it('is torn down when env.removeAllSpies is called', function() {
|
||||
var originalFunctionWasCalled = false,
|
||||
env = new jasmine.Env(),
|
||||
env = new j$.Env(),
|
||||
TestClass = {
|
||||
someFunction: function() {
|
||||
originalFunctionWasCalled = true;
|
||||
@@ -151,15 +151,15 @@ describe('Spies', function () {
|
||||
});
|
||||
|
||||
it('calls removeAllSpies during spec finish', function() {
|
||||
var env = new jasmine.Env(),
|
||||
var env = new j$.Env(),
|
||||
originalFoo = function() {},
|
||||
testObj = {
|
||||
foo: originalFoo
|
||||
},
|
||||
firstSpec = originalJasmine.createSpy('firstSpec').andCallFake(function() {
|
||||
firstSpec = jasmine.createSpy('firstSpec').andCallFake(function() {
|
||||
env.spyOn(testObj, 'foo');
|
||||
}),
|
||||
secondSpec = originalJasmine.createSpy('secondSpec').andCallFake(function() {
|
||||
secondSpec = jasmine.createSpy('secondSpec').andCallFake(function() {
|
||||
expect(testObj.foo).toBe(originalFoo);
|
||||
});
|
||||
env.describe('test suite', function() {
|
||||
@@ -215,7 +215,7 @@ describe('Spies', function () {
|
||||
describe("createSpyObj", function() {
|
||||
it("should create an object with a bunch of spy methods when you call jasmine.createSpyObj()", function() {
|
||||
var spyObj = jasmine.createSpyObj('BaseName', ['method1', 'method2']);
|
||||
expect(spyObj).toEqual({ method1: originalJasmine.any(Function), method2: originalJasmine.any(Function)});
|
||||
expect(spyObj).toEqual({ method1: jasmine.any(Function), method2: jasmine.any(Function)});
|
||||
expect(spyObj.method1.identity).toEqual('BaseName.method1');
|
||||
expect(spyObj.method2.identity).toEqual('BaseName.method2');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user