From afc6e0f1b16052dd57928e6418c48899a5d7b7f1 Mon Sep 17 00:00:00 2001 From: Michael Jackson Date: Mon, 10 Sep 2012 14:56:09 -0700 Subject: [PATCH] Changed wording of some specs --- test/context_test.js | 16 ++++++++-------- test/scanner_test.js | 30 +++++++++++++++--------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/test/context_test.js b/test/context_test.js index 167b9ca..eab6729 100644 --- a/test/context_test.js +++ b/test/context_test.js @@ -9,10 +9,10 @@ vows.describe("Mustache.Context").addBatch({ var context = new Context(view); return context; }, - "should be able to lookup properties of its own view": function (context) { + "is able to lookup properties of its own view": function (context) { assert.equal(context.lookup("name"), "parent"); }, - "should be able to lookup nested properties of its own view": function (context) { + "is able to lookup nested properties of its own view": function (context) { assert.equal(context.lookup("a.b"), "b"); }, "when pushed": { @@ -20,26 +20,26 @@ vows.describe("Mustache.Context").addBatch({ var view = { name: 'child', c: { d: 'd' } }; return context.push(view); }, - "should return the child context": function (context) { + "returns the child context": function (context) { assert.equal(context.view.name, "child"); assert.equal(context.parent.view.name, "parent"); }, - "should be able to lookup properties of its own view": function (context) { + "is able to lookup properties of its own view": function (context) { assert.equal(context.lookup("name"), "child"); }, - "should be able to lookup properties of the parent context's view": function (context) { + "is able to lookup properties of the parent context's view": function (context) { assert.equal(context.lookup("message"), "hi"); }, - "should be able to lookup nested properties of its own view": function (context) { + "is able to lookup nested properties of its own view": function (context) { assert.equal(context.lookup("c.d"), "d"); }, - "should be able to lookup nested properties of its parent view": function (context) { + "is able to lookup nested properties of its parent view": function (context) { assert.equal(context.lookup("a.b"), "b"); } } // when pushed }, // A Context "make": { - "should return the same object when given a Context": function () { + "returns the same object when given a Context": function () { var context = new Context; assert.strictEqual(Context.make(context), context); } diff --git a/test/scanner_test.js b/test/scanner_test.js index 3e9277e..5850fe2 100644 --- a/test/scanner_test.js +++ b/test/scanner_test.js @@ -6,7 +6,7 @@ vows.describe("Mustache.Scanner").addBatch({ "A Scanner": { "for an empty string": { topic: new Scanner(""), - "should be at the end of the string": function () { + "is at the end of the string": function () { var scanner = new Scanner(""); assert(scanner.eos()); } @@ -20,10 +20,10 @@ vows.describe("Mustache.Scanner").addBatch({ var match = scanner.scan(/a b c/); this.callback(scanner, match); }, - "it should return the entire string": function (scanner, match) { + "returns the entire string": function (scanner, match) { assert.equal(match, scanner.string); }, - "it should be at the end of the string": function (scanner, match) { + "is at the end of the string": function (scanner, match) { assert(scanner.eos()); } }, // when the regexp matches the entire string @@ -34,10 +34,10 @@ vows.describe("Mustache.Scanner").addBatch({ var match = scanner.scan(/a/); this.callback(scanner, match); }, - "it should return the portion of the string that was matched": function (scanner, match) { + "returns the portion of the string that was matched": function (scanner, match) { assert.equal(match, "a"); }, - "it should advance the internal pointer the length of the match": function (scanner, match) { + "advances the internal pointer the length of the match": function (scanner, match) { assert.equal(scanner.pos, 1); } }, // at the 0th index @@ -47,10 +47,10 @@ vows.describe("Mustache.Scanner").addBatch({ var match = scanner.scan(/b/); this.callback(scanner, match); }, - "it should return the empty string": function (scanner, match) { + "returns the empty string": function (scanner, match) { assert.equal(match, ""); }, - "it should not advance the internal pointer": function (scanner, match) { + "does not advance the internal pointer": function (scanner, match) { assert.equal(scanner.pos, 0); } } // at some index other than 0 @@ -61,10 +61,10 @@ vows.describe("Mustache.Scanner").addBatch({ var match = scanner.scan(/z/); this.callback(scanner, match); }, - "it should return the empty string": function (scanner, match) { + "returns the empty string": function (scanner, match) { assert.equal(match, ""); }, - "it should not advance the internal pointer": function (scanner, match) { + "does not advance the internal pointer": function (scanner, match) { assert.equal(scanner.pos, 0); } } @@ -77,10 +77,10 @@ vows.describe("Mustache.Scanner").addBatch({ var match = scanner.scanUntil(/a/); this.callback(scanner, match); }, - "it should return the empty string": function (scanner, match) { + "returns the empty string": function (scanner, match) { assert.equal(match, "") }, - "it should not advance the internal pointer": function (scanner, match) { + "does not advance the internal pointer": function (scanner, match) { assert.equal(scanner.pos, 0); } }, @@ -90,10 +90,10 @@ vows.describe("Mustache.Scanner").addBatch({ var match = scanner.scanUntil(/b/); this.callback(scanner, match); }, - "it should return the portion of the string it scanned": function (scanner, match) { + "returns the portion of the string it scanned": function (scanner, match) { assert.equal(match, "a "); }, - "it should advance the internal pointer the length of the match": function (scanner, match) { + "advances the internal pointer the length of the match": function (scanner, match) { assert.equal(scanner.pos, 2); } } @@ -104,10 +104,10 @@ vows.describe("Mustache.Scanner").addBatch({ var match = scanner.scanUntil(/z/); this.callback(scanner, match); }, - "it should return the entire string": function (scanner, match) { + "returns the entire string": function (scanner, match) { assert.equal(match, scanner.string); }, - "it should be at the end of the string": function (scanner, match) { + "is at the end of the string": function (scanner, match) { assert(scanner.eos()); } } // when the regexp doesn't match