Skip to content

Commit

Permalink
passing spec, not description
Browse files Browse the repository at this point in the history
  • Loading branch information
refractalize committed Aug 12, 2011
1 parent 4fdd39b commit d709590
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cupoftea.js
Expand Up @@ -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());
},
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit d709590

Please sign in to comment.