Move additional methods from Env prototype to env closure

- Users can no longer spelunk the spec tree from topSuite
- Users no longer have access to currentSuite/currentSpec
- Other miscellaneous (arguably less useful) methods have also been tucked
away into the closure, like suiteFactory
This commit is contained in:
Sheel Choksi
2013-10-24 15:28:01 -07:00
parent a3424ea265
commit f1613ce77c
2 changed files with 164 additions and 186 deletions
-14
View File
@@ -5,20 +5,6 @@ describe("Env", function() {
env = new j$.Env();
});
describe("reporting", function() {
var fakeReporter;
beforeEach(function() {
fakeReporter = jasmine.createSpyObj("fakeReporter", ["jasmineStarted"]);
});
it("should allow reporters to be registered", function() {
env.addReporter(fakeReporter);
env.reporter.jasmineStarted();
expect(fakeReporter.jasmineStarted).toHaveBeenCalled();
});
});
it('removes all spies when env is executed', function(done) {
originalFoo = function() {},
testObj = {