Skip to content

Commit

Permalink
Pass suite reference to batches
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurii Rashkovskii authored and Alexis Sellier committed Oct 13, 2010
1 parent 213d6cd commit 50077aa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/vows/suite.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ this.Suite.prototype = new(function () {
tests = batch.tests,
promise = batch.promise = new(events.EventEmitter);

var that = this;

batch.status = 'begin';

// The test runner, it calls itself recursively, passing the
Expand Down Expand Up @@ -169,6 +171,7 @@ this.Suite.prototype = new(function () {
// Create a new evaluation context,
// inheriting from the parent one.
var env = Object.create(ctx.env);
env.suite = that;

// Holds the current test or context
var vow = Object.create({
Expand Down

0 comments on commit 50077aa

Please sign in to comment.