Move ExpectationResult into its own file

This commit is contained in:
Davis W. Frank & Rajan Agaskar
2012-11-29 12:17:20 -08:00
parent 3e5da57cf9
commit 8d94d0bfc5
4 changed files with 39 additions and 40 deletions
+19 -20
View File
@@ -102,26 +102,6 @@ jasmine.MessageResult.prototype.toString = function() {
return text; return text;
}; };
jasmine.ExpectationResult = function(params) {
this.type = 'expect';
this.matcherName = params.matcherName;
this.passed_ = params.passed;
this.expected = params.expected;
this.actual = params.actual;
this.message = this.passed_ ? 'Passed.' : params.message;
var trace = (params.trace || new Error(this.message));
this.trace = this.passed_ ? '' : trace;
};
jasmine.ExpectationResult.prototype.toString = function () {
return this.message;
};
jasmine.ExpectationResult.prototype.passed = function () {
return this.passed_;
};
/** /**
* Getter for the Jasmine environment. Ensures one gets created * Getter for the Jasmine environment. Ensures one gets created
*/ */
@@ -528,6 +508,25 @@ jasmine.util.extend = function(destination, source) {
return destination; return destination;
}; };
jasmine.ExpectationResult = function(params) {
this.type = 'expect';
this.matcherName = params.matcherName;
this.passed_ = params.passed;
this.expected = params.expected;
this.actual = params.actual;
this.message = this.passed_ ? 'Passed.' : params.message;
var trace = (params.trace || new Error(this.message));
this.trace = this.passed_ ? '' : trace;
};
jasmine.ExpectationResult.prototype.toString = function () {
return this.message;
};
jasmine.ExpectationResult.prototype.passed = function () {
return this.passed_;
};
/** /**
* Environment for Jasmine * Environment for Jasmine
* *
+19
View File
@@ -0,0 +1,19 @@
jasmine.ExpectationResult = function(params) {
this.type = 'expect';
this.matcherName = params.matcherName;
this.passed_ = params.passed;
this.expected = params.expected;
this.actual = params.actual;
this.message = this.passed_ ? 'Passed.' : params.message;
var trace = (params.trace || new Error(this.message));
this.trace = this.passed_ ? '' : trace;
};
jasmine.ExpectationResult.prototype.toString = function () {
return this.message;
};
jasmine.ExpectationResult.prototype.passed = function () {
return this.passed_;
};
-20
View File
@@ -102,26 +102,6 @@ jasmine.MessageResult.prototype.toString = function() {
return text; return text;
}; };
jasmine.ExpectationResult = function(params) {
this.type = 'expect';
this.matcherName = params.matcherName;
this.passed_ = params.passed;
this.expected = params.expected;
this.actual = params.actual;
this.message = this.passed_ ? 'Passed.' : params.message;
var trace = (params.trace || new Error(this.message));
this.trace = this.passed_ ? '' : trace;
};
jasmine.ExpectationResult.prototype.toString = function () {
return this.message;
};
jasmine.ExpectationResult.prototype.passed = function () {
return this.passed_;
};
/** /**
* Getter for the Jasmine environment. Ensures one gets created * Getter for the Jasmine environment. Ensures one gets created
*/ */
+1
View File
@@ -3,6 +3,7 @@ class JasmineDev < Thor
:core => [ :core => [
"base.js", "base.js",
"util.js", "util.js",
"ExpectationResult.js",
"Env.js", "Env.js",
"Reporter.js", "Reporter.js",
"Block.js", "Block.js",