Permalink
Browse files

passing spec, not description

  • Loading branch information...
1 parent 4fdd39b commit d709590bcfeb7ae812d07beae15637abbbfebf98 @refractalize committed Aug 12, 2011
Showing with 5 additions and 4 deletions.
  1. +5 −4 cupoftea.js
View
@@ -97,7 +97,7 @@ var TopSpec = function (runStack) {
runStack.runSpec(function () {
runStack.pushCurrentSpec(spec, definition);
},function (spec, exception) {
- results.print(spec.fullDescription(), exception);
+ results.print(spec, exception);
});
} while (!spec.isFinished());
},
@@ -230,12 +230,13 @@ var RunStack = function () {
};
this.results = function (exception) {
- results.print(deepestSpec.fullDescription(), exception);
+ results.print(deepestSpec, exception);
};
};
var SimpleResults = function () {
- this.print = function (desc, exception) {
+ this.print = function (spec, exception) {
+ var desc = spec.fullDescription();
if (!exception) {
sys.print(desc + " OK\n");
} else {
@@ -256,7 +257,7 @@ var SimpleResults = function () {
var RspecResults = function () {
var exceptions = [];
- this.print = function (desc, exception) {
+ this.print = function (spec, exception) {
if (!exception) {
sys.print('.');
} else {

0 comments on commit d709590

Please sign in to comment.