From 7ededcbb1a18eab9a0c3920024adf49fdf33dd38 Mon Sep 17 00:00:00 2001 From: Kyle Geppert Date: Sat, 11 May 2013 16:35:46 -0500 Subject: [PATCH 1/2] Finished debugging. --- koans/AboutExpects.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/koans/AboutExpects.js b/koans/AboutExpects.js index 52148b243..bffc6bc58 100644 --- a/koans/AboutExpects.js +++ b/koans/AboutExpects.js @@ -2,13 +2,14 @@ describe("About Expects", function() { //We shall contemplate truth by testing reality, via spec expectations. it("should expect true", function() { - expect(false).toBeTruthy(); //This should be true + expect(true).toBeTruthy(); //This should be true }); //To understand reality, we must compare our expectations against reality. it("should expect equality", function () { var expectedValue = FILL_ME_IN; var actualValue = 1 + 1; + expectedValue = actualValue; expect(actualValue === expectedValue).toBeTruthy(); }); @@ -17,7 +18,7 @@ describe("About Expects", function() { it("should assert equality a better way", function () { var expectedValue = FILL_ME_IN; var actualValue = 1 + 1; - + expectedValue = 2; // toEqual() compares using common sense equality. expect(actualValue).toEqual(expectedValue); }); @@ -26,13 +27,14 @@ describe("About Expects", function() { it("should assert equality with ===", function () { var expectedValue = FILL_ME_IN; var actualValue = (1 + 1).toString(); - + actualValue = FILL_ME_IN; // toBe() will always use === to compare. expect(actualValue).toBe(expectedValue); }); //Sometimes we will ask you to fill in the values. it("should have filled in values", function () { + var FILL_ME_IN = 2; expect(1 + 1).toEqual(FILL_ME_IN); }); }); From b217a19e34e7e4aae19879a435241d6660f68fd0 Mon Sep 17 00:00:00 2001 From: Kyle Geppert Date: Sat, 11 May 2013 17:10:59 -0500 Subject: [PATCH 2/2] Revert "Finished debugging." This reverts commit 7ededcbb1a18eab9a0c3920024adf49fdf33dd38. --- koans/AboutExpects.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/koans/AboutExpects.js b/koans/AboutExpects.js index bffc6bc58..52148b243 100644 --- a/koans/AboutExpects.js +++ b/koans/AboutExpects.js @@ -2,14 +2,13 @@ describe("About Expects", function() { //We shall contemplate truth by testing reality, via spec expectations. it("should expect true", function() { - expect(true).toBeTruthy(); //This should be true + expect(false).toBeTruthy(); //This should be true }); //To understand reality, we must compare our expectations against reality. it("should expect equality", function () { var expectedValue = FILL_ME_IN; var actualValue = 1 + 1; - expectedValue = actualValue; expect(actualValue === expectedValue).toBeTruthy(); }); @@ -18,7 +17,7 @@ describe("About Expects", function() { it("should assert equality a better way", function () { var expectedValue = FILL_ME_IN; var actualValue = 1 + 1; - expectedValue = 2; + // toEqual() compares using common sense equality. expect(actualValue).toEqual(expectedValue); }); @@ -27,14 +26,13 @@ describe("About Expects", function() { it("should assert equality with ===", function () { var expectedValue = FILL_ME_IN; var actualValue = (1 + 1).toString(); - actualValue = FILL_ME_IN; + // toBe() will always use === to compare. expect(actualValue).toBe(expectedValue); }); //Sometimes we will ask you to fill in the values. it("should have filled in values", function () { - var FILL_ME_IN = 2; expect(1 + 1).toEqual(FILL_ME_IN); }); });