Permalink
Browse files

Fix calls

  • Loading branch information...
1 parent 4c13c05 commit 7c8fff83bfc11c73e7bd1ab93328e13a1b396f03 @elcuervo committed May 15, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −5 lib/gerbil.js
View
@@ -79,12 +79,13 @@ var Gerbil = function Gerbil(description, tests) {
var test = false;
var scope = {};
- if(typeof this.config.start == 'function') {
- var object = {
+ if(typeof this.config.start === 'function') {
+ var obj = {
description: this.description,
numberOfTests: this.queue.length()
};
- this.config.start(object);
+
+ this.config.start(obj);
}
try {
@@ -259,7 +260,7 @@ Gerbil.Test.prototype = {
fn();
errorMessage = expectedError.name + " was expected but not raised.";
} catch(exception) {
- if (typeof exception == typeof expectedError) {
+ if (typeof exception === typeof expectedError) {
errorMessage = expectedError.name + " was expected but " + exception.name + " was raised.";
}
}
@@ -275,7 +276,7 @@ Gerbil.Test.prototype = {
},
assertEqual: function(first, second) {
- if(first == undefined || second == undefined) {
+ if(first === undefined || second === undefined) {
throw Gerbil.Error({
message: "attr2 = {0} ({1}) and attr2 = {2} ({3})",
args: [first, typeof first, second, typeof second]

0 comments on commit 7c8fff8

Please sign in to comment.