From a532f176e653f8cbc860cb94c30046ab48ac1a85 Mon Sep 17 00:00:00 2001 From: cloudhead Date: Sat, 19 Jun 2010 19:42:23 -0400 Subject: [PATCH] rename context.name => context.description, and make context.name be the last level only --- lib/vows/context.js | 5 +++-- lib/vows/suite.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/vows/context.js b/lib/vows/context.js index 812de0a..a3205f9 100644 --- a/lib/vows/context.js +++ b/lib/vows/context.js @@ -24,8 +24,9 @@ this.Context = function (vow, ctx, env) { else { process.nextTick(emit) } }; }); - this.name = [ - ctx.name || '', + this.name = vow.description; + this.title = [ + ctx.title || '', vow.description || '' ].join(/^[#.:]/.test(vow.description) ? '' : ' ').trim(); }; diff --git a/lib/vows/suite.js b/lib/vows/suite.js index 74687fd..25ff9c4 100644 --- a/lib/vows/suite.js +++ b/lib/vows/suite.js @@ -171,7 +171,7 @@ this.Suite.prototype = new(function () { // Holds the current test or context var vow = Object.create({ callback: ctx.tests[item], - context: ctx.name, + context: ctx.title, description: item, binding: ctx.env, status: null,