From d70e733f70174b20dd2236611a99683bb8e686dc Mon Sep 17 00:00:00 2001 From: gvanhove Date: Mon, 14 Nov 2011 18:43:13 -0800 Subject: [PATCH] remove unwanted spaces in it calls, and make the spec counting regex tolerate them if they exist so counts match even when using bad style --- spec/core/MatchersSpec.js | 10 +++++----- tasks/spec.rb | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/core/MatchersSpec.js b/spec/core/MatchersSpec.js index 405be7db..a8e965ac 100644 --- a/spec/core/MatchersSpec.js +++ b/spec/core/MatchersSpec.js @@ -945,35 +945,35 @@ describe("jasmine.Matchers", function() { var any; describe(".jasmineToString", function () { describe("with Object", function () { - it ("says it's looking for an object", function () { + it("says it's looking for an object", function () { any = jasmine.any(Object); expect(any.jasmineToString()).toMatch(//); }); }); describe("with Function", function () { - it ("says it's looking for a function", function () { + it("says it's looking for a function", function () { any = jasmine.any(Function); expect(any.jasmineToString()).toMatch(//); }); }); describe("with String", function () { - it ("says it's looking for a string", function () { + it("says it's looking for a string", function () { any = jasmine.any(String); expect(any.jasmineToString()).toMatch(//); }); }); describe("with Number", function () { - it ("says it's looking for a number", function () { + it("says it's looking for a number", function () { any = jasmine.any(Number); expect(any.jasmineToString()).toMatch(//); }); }); describe("with some other defined 'class'", function () { - it ("says it's looking for an object", function () { + it("says it's looking for an object", function () { function MyClass () {} any = jasmine.any(MyClass); expect(any.jasmineToString()).toMatch(//); diff --git a/tasks/spec.rb b/tasks/spec.rb index 30ef2f7b..2760e00d 100644 --- a/tasks/spec.rb +++ b/tasks/spec.rb @@ -31,7 +31,7 @@ end def count_specs_in(files) files.inject(0) do |count, file| - File.read(file).scan(/\sit\(/) {|s| count += 1} + File.read(file).scan(/\sit\s*\(/) {|s| count += 1} count end end